blob: 9e15ac5383565e7111b2383c797728ddb0bf9094 [file] [log] [blame]
tierno7edb6752016-03-21 17:37:52 +01001# -*- coding: utf-8 -*-
2
3##
4# Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U.
5# This file is part of openmano
6# All Rights Reserved.
7#
8# Licensed under the Apache License, Version 2.0 (the "License"); you may
9# not use this file except in compliance with the License. You may obtain
10# a copy of the License at
11#
12# http://www.apache.org/licenses/LICENSE-2.0
13#
14# Unless required by applicable law or agreed to in writing, software
15# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17# License for the specific language governing permissions and limitations
18# under the License.
19#
20# For those usages not covered by the Apache License, Version 2.0 please
21# contact with: nfvlabs@tid.es
22##
23
24'''
25JSON schemas used by openmano httpserver.py module to parse the different files and messages sent through the API
26'''
montesmoreno0c8def02016-12-22 12:16:23 +000027__author__="Alfonso Tierno, Gerardo Garcia, Pablo Montes"
tierno7edb6752016-03-21 17:37:52 +010028__date__ ="$09-oct-2014 09:09:48$"
29
30#Basis schemas
tierno392f2852016-05-13 12:28:55 +020031patern_name="^[ -~]+$"
tierno7edb6752016-03-21 17:37:52 +010032passwd_schema={"type" : "string", "minLength":1, "maxLength":60}
33nameshort_schema={"type" : "string", "minLength":1, "maxLength":60, "pattern" : "^[^,;()'\"]+$"}
34name_schema={"type" : "string", "minLength":1, "maxLength":255, "pattern" : "^[^,;()'\"]+$"}
35xml_text_schema={"type" : "string", "minLength":1, "maxLength":1000, "pattern" : "^[^']+$"}
36description_schema={"type" : ["string","null"], "maxLength":255, "pattern" : "^[^'\"]+$"}
37id_schema_fake = {"type" : "string", "minLength":2, "maxLength":36 } #"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
38id_schema = {"type" : "string", "pattern": "^[a-fA-F0-9]{8}(-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}$"}
39pci_schema={"type":"string", "pattern":"^[0-9a-fA-F]{4}(:[0-9a-fA-F]{2}){2}\.[0-9a-fA-F]$"}
40http_schema={"type":"string", "pattern":"^https?://[^'\"=]+$"}
41bandwidth_schema={"type":"string", "pattern" : "^[0-9]+ *([MG]bps)?$"}
42memory_schema={"type":"string", "pattern" : "^[0-9]+ *([MG]i?[Bb])?$"}
43integer0_schema={"type":"integer","minimum":0}
44integer1_schema={"type":"integer","minimum":1}
tierno392f2852016-05-13 12:28:55 +020045path_schema={"type":"string", "pattern":"^(\.){0,2}(/[^/\"':{}\(\)]+)+$"}
tierno7edb6752016-03-21 17:37:52 +010046vlan_schema={"type":"integer","minimum":1,"maximum":4095}
47vlan1000_schema={"type":"integer","minimum":1000,"maximum":4095}
48mac_schema={"type":"string", "pattern":"^[0-9a-fA-F][02468aceACE](:[0-9a-fA-F]{2}){5}$"} #must be unicast LSB bit of MSB byte ==0
49#mac_schema={"type":"string", "pattern":"^([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$"}
garciadeblasfec35df2016-08-25 11:33:57 +020050ip_schema={"type":"string","pattern":"^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"}
51ip_prefix_schema={"type":"string","pattern":"^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/(30|[12]?[0-9])$"}
tierno7edb6752016-03-21 17:37:52 +010052port_schema={"type":"integer","minimum":1,"maximum":65534}
53object_schema={"type":"object"}
tierno392f2852016-05-13 12:28:55 +020054schema_version_2={"type":"integer","minimum":2,"maximum":2}
garciadeblasfec35df2016-08-25 11:33:57 +020055#schema_version_string={"type":"string","enum": ["0.1", "2", "0.2", "3", "0.3"]}
tiernoae4a8d12016-07-08 12:30:39 +020056log_level_schema={"type":"string", "enum":["DEBUG", "INFO", "WARNING","ERROR","CRITICAL"]}
garciadeblasb69fa9f2016-09-28 12:04:10 +020057checksum_schema={"type":"string", "pattern":"^[0-9a-fA-F]{32}$"}
montesmoreno0c8def02016-12-22 12:16:23 +000058size_schema={"type":"integer","minimum":1,"maximum":100}
tierno7edb6752016-03-21 17:37:52 +010059
60metadata_schema={
61 "type":"object",
62 "properties":{
63 "architecture": {"type":"string"},
64 "use_incremental": {"type":"string","enum":["yes","no"]},
65 "vpci": pci_schema,
66 "os_distro": {"type":"string"},
67 "os_type": {"type":"string"},
68 "os_version": {"type":"string"},
69 "bus": {"type":"string"},
70 "topology": {"type":"string", "enum": ["oneSocket"]}
71 }
72}
73
74#Schema for the configuration file
75config_schema = {
76 "title":"configuration response information schema",
77 "$schema": "http://json-schema.org/draft-04/schema#",
78 "type":"object",
79 "properties":{
80 "http_port": port_schema,
81 "http_admin_port": port_schema,
82 "http_host": nameshort_schema,
tiernod29b1d32017-01-25 11:02:52 +010083 "auto_push_VNF_to_VIMs": {"type":"boolean"},
tierno7edb6752016-03-21 17:37:52 +010084 "vnf_repository": path_schema,
85 "db_host": nameshort_schema,
86 "db_user": nameshort_schema,
87 "db_passwd": {"type":"string"},
88 "db_name": nameshort_schema,
tierno639520f2017-04-05 19:55:36 +020089 "db_ovim_host": nameshort_schema,
90 "db_ovim_user": nameshort_schema,
91 "db_ovim_passwd": {"type":"string"},
92 "db_ovim_name": nameshort_schema,
tierno7edb6752016-03-21 17:37:52 +010093 # Next fields will disappear once the MANO API includes appropriate primitives
94 "vim_url": http_schema,
95 "vim_url_admin": http_schema,
96 "vim_name": nameshort_schema,
97 "vim_tenant_name": nameshort_schema,
98 "mano_tenant_name": nameshort_schema,
99 "mano_tenant_id": id_schema,
tierno20fc2a22016-08-19 17:02:35 +0200100 "http_console_proxy": {"type":"boolean"},
101 "http_console_host": nameshort_schema,
tierno7edb6752016-03-21 17:37:52 +0100102 "http_console_ports": {
103 "type": "array",
104 "items": {"OneOf" : [
105 port_schema,
106 {"type":"object", "properties":{"from": port_schema, "to": port_schema}, "required": ["from","to"]}
107 ]}
108 },
tiernoae4a8d12016-07-08 12:30:39 +0200109 "log_level": log_level_schema,
tierno72f35a52016-07-15 13:18:30 +0200110 "log_socket_level": log_level_schema,
tiernoae4a8d12016-07-08 12:30:39 +0200111 "log_level_db": log_level_schema,
tierno73ad9e42016-09-12 18:11:11 +0200112 "log_level_vim": log_level_schema,
tiernof97fd272016-07-11 14:32:37 +0200113 "log_level_nfvo": log_level_schema,
tierno73ad9e42016-09-12 18:11:11 +0200114 "log_level_http": log_level_schema,
tierno1ae51342017-01-16 12:48:30 +0000115 "log_level_console": log_level_schema,
tierno639520f2017-04-05 19:55:36 +0200116 "log_level_ovim": log_level_schema,
tierno73ad9e42016-09-12 18:11:11 +0200117 "log_file_db": path_schema,
118 "log_file_vim": path_schema,
119 "log_file_nfvo": path_schema,
120 "log_file_http": path_schema,
tierno1ae51342017-01-16 12:48:30 +0000121 "log_file_console": path_schema,
tierno639520f2017-04-05 19:55:36 +0200122 "log_file_ovim": path_schema,
tierno72f35a52016-07-15 13:18:30 +0200123 "log_socket_host": nameshort_schema,
124 "log_socket_port": port_schema,
tiernof97fd272016-07-11 14:32:37 +0200125 "log_file": path_schema,
tierno7edb6752016-03-21 17:37:52 +0100126 },
tierno639520f2017-04-05 19:55:36 +0200127 "required": ['db_user', 'db_passwd', 'db_name'],
tierno7edb6752016-03-21 17:37:52 +0100128 "additionalProperties": False
129}
130
131tenant_schema = {
132 "title":"tenant information schema",
133 "$schema": "http://json-schema.org/draft-04/schema#",
134 "type":"object",
135 "properties":{
136 "tenant":{
137 "type":"object",
138 "properties":{
139 "name": nameshort_schema,
140 "description": description_schema,
141 },
142 "required": ["name"],
143 "additionalProperties": True
144 }
145 },
146 "required": ["tenant"],
147 "additionalProperties": False
148}
garciadeblasfec35df2016-08-25 11:33:57 +0200149
tierno7edb6752016-03-21 17:37:52 +0100150tenant_edit_schema = {
151 "title":"tenant edit information schema",
152 "$schema": "http://json-schema.org/draft-04/schema#",
153 "type":"object",
154 "properties":{
155 "tenant":{
156 "type":"object",
157 "properties":{
158 "name": name_schema,
159 "description": description_schema,
160 },
161 "additionalProperties": False
162 }
163 },
164 "required": ["tenant"],
165 "additionalProperties": False
166}
167
168datacenter_schema_properties={
garciadeblasfec35df2016-08-25 11:33:57 +0200169 "name": name_schema,
170 "description": description_schema,
171 "type": nameshort_schema, #currently "openvim" or "openstack", can be enlarged with plugins
172 "vim_url": description_schema,
173 "vim_url_admin": description_schema,
174 "config": { "type":"object" }
175}
tierno7edb6752016-03-21 17:37:52 +0100176
177datacenter_schema = {
178 "title":"datacenter information schema",
179 "$schema": "http://json-schema.org/draft-04/schema#",
180 "type":"object",
181 "properties":{
182 "datacenter":{
183 "type":"object",
184 "properties":datacenter_schema_properties,
185 "required": ["name", "vim_url"],
186 "additionalProperties": True
187 }
188 },
189 "required": ["datacenter"],
190 "additionalProperties": False
191}
192
193
194datacenter_edit_schema = {
195 "title":"datacenter edit nformation schema",
196 "$schema": "http://json-schema.org/draft-04/schema#",
197 "type":"object",
198 "properties":{
199 "datacenter":{
200 "type":"object",
201 "properties":datacenter_schema_properties,
202 "additionalProperties": False
203 }
204 },
205 "required": ["datacenter"],
206 "additionalProperties": False
207}
208
209
210netmap_new_schema = {
211 "title":"netmap new information schema",
212 "$schema": "http://json-schema.org/draft-04/schema#",
213 "type":"object",
214 "properties":{
215 "netmap":{ #delete from datacenter
216 "type":"object",
217 "properties":{
218 "name": name_schema, #name or uuid of net to change
219 "vim_id": id_schema,
220 "vim_name": name_schema
221 },
222 "minProperties": 1,
223 "additionalProperties": False
224 },
225 },
226 "required": ["netmap"],
227 "additionalProperties": False
228}
229
230netmap_edit_schema = {
231 "title":"netmap edit information schema",
232 "$schema": "http://json-schema.org/draft-04/schema#",
233 "type":"object",
234 "properties":{
235 "netmap":{ #delete from datacenter
236 "type":"object",
237 "properties":{
238 "name": name_schema, #name or uuid of net to change
239 },
240 "minProperties": 1,
241 "additionalProperties": False
242 },
243 },
244 "required": ["netmap"],
245 "additionalProperties": False
246}
247
248datacenter_action_schema = {
249 "title":"datacenter action information schema",
250 "$schema": "http://json-schema.org/draft-04/schema#",
251 "type":"object",
252 "properties":{
253 "net-update":{"type":"null",},
254 "net-edit":{
255 "type":"object",
256 "properties":{
257 "net": name_schema, #name or uuid of net to change
258 "name": name_schema,
259 "description": description_schema,
260 "shared": {"type": "boolean"}
261 },
262 "minProperties": 1,
263 "additionalProperties": False
264 },
265 "net-delete":{
266 "type":"object",
267 "properties":{
268 "net": name_schema, #name or uuid of net to change
269 },
270 "required": ["net"],
271 "additionalProperties": False
272 },
273 },
274 "minProperties": 1,
275 "maxProperties": 1,
276 "additionalProperties": False
277}
278
279
280datacenter_associate_schema={
281 "title":"datacenter associate information schema",
282 "$schema": "http://json-schema.org/draft-04/schema#",
283 "type":"object",
284 "properties":{
285 "datacenter":{
286 "type":"object",
287 "properties":{
tierno8008c3a2016-10-13 15:34:28 +0000288 "vim_tenant": name_schema,
289 "vim_tenant_name": name_schema,
tierno7edb6752016-03-21 17:37:52 +0100290 "vim_username": nameshort_schema,
291 "vim_password": nameshort_schema,
tierno8008c3a2016-10-13 15:34:28 +0000292 "config": {"type": "object"}
tierno7edb6752016-03-21 17:37:52 +0100293 },
294# "required": ["vim_tenant"],
295 "additionalProperties": True
296 }
297 },
298 "required": ["datacenter"],
299 "additionalProperties": False
300}
301
garciadeblasfec35df2016-08-25 11:33:57 +0200302dhcp_schema = {
303 "title":"DHCP schema",
304 "$schema": "http://json-schema.org/draft-04/schema#",
305 "type":"object",
306 "properties":{
307 "enabled": {"type": "boolean"},
308 "start-address": ip_schema,
309 "count": integer1_schema
garciadeblas9f8456e2016-09-05 05:02:59 +0200310 },
311 "required": ["enabled", "start-address", "count"],
garciadeblasfec35df2016-08-25 11:33:57 +0200312}
313
314ip_profile_schema = {
315 "title":"IP profile schema",
316 "$schema": "http://json-schema.org/draft-04/schema#",
317 "type":"object",
318 "properties":{
tierno455612d2017-05-30 16:40:10 +0200319 "ip-version": {"type": "string", "enum": ["IPv4","IPv6"]},
garciadeblasfec35df2016-08-25 11:33:57 +0200320 "subnet-address": ip_prefix_schema,
321 "gateway-address": ip_schema,
tierno455612d2017-05-30 16:40:10 +0200322 "dns-address": {"oneOf": [ip_schema, # for backward compatibility
323 {"type": "array", "items": ip_schema}]},
garciadeblasfec35df2016-08-25 11:33:57 +0200324 "dhcp": dhcp_schema
325 },
326}
327
328key_pair_schema = {
329 "title": "Key-pair schema for cloud-init configuration schema",
330 "$schema": "http://json-schema.org/draft-04/schema#",
331 "type":"object",
332 "properties":{
333 "name": name_schema,
334 "key": {"type":"string"}
335 },
336 "required": ["key"],
337 "additionalProperties": False
338}
339
340cloud_config_user_schema = {
341 "title": "User schema for cloud-init configuration schema",
342 "$schema": "http://json-schema.org/draft-04/schema#",
343 "type":"object",
344 "properties":{
345 "name": nameshort_schema,
346 "user-info": {"type":"string"},
347 #"key-pairs": {"type" : "array", "items": key_pair_schema}
348 "key-pairs": {"type" : "array", "items": {"type":"string"}}
349 },
350 "required": ["name"],
351 "additionalProperties": False
352}
353
354cloud_config_schema = {
355 "title": "Cloud-init configuration schema",
356 "$schema": "http://json-schema.org/draft-04/schema#",
357 "type":"object",
358 "properties":{
359 #"key-pairs": {"type" : "array", "items": key_pair_schema},
360 "key-pairs": {"type" : "array", "items": {"type":"string"}},
361 "users": {"type" : "array", "items": cloud_config_user_schema}
362 },
363 "additionalProperties": False
364}
365
tierno7edb6752016-03-21 17:37:52 +0100366internal_connection_element_schema = {
367 "type":"object",
368 "properties":{
369 "VNFC": name_schema,
370 "local_iface_name": name_schema
371 }
372}
373
garciadeblasfec35df2016-08-25 11:33:57 +0200374internal_connection_element_schema_v02 = {
375 "type":"object",
376 "properties":{
377 "VNFC": name_schema,
378 "local_iface_name": name_schema,
garciadeblas0c317ee2016-08-29 12:33:06 +0200379 "ip_address": ip_schema
garciadeblasfec35df2016-08-25 11:33:57 +0200380 }
381}
382
tierno7edb6752016-03-21 17:37:52 +0100383internal_connection_schema = {
384 "type":"object",
385 "properties":{
386 "name": name_schema,
387 "description":description_schema,
388 "type":{"type":"string", "enum":["bridge","data","ptp"]},
tierno8e690322017-08-10 15:58:50 +0200389 "elements": {"type" : "array", "items": internal_connection_element_schema, "minItems":1}
tierno7edb6752016-03-21 17:37:52 +0100390 },
391 "required": ["name", "type", "elements"],
392 "additionalProperties": False
393}
394
garciadeblasfec35df2016-08-25 11:33:57 +0200395internal_connection_schema_v02 = {
396 "type":"object",
397 "properties":{
398 "name": name_schema,
399 "description":description_schema,
400 "type": {"type": "string", "enum":["e-line", "e-lan"]},
garciadeblas9f8456e2016-09-05 05:02:59 +0200401 "implementation": {"type": "string", "enum":["overlay", "underlay"]},
garciadeblasfec35df2016-08-25 11:33:57 +0200402 "ip-profile": ip_profile_schema,
tierno8e690322017-08-10 15:58:50 +0200403 "elements": {"type" : "array", "items": internal_connection_element_schema_v02, "minItems":1}
garciadeblasfec35df2016-08-25 11:33:57 +0200404 },
garciadeblas9f8456e2016-09-05 05:02:59 +0200405 "required": ["name", "type", "implementation", "elements"],
garciadeblasfec35df2016-08-25 11:33:57 +0200406 "additionalProperties": False
407}
408
tierno7edb6752016-03-21 17:37:52 +0100409external_connection_schema = {
410 "type":"object",
411 "properties":{
412 "name": name_schema,
413 "type":{"type":"string", "enum":["mgmt","bridge","data"]},
414 "VNFC": name_schema,
415 "local_iface_name": name_schema ,
416 "description":description_schema
417 },
418 "required": ["name", "type", "VNFC", "local_iface_name"],
419 "additionalProperties": False
420}
421
garciadeblas9f8456e2016-09-05 05:02:59 +0200422#Not yet used
garciadeblasfec35df2016-08-25 11:33:57 +0200423external_connection_schema_v02 = {
424 "type":"object",
425 "properties":{
426 "name": name_schema,
garciadeblas9f8456e2016-09-05 05:02:59 +0200427 "mgmt": {"type":"boolean"},
428 "type": {"type": "string", "enum":["e-line", "e-lan"]},
429 "implementation": {"type": "string", "enum":["overlay", "underlay"]},
garciadeblasfec35df2016-08-25 11:33:57 +0200430 "VNFC": name_schema,
431 "local_iface_name": name_schema ,
432 "description":description_schema
433 },
garciadeblas9f8456e2016-09-05 05:02:59 +0200434 "required": ["name", "type", "VNFC", "local_iface_name"],
garciadeblasfec35df2016-08-25 11:33:57 +0200435 "additionalProperties": False
436}
437
tierno7edb6752016-03-21 17:37:52 +0100438interfaces_schema={
439 "type":"array",
440 "items":{
441 "type":"object",
442 "properties":{
443 "name":name_schema,
444 "dedicated":{"type":"string","enum":["yes","no","yes:sriov"]},
445 "bandwidth":bandwidth_schema,
446 "vpci":pci_schema,
447 "mac_address": mac_schema
448 },
449 "additionalProperties": False,
450 "required": ["name","dedicated", "bandwidth"]
451 }
452}
453
454bridge_interfaces_schema={
455 "type":"array",
456 "items":{
457 "type":"object",
458 "properties":{
459 "name": name_schema,
460 "bandwidth":bandwidth_schema,
461 "vpci":pci_schema,
462 "mac_address": mac_schema,
montesmoreno2a1fc4e2017-01-09 16:46:04 +0000463 "model": {"type":"string", "enum":["virtio","e1000","ne2k_pci","pcnet","rtl8139"]},
464 "port-security": {"type" : "boolean"},
465 "floating-ip": {"type" : "boolean"}
tierno7edb6752016-03-21 17:37:52 +0100466 },
467 "additionalProperties": False,
468 "required": ["name"]
469 }
470}
471
472devices_schema={
473 "type":"array",
474 "items":{
475 "type":"object",
476 "properties":{
477 "type":{"type":"string", "enum":["disk","cdrom","xml"] },
478 "image": path_schema,
garciadeblasb69fa9f2016-09-28 12:04:10 +0200479 "image name": name_schema,
480 "image checksum": checksum_schema,
montesmoreno0c8def02016-12-22 12:16:23 +0000481 "image metadata": metadata_schema,
482 "size": size_schema,
tierno7edb6752016-03-21 17:37:52 +0100483 "vpci":pci_schema,
484 "xml":xml_text_schema,
485 },
486 "additionalProperties": False,
487 "required": ["type"]
488 }
489}
490
491
492numa_schema = {
493 "type": "object",
494 "properties": {
495 "memory":integer1_schema,
496 "cores":integer1_schema,
497 "paired-threads":integer1_schema,
498 "threads":integer1_schema,
499 "cores-id":{"type":"array","items":integer0_schema},
500 "paired-threads-id":{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":integer0_schema}},
501 "threads-id":{"type":"array","items":integer0_schema},
502 "interfaces":interfaces_schema
503 },
504 "additionalProperties": False,
505 #"required": ["memory"]
506}
507
tierno36c0b172017-01-12 18:32:28 +0100508config_files_schema = {
509 "title": "Config files for cloud init schema",
510 "$schema": "http://json-schema.org/draft-04/schema#",
511 "type": "object",
512 "properties": {
513 "dest": path_schema,
514 "encoding": {"type": "string", "enum": ["b64", "base64", "gz", "gz+b64", "gz+base64", "gzip+b64", "gzip+base64"]}, #by default text
515 "content": {"type": "string"},
516 "permissions": {"type": "string"}, # tiypically octal notation '0644'
517 "owner": {"type": "string"}, # format: owner:group
518
519 },
520 "additionalProperties": False,
521 "required": ["dest", "content"],
522}
523
524boot_data_vdu_schema = {
525 "title": "Boot data (Cloud-init) configuration schema",
526 "$schema": "http://json-schema.org/draft-04/schema#",
527 "type": "object",
528 "properties":{
529 "key-pairs": {"type" : "array", "items": {"type":"string"}},
530 "users": {"type" : "array", "items": cloud_config_user_schema},
531 "user-data": {"type" : "string"}, # scrip to run
532 "config-files": {"type": "array", "items": config_files_schema},
533 # NOTE: “user-data” are mutually exclusive with users and config-files because user/files are injected using user-data
534 "boot-data-drive": {"type": "boolean"},
535 },
536 "additionalProperties": False,
537}
538
tierno7edb6752016-03-21 17:37:52 +0100539vnfc_schema = {
540 "type":"object",
541 "properties":{
542 "name": name_schema,
543 "description": description_schema,
tierno8e690322017-08-10 15:58:50 +0200544 "count": integer1_schema,
garciadeblasb69fa9f2016-09-28 12:04:10 +0200545 "image name": name_schema,
mirabal29356312017-07-27 12:21:22 +0200546 "availability_zone": name_schema,
547 "VNFC image": {"oneOf": [path_schema, http_schema]},
garciadeblasb69fa9f2016-09-28 12:04:10 +0200548 "image checksum": checksum_schema,
gcalvinoe580c7d2017-09-22 14:09:51 +0200549 "image metadata": metadata_schema,
garciadeblasfec35df2016-08-25 11:33:57 +0200550 #"cloud-config": cloud_config_schema, #common for all vnfs in the scenario
tierno7edb6752016-03-21 17:37:52 +0100551 "processor": {
552 "type":"object",
553 "properties":{
554 "model":description_schema,
555 "features":{"type":"array","items":nameshort_schema}
556 },
557 "required": ["model"],
558 "additionalProperties": False
559 },
560 "hypervisor": {
561 "type":"object",
562 "properties":{
563 "type":nameshort_schema,
564 "version":description_schema
565 },
566 },
567 "ram":integer0_schema,
568 "vcpus":integer0_schema,
569 "disk": integer1_schema,
570 "numas": {
571 "type": "array",
garciadeblasfec35df2016-08-25 11:33:57 +0200572 "items": numa_schema
tierno7edb6752016-03-21 17:37:52 +0100573 },
574 "bridge-ifaces": bridge_interfaces_schema,
tierno36c0b172017-01-12 18:32:28 +0100575 "devices": devices_schema,
576 "boot-data" : boot_data_vdu_schema
garciadeblasfec35df2016-08-25 11:33:57 +0200577
tierno7edb6752016-03-21 17:37:52 +0100578 },
garciadeblasb69fa9f2016-09-28 12:04:10 +0200579 "required": ["name"],
580 "oneOf": [
581 {"required": ["VNFC image"]},
582 {"required": ["image name"]}
583 ],
tierno7edb6752016-03-21 17:37:52 +0100584 "additionalProperties": False
585}
586
587vnfd_schema_v01 = {
588 "title":"vnfd information schema v0.1",
589 "$schema": "http://json-schema.org/draft-04/schema#",
590 "type":"object",
591 "properties":{
592 "vnf":{
593 "type":"object",
594 "properties":{
595 "name": name_schema,
596 "description": description_schema,
mirabal29356312017-07-27 12:21:22 +0200597
tierno7edb6752016-03-21 17:37:52 +0100598 "class": nameshort_schema,
599 "public": {"type" : "boolean"},
600 "physical": {"type" : "boolean"},
gcalvinoe580c7d2017-09-22 14:09:51 +0200601 "default_user": name_schema,
tierno7edb6752016-03-21 17:37:52 +0100602 "tenant_id": id_schema, #only valid for admin
603 "external-connections": {"type" : "array", "items": external_connection_schema, "minItems":1},
604 "internal-connections": {"type" : "array", "items": internal_connection_schema, "minItems":1},
605 "VNFC":{"type" : "array", "items": vnfc_schema, "minItems":1}
606 },
607 "required": ["name","external-connections"],
608 "additionalProperties": True
609 }
610 },
611 "required": ["vnf"],
612 "additionalProperties": False
613}
614
gcalvinoe580c7d2017-09-22 14:09:51 +0200615#VNFD schema for OSM R1
tierno7edb6752016-03-21 17:37:52 +0100616vnfd_schema_v02 = {
617 "title":"vnfd information schema v0.2",
618 "$schema": "http://json-schema.org/draft-04/schema#",
619 "type":"object",
620 "properties":{
garciadeblasfec35df2016-08-25 11:33:57 +0200621 "schema_version": {"type": "string", "enum": ["0.2"]},
tierno7edb6752016-03-21 17:37:52 +0100622 "vnf":{
623 "type":"object",
624 "properties":{
625 "name": name_schema,
garciadeblasfec35df2016-08-25 11:33:57 +0200626 "description": description_schema,
627 "class": nameshort_schema,
628 "public": {"type" : "boolean"},
629 "physical": {"type" : "boolean"},
630 "tenant_id": id_schema, #only valid for admin
garciadeblas9f8456e2016-09-05 05:02:59 +0200631 "external-connections": {"type" : "array", "items": external_connection_schema, "minItems":1},
garciadeblasfec35df2016-08-25 11:33:57 +0200632 "internal-connections": {"type" : "array", "items": internal_connection_schema_v02, "minItems":1},
633 # "cloud-config": cloud_config_schema, #common for all vnfcs
634 "VNFC":{"type" : "array", "items": vnfc_schema, "minItems":1}
tierno7edb6752016-03-21 17:37:52 +0100635 },
636 "required": ["name"],
637 "additionalProperties": True
638 }
639 },
tierno392f2852016-05-13 12:28:55 +0200640 "required": ["vnf", "schema_version"],
tierno7edb6752016-03-21 17:37:52 +0100641 "additionalProperties": False
642}
643
644#vnfd_schema = vnfd_schema_v01
645#{
646# "title":"vnfd information schema v0.2",
647# "$schema": "http://json-schema.org/draft-04/schema#",
648# "oneOf": [vnfd_schema_v01, vnfd_schema_v02]
649#}
650
651graph_schema = {
652 "title":"graphical scenario descriptor information schema",
653 "$schema": "http://json-schema.org/draft-04/schema#",
654 "type":"object",
655 "properties":{
656 "x": integer0_schema,
657 "y": integer0_schema,
658 "ifaces": {
659 "type":"object",
660 "properties":{
661 "left": {"type":"array"},
662 "right": {"type":"array"},
663 "bottom": {"type":"array"},
664 }
665 }
666 },
667 "required": ["x","y"]
668}
669
670nsd_schema_v01 = {
671 "title":"network scenario descriptor information schema v0.1",
672 "$schema": "http://json-schema.org/draft-04/schema#",
673 "type":"object",
674 "properties":{
675 "name":name_schema,
676 "description": description_schema,
677 "tenant_id": id_schema, #only valid for admin
tierno392f2852016-05-13 12:28:55 +0200678 "public": {"type": "boolean"},
tierno7edb6752016-03-21 17:37:52 +0100679 "topology":{
680 "type":"object",
681 "properties":{
682 "nodes": {
683 "type":"object",
684 "patternProperties":{
685 ".": {
686 "type": "object",
687 "properties":{
688 "type":{"type":"string", "enum":["VNF", "other_network", "network", "external_network"]},
689 "vnf_id": id_schema,
690 "graph": graph_schema,
691 },
692 "patternProperties":{
693 "^(VNF )?model$": {"type": "string"}
694 },
695 "required": ["type"]
696 }
697 }
698 },
699 "connections": {
700 "type":"object",
701 "patternProperties":{
702 ".": {
703 "type": "object",
704 "properties":{
705 "nodes":{"oneOf":[{"type":"object", "minProperties":2}, {"type":"array", "minLength":1}]},
706 "type": {"type": "string", "enum":["link", "external_network", "dataplane_net", "bridge_net"]},
707 "graph": graph_schema
708 },
709 "required": ["nodes"]
710 },
711 }
712 }
713 },
714 "required": ["nodes"],
715 "additionalProperties": False
716 }
717 },
718 "required": ["name","topology"],
719 "additionalProperties": False
720}
721
tierno7edb6752016-03-21 17:37:52 +0100722nsd_schema_v02 = {
723 "title":"network scenario descriptor information schema v0.2",
724 "$schema": "http://json-schema.org/draft-04/schema#",
725 "type":"object",
726 "properties":{
garciadeblas0c317ee2016-08-29 12:33:06 +0200727 "schema_version": schema_version_2,
tierno392f2852016-05-13 12:28:55 +0200728 "scenario":{
tierno7edb6752016-03-21 17:37:52 +0100729 "type":"object",
tierno392f2852016-05-13 12:28:55 +0200730 "properties":{
garciadeblasfec35df2016-08-25 11:33:57 +0200731 "name": name_schema,
tierno392f2852016-05-13 12:28:55 +0200732 "description": description_schema,
733 "tenant_id": id_schema, #only valid for admin
734 "public": {"type": "boolean"},
735 "vnfs": {
736 "type":"object",
737 "patternProperties":{
738 ".": {
739 "type": "object",
740 "properties":{
741 "vnf_id": id_schema,
742 "graph": graph_schema,
743 "vnf_name": name_schema,
744 },
745 }
tierno7edb6752016-03-21 17:37:52 +0100746 },
tierno392f2852016-05-13 12:28:55 +0200747 "minProperties": 1
tierno7edb6752016-03-21 17:37:52 +0100748 },
tierno392f2852016-05-13 12:28:55 +0200749 "networks": {
750 "type":"object",
751 "patternProperties":{
752 ".": {
753 "type": "object",
754 "properties":{
755 "interfaces":{"type":"array", "minLength":1},
756 "type": {"type": "string", "enum":["dataplane", "bridge"]},
757 "external" : {"type": "boolean"},
758 "graph": graph_schema
759 },
760 "required": ["interfaces"]
761 },
762 }
763 },
764
765 },
garciadeblasfec35df2016-08-25 11:33:57 +0200766 "required": ["vnfs", "name"],
767 "additionalProperties": False
768 }
769 },
770 "required": ["scenario","schema_version"],
771 "additionalProperties": False
772}
773
774#NSD schema for OSM R1
775nsd_schema_v03 = {
776 "title":"network scenario descriptor information schema v0.3",
777 "$schema": "http://json-schema.org/draft-04/schema#",
778 "type":"object",
779 "properties":{
780 "schema_version": {"type": "string", "enum": ["0.3"]},
781 "scenario":{
782 "type":"object",
783 "properties":{
784 "name": name_schema,
785 "description": description_schema,
786 "tenant_id": id_schema, #only valid for admin
787 "public": {"type": "boolean"},
788 "cloud-config": cloud_config_schema, #common for all vnfs in the scenario
garciadeblas0c317ee2016-08-29 12:33:06 +0200789 #"datacenter": name_schema,
garciadeblasfec35df2016-08-25 11:33:57 +0200790 "vnfs": {
791 "type":"object",
792 "patternProperties":{
793 ".": {
794 "type": "object",
795 "properties":{
796 "vnf_id": id_schema,
797 "graph": graph_schema,
798 "vnf_name": name_schema,
garciadeblas0c317ee2016-08-29 12:33:06 +0200799 #"cloud-config": cloud_config_schema, #particular for a vnf
800 #"datacenter": name_schema,
garciadeblasfec35df2016-08-25 11:33:57 +0200801 "internal-connections": {
802 "type": "object",
803 "patternProperties": {
804 ".": {
805 "type": "object",
806 "properties": {
807 "ip-profile": ip_profile_schema,
808 "elements": {
809 "type" : "array",
810 "items":{
811 "type":"object",
812 "properties":{
813 "VNFC": name_schema,
814 "local_iface_name": name_schema,
garciadeblas0c317ee2016-08-29 12:33:06 +0200815 "ip_address": ip_schema
garciadeblasfec35df2016-08-25 11:33:57 +0200816 },
817 "required": ["VNFC", "local_iface_name"],
818 }
819 }
820 }
821 }
822 }
823 }
824 },
825 }
826 },
827 "minProperties": 1
828 },
829 "networks": {
830 "type":"object",
831 "patternProperties":{
832 ".": {
833 "type": "object",
834 "properties":{
835 "interfaces":{
836 "type":"array",
837 "minLength":1,
838 "items":{
839 "type":"object",
840 "properties":{
garciadeblas9f8456e2016-09-05 05:02:59 +0200841 "vnf": name_schema,
842 "vnf_interface": name_schema,
garciadeblas0c317ee2016-08-29 12:33:06 +0200843 "ip_address": ip_schema
garciadeblasfec35df2016-08-25 11:33:57 +0200844 },
garciadeblas9f8456e2016-09-05 05:02:59 +0200845 "required": ["vnf", "vnf_interface"],
garciadeblasfec35df2016-08-25 11:33:57 +0200846 }
847 },
848 "type": {"type": "string", "enum":["e-line", "e-lan"]},
garciadeblas9f8456e2016-09-05 05:02:59 +0200849 "implementation": {"type": "string", "enum":["overlay", "underlay"]},
garciadeblasfec35df2016-08-25 11:33:57 +0200850 "external" : {"type": "boolean"},
851 "graph": graph_schema,
852 "ip-profile": ip_profile_schema
853 },
854 "required": ["interfaces"]
855 },
856 }
857 },
858
859 },
tierno392f2852016-05-13 12:28:55 +0200860 "required": ["vnfs", "networks","name"],
861 "additionalProperties": False
862 }
tierno7edb6752016-03-21 17:37:52 +0100863 },
tierno392f2852016-05-13 12:28:55 +0200864 "required": ["scenario","schema_version"],
tierno7edb6752016-03-21 17:37:52 +0100865 "additionalProperties": False
866}
867
868#scenario_new_schema = {
869# "title":"new scenario information schema",
870# "$schema": "http://json-schema.org/draft-04/schema#",
871# #"oneOf": [nsd_schema_v01, nsd_schema_v02]
872# "oneOf": [nsd_schema_v01]
873#}
874
875scenario_edit_schema = {
876 "title":"edit scenario information schema",
877 "$schema": "http://json-schema.org/draft-04/schema#",
878 "type":"object",
879 "properties":{
880 "name":name_schema,
881 "description": description_schema,
882 "topology":{
883 "type":"object",
884 "properties":{
885 "nodes": {
886 "type":"object",
887 "patternProperties":{
888 "^[a-fA-F0-9]{8}(-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}$": {
889 "type":"object",
890 "properties":{
891 "graph":{
892 "type": "object",
893 "properties":{
894 "x": integer0_schema,
895 "y": integer0_schema,
896 "ifaces":{ "type": "object"}
897 }
898 },
899 "description": description_schema,
900 "name": name_schema
901 }
902 }
903 }
904 }
905 },
906 "required": ["nodes"],
907 "additionalProperties": False
908 }
909 },
910 "additionalProperties": False
911}
912
913scenario_action_schema = {
914 "title":"scenario action information schema",
915 "$schema": "http://json-schema.org/draft-04/schema#",
916 "type":"object",
917 "properties":{
918 "start":{
919 "type": "object",
920 "properties": {
921 "instance_name":name_schema,
922 "description":description_schema,
923 "datacenter": {"type": "string"}
924 },
925 "required": ["instance_name"]
926 },
927 "deploy":{
928 "type": "object",
929 "properties": {
930 "instance_name":name_schema,
931 "description":description_schema,
932 "datacenter": {"type": "string"}
933 },
934 "required": ["instance_name"]
935 },
936 "reserve":{
937 "type": "object",
938 "properties": {
939 "instance_name":name_schema,
940 "description":description_schema,
941 "datacenter": {"type": "string"}
942 },
943 "required": ["instance_name"]
944 },
945 "verify":{
946 "type": "object",
947 "properties": {
948 "instance_name":name_schema,
949 "description":description_schema,
950 "datacenter": {"type": "string"}
951 },
952 "required": ["instance_name"]
953 }
954 },
955 "minProperties": 1,
956 "maxProperties": 1,
957 "additionalProperties": False
958}
959
garciadeblasfec35df2016-08-25 11:33:57 +0200960instance_scenario_create_schema_v01 = {
tierno7edb6752016-03-21 17:37:52 +0100961 "title":"instance scenario create information schema v0.1",
962 "$schema": "http://json-schema.org/draft-04/schema#",
963 "type":"object",
964 "properties":{
965 "schema_version": {"type": "string", "enum": ["0.1"]},
966 "instance":{
967 "type":"object",
968 "properties":{
969 "name":name_schema,
970 "description":description_schema,
garciadeblas0c317ee2016-08-29 12:33:06 +0200971 "datacenter": name_schema,
972 "scenario" : name_schema, #can be an UUID or name
tierno7edb6752016-03-21 17:37:52 +0100973 "action":{"enum": ["deploy","reserve","verify" ]},
garciadeblasfec35df2016-08-25 11:33:57 +0200974 "connect_mgmt_interfaces": {"oneOf": [{"type":"boolean"}, {"type":"object"}]},# can be true or a dict with datacenter: net_name
975 "cloud-config": cloud_config_schema, #common to all vnfs in the instance scenario
tierno7edb6752016-03-21 17:37:52 +0100976 "vnfs":{ #mapping from scenario to datacenter
977 "type": "object",
978 "patternProperties":{
979 ".": {
980 "type": "object",
981 "properties":{
garciadeblasfec35df2016-08-25 11:33:57 +0200982 "name": name_schema, #override vnf name
garciadeblas0c317ee2016-08-29 12:33:06 +0200983 "datacenter": name_schema,
garciadeblasfec35df2016-08-25 11:33:57 +0200984 #"metadata": {"type": "object"},
985 #"user_data": {"type": "string"}
garciadeblas0c317ee2016-08-29 12:33:06 +0200986 #"cloud-config": cloud_config_schema, #particular for a vnf
garciadeblasfec35df2016-08-25 11:33:57 +0200987 "external-connections": {
988 "type": "object",
989 "patternProperties": {
990 ".": {
991 "type": "object",
992 "properties": {
993 "vim-network-name": name_schema,
garciadeblas0c317ee2016-08-29 12:33:06 +0200994 "ip_address": ip_schema
garciadeblasfec35df2016-08-25 11:33:57 +0200995 }
996 }
997 }
998 },
999 "internal-connections": {
1000 "type": "object",
1001 "patternProperties": {
1002 ".": {
1003 "type": "object",
1004 "properties": {
1005 "ip-profile": ip_profile_schema,
1006 "elements": {
1007 "type" : "array",
1008 "items":{
1009 "type":"object",
1010 "properties":{
1011 "VNFC": name_schema,
1012 "local_iface_name": name_schema,
garciadeblas0c317ee2016-08-29 12:33:06 +02001013 "ip_address": ip_schema
garciadeblasfec35df2016-08-25 11:33:57 +02001014 },
1015 "required": ["VNFC", "local_iface_name"],
1016 }
1017 }
1018 }
1019 }
1020 }
1021 }
tierno7edb6752016-03-21 17:37:52 +01001022 }
1023 }
1024 },
1025 },
1026 "networks":{ #mapping from scenario to datacenter
1027 "type": "object",
1028 "patternProperties":{
1029 ".": {
1030 "type": "object",
1031 "properties":{
garciadeblasfec35df2016-08-25 11:33:57 +02001032 "interfaces":{
1033 "type":"array",
1034 "minLength":1,
1035 "items":{
1036 "type":"object",
1037 "properties":{
garciadeblas9f8456e2016-09-05 05:02:59 +02001038 "ip_address": ip_schema,
1039 "datacenter": name_schema,
1040 "vim-network-name": name_schema
garciadeblasfec35df2016-08-25 11:33:57 +02001041 },
1042 "patternProperties":{
1043 ".": {"type": "string"}
1044 }
1045 }
1046 },
garciadeblasfec35df2016-08-25 11:33:57 +02001047 "ip-profile": ip_profile_schema,
tiernobe41e222016-09-02 15:16:13 +02001048 #if the network connects VNFs deployed at different sites, you must specify one entry per site that this network connect to
1049 "sites": {
1050 "type":"array",
1051 "minLength":1,
1052 "items":{
1053 "type":"object",
1054 "properties":{
1055 # By default for an scenario 'external' network openmano looks for an existing VIM network to map this external scenario network,
1056 # for other networks openamno creates at VIM
1057 # Use netmap-create to force to create an external scenario network
1058 "netmap-create": {"oneOf":[name_schema,{"type": "null"}]}, #datacenter network to use. Null if must be created as an internal net
1059 #netmap-use: Indicates an existing VIM network that must be used for this scenario network.
1060 #Can use both the VIM network name (if it is not ambiguous) or the VIM net UUID
1061 #If both 'netmap-create' and 'netmap-use'are supplied, netmap-use precedes, but if fails openmano follows the netmap-create
1062 #In oder words, it is the same as 'try to map to the VIM network (netmap-use) if exist, and if not create the network (netmap-create)
1063 "netmap-use": name_schema, #
1064 "vim-network-name": name_schema, #override network name
1065 #"ip-profile": ip_profile_schema,
1066 "datacenter": name_schema,
1067 }
1068 }
1069 },
1070
1071
1072
tierno7edb6752016-03-21 17:37:52 +01001073 }
1074 }
1075 },
1076 },
1077 },
1078 "additionalProperties": False,
garciadeblasfec35df2016-08-25 11:33:57 +02001079 "required": ["name"]
tierno7edb6752016-03-21 17:37:52 +01001080 },
1081 },
1082 "required": ["instance"],
1083 "additionalProperties": False
tierno7edb6752016-03-21 17:37:52 +01001084}
1085
1086instance_scenario_action_schema = {
1087 "title":"instance scenario action information schema",
1088 "$schema": "http://json-schema.org/draft-04/schema#",
1089 "type":"object",
1090 "properties":{
1091 "start":{"type": "null"},
1092 "pause":{"type": "null"},
1093 "resume":{"type": "null"},
1094 "shutoff":{"type": "null"},
1095 "shutdown":{"type": "null"},
1096 "forceOff":{"type": "null"},
1097 "rebuild":{"type": "null"},
1098 "reboot":{
1099 "type": ["object","null"],
1100 },
gcalvinoe580c7d2017-09-22 14:09:51 +02001101 "add_public_key": description_schema,
tierno7edb6752016-03-21 17:37:52 +01001102 "console": {"type": ["string", "null"], "enum": ["novnc", "xvpvnc", "rdp-html5", "spice-html5", None]},
tierno868220c2017-09-26 00:11:05 +02001103 "create-vdu": {
gcalvinoe580c7d2017-09-22 14:09:51 +02001104 "type": "array",
tierno868220c2017-09-26 00:11:05 +02001105 "items" :{
1106 "type": "object",
1107 "properties":{
1108 "vdu-id": id_schema,
1109 "count": integer1_schema,
1110 },
1111 "additionalProperties": False,
1112 "required": ["vdu-id"]
1113 }
1114 },
1115 "delete-vdu": {
gcalvinoe580c7d2017-09-22 14:09:51 +02001116 "type": "array",
tierno868220c2017-09-26 00:11:05 +02001117 "items" :{
1118 "type": "object",
1119 "properties":{
1120 "vdu-id": id_schema,
1121 "transaction-id": id_schema,
1122 },
1123 "additionalProperties": False,
1124 "minProperties": 1,
1125 "maxProperties": 1,
1126 }
1127 },
tierno7edb6752016-03-21 17:37:52 +01001128 "vnfs":{"type": "array", "items":{"type":"string"}},
1129 "vms":{"type": "array", "items":{"type":"string"}}
1130 },
1131 "minProperties": 1,
1132 #"maxProperties": 1,
1133 "additionalProperties": False
1134}
Pablo Montes Moreno3fbff9b2017-03-08 11:28:15 +01001135
1136sdn_controller_properties={
1137 "name": name_schema,
Pablo Montes Moreno6aa0b2b2017-05-23 18:33:12 +02001138 "dpid": {"type":"string", "pattern":"^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){7}$"},
Pablo Montes Moreno3fbff9b2017-03-08 11:28:15 +01001139 "ip": ip_schema,
1140 "port": port_schema,
1141 "type": {"type": "string", "enum": ["opendaylight","floodlight","onos"]},
1142 "version": {"type" : "string", "minLength":1, "maxLength":12},
1143 "user": nameshort_schema,
1144 "password": passwd_schema
1145}
1146sdn_controller_schema = {
1147 "title":"sdn controller information schema",
1148 "$schema": "http://json-schema.org/draft-04/schema#",
1149 "type":"object",
1150 "properties":{
1151 "sdn_controller":{
1152 "type":"object",
1153 "properties":sdn_controller_properties,
1154 "required": ["name", "port", 'ip', 'dpid', 'type'],
1155 "additionalProperties": False
1156 }
1157 },
1158 "required": ["sdn_controller"],
1159 "additionalProperties": False
1160}
1161
1162sdn_controller_edit_schema = {
1163 "title":"sdn controller update information schema",
1164 "$schema": "http://json-schema.org/draft-04/schema#",
1165 "type":"object",
1166 "properties":{
1167 "sdn_controller":{
1168 "type":"object",
1169 "properties":sdn_controller_properties,
1170 "additionalProperties": False
1171 }
1172 },
1173 "required": ["sdn_controller"],
1174 "additionalProperties": False
1175}
1176
1177sdn_port_mapping_schema = {
1178 "$schema": "http://json-schema.org/draft-04/schema#",
1179 "title":"sdn port mapping information schema",
1180 "type": "object",
1181 "properties": {
1182 "sdn_port_mapping": {
1183 "type": "array",
1184 "items": {
1185 "type": "object",
1186 "properties": {
1187 "compute_node": nameshort_schema,
1188 "ports": {
1189 "type": "array",
1190 "items": {
1191 "type": "object",
1192 "properties": {
1193 "pci": pci_schema,
1194 "switch_port": nameshort_schema,
1195 "switch_mac": mac_schema
1196 },
1197 "required": ["pci"]
1198 }
1199 }
1200 },
1201 "required": ["compute_node", "ports"]
1202 }
1203 }
1204 },
1205 "required": ["sdn_port_mapping"]
Pablo Montes Moreno6aa0b2b2017-05-23 18:33:12 +02001206}
1207
1208sdn_external_port_schema = {
1209 "$schema": "http://json-schema.org/draft-04/schema#",
1210 "title":"External port ingformation",
1211 "type": "object",
1212 "properties": {
1213 "port": {"type" : "string", "minLength":1, "maxLength":60},
1214 "vlan": vlan_schema,
1215 "mac": mac_schema
1216 },
1217 "required": ["port"]
Pablo Montes Moreno3fbff9b2017-03-08 11:28:15 +01001218}