1 # -*- coding: utf-8 -*-
4 # Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U.
5 # This file is part of openmano
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
12 # http://www.apache.org/licenses/LICENSE-2.0
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
20 # For those usages not covered by the Apache License, Version 2.0 please
21 # contact with: nfvlabs@tid.es
25 JSON schemas used by openmano httpserver.py module to parse the different files and messages sent through the API
27 __author__
="Alfonso Tierno, Gerardo Garcia, Pablo Montes"
28 __date__
="$09-oct-2014 09:09:48$"
31 patern_name
="^[ -~]+$"
32 passwd_schema
={"type" : "string", "minLength":1, "maxLength":60}
33 nameshort_schema
={"type" : "string", "minLength":1, "maxLength":60, "pattern" : "^[^,;()'\"]+$"}
34 name_schema
={"type" : "string", "minLength":1, "maxLength":255, "pattern" : "^[^,;()'\"]+$"}
35 xml_text_schema
={"type" : "string", "minLength":1, "maxLength":1000, "pattern" : "^[^']+$"}
36 description_schema
={"type" : ["string","null"], "maxLength":255, "pattern" : "^[^'\"]+$"}
37 id_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}$"
38 id_schema
= {"type" : "string", "pattern": "^[a-fA-F0-9]{8}(-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}$"}
39 pci_schema
={"type":"string", "pattern":"^[0-9a-fA-F]{4}(:[0-9a-fA-F]{2}){2}\.[0-9a-fA-F]$"}
40 http_schema
={"type":"string", "pattern":"^https?://[^'\"=]+$"}
41 bandwidth_schema
={"type":"string", "pattern" : "^[0-9]+ *([MG]bps)?$"}
42 memory_schema
={"type":"string", "pattern" : "^[0-9]+ *([MG]i?[Bb])?$"}
43 integer0_schema
={"type":"integer","minimum":0}
44 integer1_schema
={"type":"integer","minimum":1}
45 path_schema
={"type":"string", "pattern":"^(\.){0,2}(/[^/\"':{}\(\)]+)+$"}
46 vlan_schema
={"type":"integer","minimum":1,"maximum":4095}
47 vlan1000_schema
={"type":"integer","minimum":1000,"maximum":4095}
48 mac_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}$"}
50 ip_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]?)$"}
51 ip_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])$"}
52 port_schema
={"type":"integer","minimum":1,"maximum":65534}
53 object_schema
={"type":"object"}
54 schema_version_2
={"type":"integer","minimum":2,"maximum":2}
55 #schema_version_string={"type":"string","enum": ["0.1", "2", "0.2", "3", "0.3"]}
56 log_level_schema
={"type":"string", "enum":["DEBUG", "INFO", "WARNING","ERROR","CRITICAL"]}
57 checksum_schema
={"type":"string", "pattern":"^[0-9a-fA-F]{32}$"}
58 size_schema
={"type":"integer","minimum":1,"maximum":100}
63 "architecture": {"type":"string"},
64 "use_incremental": {"type":"string","enum":["yes","no"]},
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"]}
74 #Schema for the configuration file
76 "title":"configuration response information schema",
77 "$schema": "http://json-schema.org/draft-04/schema#",
80 "http_port": port_schema
,
81 "http_admin_port": port_schema
,
82 "http_host": nameshort_schema
,
83 "vnf_repository": path_schema
,
84 "db_host": nameshort_schema
,
85 "db_user": nameshort_schema
,
86 "db_passwd": {"type":"string"},
87 "db_name": nameshort_schema
,
88 # Next fields will disappear once the MANO API includes appropriate primitives
89 "vim_url": http_schema
,
90 "vim_url_admin": http_schema
,
91 "vim_name": nameshort_schema
,
92 "vim_tenant_name": nameshort_schema
,
93 "mano_tenant_name": nameshort_schema
,
94 "mano_tenant_id": id_schema
,
95 "http_console_proxy": {"type":"boolean"},
96 "http_console_host": nameshort_schema
,
97 "http_console_ports": {
101 {"type":"object", "properties":{"from": port_schema
, "to": port_schema
}, "required": ["from","to"]}
104 "log_level": log_level_schema
,
105 "log_socket_level": log_level_schema
,
106 "log_level_db": log_level_schema
,
107 "log_level_vim": log_level_schema
,
108 "log_level_nfvo": log_level_schema
,
109 "log_level_http": log_level_schema
,
110 "log_level_console": log_level_schema
,
111 "log_file_db": path_schema
,
112 "log_file_vim": path_schema
,
113 "log_file_nfvo": path_schema
,
114 "log_file_http": path_schema
,
115 "log_file_console": path_schema
,
116 "log_socket_host": nameshort_schema
,
117 "log_socket_port": port_schema
,
118 "log_file": path_schema
,
120 "required": ['db_host', 'db_user', 'db_passwd', 'db_name'],
121 "additionalProperties": False
125 "title":"tenant information schema",
126 "$schema": "http://json-schema.org/draft-04/schema#",
132 "name": nameshort_schema
,
133 "description": description_schema
,
135 "required": ["name"],
136 "additionalProperties": True
139 "required": ["tenant"],
140 "additionalProperties": False
143 tenant_edit_schema
= {
144 "title":"tenant edit information schema",
145 "$schema": "http://json-schema.org/draft-04/schema#",
152 "description": description_schema
,
154 "additionalProperties": False
157 "required": ["tenant"],
158 "additionalProperties": False
161 datacenter_schema_properties
={
163 "description": description_schema
,
164 "type": nameshort_schema
, #currently "openvim" or "openstack", can be enlarged with plugins
165 "vim_url": description_schema
,
166 "vim_url_admin": description_schema
,
167 "config": { "type":"object" }
170 datacenter_schema
= {
171 "title":"datacenter information schema",
172 "$schema": "http://json-schema.org/draft-04/schema#",
177 "properties":datacenter_schema_properties
,
178 "required": ["name", "vim_url"],
179 "additionalProperties": True
182 "required": ["datacenter"],
183 "additionalProperties": False
187 datacenter_edit_schema
= {
188 "title":"datacenter edit nformation schema",
189 "$schema": "http://json-schema.org/draft-04/schema#",
194 "properties":datacenter_schema_properties
,
195 "additionalProperties": False
198 "required": ["datacenter"],
199 "additionalProperties": False
203 netmap_new_schema
= {
204 "title":"netmap new information schema",
205 "$schema": "http://json-schema.org/draft-04/schema#",
208 "netmap":{ #delete from datacenter
211 "name": name_schema
, #name or uuid of net to change
213 "vim_name": name_schema
216 "additionalProperties": False
219 "required": ["netmap"],
220 "additionalProperties": False
223 netmap_edit_schema
= {
224 "title":"netmap edit information schema",
225 "$schema": "http://json-schema.org/draft-04/schema#",
228 "netmap":{ #delete from datacenter
231 "name": name_schema
, #name or uuid of net to change
234 "additionalProperties": False
237 "required": ["netmap"],
238 "additionalProperties": False
241 datacenter_action_schema
= {
242 "title":"datacenter action information schema",
243 "$schema": "http://json-schema.org/draft-04/schema#",
246 "net-update":{"type":"null",},
250 "net": name_schema
, #name or uuid of net to change
252 "description": description_schema
,
253 "shared": {"type": "boolean"}
256 "additionalProperties": False
261 "net": name_schema
, #name or uuid of net to change
264 "additionalProperties": False
269 "additionalProperties": False
273 datacenter_associate_schema
={
274 "title":"datacenter associate information schema",
275 "$schema": "http://json-schema.org/draft-04/schema#",
281 "vim_tenant": name_schema
,
282 "vim_tenant_name": name_schema
,
283 "vim_username": nameshort_schema
,
284 "vim_password": nameshort_schema
,
285 "config": {"type": "object"}
287 # "required": ["vim_tenant"],
288 "additionalProperties": True
291 "required": ["datacenter"],
292 "additionalProperties": False
296 "title":"DHCP schema",
297 "$schema": "http://json-schema.org/draft-04/schema#",
300 "enabled": {"type": "boolean"},
301 "start-address": ip_schema
,
302 "count": integer1_schema
304 "required": ["enabled", "start-address", "count"],
307 ip_profile_schema
= {
308 "title":"IP profile schema",
309 "$schema": "http://json-schema.org/draft-04/schema#",
312 "ip-version": {"type":"string", "enum":["IPv4","IPv6"]},
313 "subnet-address": ip_prefix_schema
,
314 "gateway-address": ip_schema
,
315 "dns-address": ip_schema
,
321 "title": "Key-pair schema for cloud-init configuration schema",
322 "$schema": "http://json-schema.org/draft-04/schema#",
326 "key": {"type":"string"}
329 "additionalProperties": False
332 cloud_config_user_schema
= {
333 "title": "User schema for cloud-init configuration schema",
334 "$schema": "http://json-schema.org/draft-04/schema#",
337 "name": nameshort_schema
,
338 "user-info": {"type":"string"},
339 #"key-pairs": {"type" : "array", "items": key_pair_schema}
340 "key-pairs": {"type" : "array", "items": {"type":"string"}}
342 "required": ["name"],
343 "additionalProperties": False
346 cloud_config_schema
= {
347 "title": "Cloud-init configuration schema",
348 "$schema": "http://json-schema.org/draft-04/schema#",
351 #"key-pairs": {"type" : "array", "items": key_pair_schema},
352 "key-pairs": {"type" : "array", "items": {"type":"string"}},
353 "users": {"type" : "array", "items": cloud_config_user_schema
}
355 "additionalProperties": False
358 internal_connection_element_schema
= {
362 "local_iface_name": name_schema
366 internal_connection_element_schema_v02
= {
370 "local_iface_name": name_schema
,
371 "ip_address": ip_schema
375 internal_connection_schema
= {
379 "description":description_schema
,
380 "type":{"type":"string", "enum":["bridge","data","ptp"]},
381 "elements": {"type" : "array", "items": internal_connection_element_schema
, "minItems":2}
383 "required": ["name", "type", "elements"],
384 "additionalProperties": False
387 internal_connection_schema_v02
= {
391 "description":description_schema
,
392 "type": {"type": "string", "enum":["e-line", "e-lan"]},
393 "implementation": {"type": "string", "enum":["overlay", "underlay"]},
394 "ip-profile": ip_profile_schema
,
395 "elements": {"type" : "array", "items": internal_connection_element_schema_v02
, "minItems":2}
397 "required": ["name", "type", "implementation", "elements"],
398 "additionalProperties": False
401 external_connection_schema
= {
405 "type":{"type":"string", "enum":["mgmt","bridge","data"]},
407 "local_iface_name": name_schema
,
408 "description":description_schema
410 "required": ["name", "type", "VNFC", "local_iface_name"],
411 "additionalProperties": False
415 external_connection_schema_v02
= {
419 "mgmt": {"type":"boolean"},
420 "type": {"type": "string", "enum":["e-line", "e-lan"]},
421 "implementation": {"type": "string", "enum":["overlay", "underlay"]},
423 "local_iface_name": name_schema
,
424 "description":description_schema
426 "required": ["name", "type", "VNFC", "local_iface_name"],
427 "additionalProperties": False
436 "dedicated":{"type":"string","enum":["yes","no","yes:sriov"]},
437 "bandwidth":bandwidth_schema
,
439 "mac_address": mac_schema
441 "additionalProperties": False,
442 "required": ["name","dedicated", "bandwidth"]
446 bridge_interfaces_schema
={
452 "bandwidth":bandwidth_schema
,
454 "mac_address": mac_schema
,
455 "model": {"type":"string", "enum":["virtio","e1000","ne2k_pci","pcnet","rtl8139"]},
456 "port-security": {"type" : "boolean"},
457 "floating-ip": {"type" : "boolean"}
459 "additionalProperties": False,
469 "type":{"type":"string", "enum":["disk","cdrom","xml"] },
470 "image": path_schema
,
471 "image name": name_schema
,
472 "image checksum": checksum_schema
,
473 "image metadata": metadata_schema
,
476 "xml":xml_text_schema
,
478 "additionalProperties": False,
487 "memory":integer1_schema
,
488 "cores":integer1_schema
,
489 "paired-threads":integer1_schema
,
490 "threads":integer1_schema
,
491 "cores-id":{"type":"array","items":integer0_schema
},
492 "paired-threads-id":{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":integer0_schema
}},
493 "threads-id":{"type":"array","items":integer0_schema
},
494 "interfaces":interfaces_schema
496 "additionalProperties": False,
497 #"required": ["memory"]
500 config_files_schema
= {
501 "title": "Config files for cloud init schema",
502 "$schema": "http://json-schema.org/draft-04/schema#",
506 "encoding": {"type": "string", "enum": ["b64", "base64", "gz", "gz+b64", "gz+base64", "gzip+b64", "gzip+base64"]}, #by default text
507 "content": {"type": "string"},
508 "permissions": {"type": "string"}, # tiypically octal notation '0644'
509 "owner": {"type": "string"}, # format: owner:group
512 "additionalProperties": False,
513 "required": ["dest", "content"],
516 boot_data_vdu_schema
= {
517 "title": "Boot data (Cloud-init) configuration schema",
518 "$schema": "http://json-schema.org/draft-04/schema#",
521 "key-pairs": {"type" : "array", "items": {"type":"string"}},
522 "users": {"type" : "array", "items": cloud_config_user_schema
},
523 "user-data": {"type" : "string"}, # scrip to run
524 "config-files": {"type": "array", "items": config_files_schema
},
525 # NOTE: “user-data” are mutually exclusive with users and config-files because user/files are injected using user-data
526 "boot-data-drive": {"type": "boolean"},
528 "additionalProperties": False,
535 "description": description_schema
,
536 "VNFC image": {"oneOf": [path_schema
, http_schema
]},
537 "image name": name_schema
,
538 "image checksum": checksum_schema
,
539 "image metadata": metadata_schema
,
540 #"cloud-config": cloud_config_schema, #common for all vnfs in the scenario
544 "model":description_schema
,
545 "features":{"type":"array","items":nameshort_schema
}
547 "required": ["model"],
548 "additionalProperties": False
553 "type":nameshort_schema
,
554 "version":description_schema
557 "ram":integer0_schema
,
558 "vcpus":integer0_schema
,
559 "disk": integer1_schema
,
564 "bridge-ifaces": bridge_interfaces_schema
,
565 "devices": devices_schema
,
566 "boot-data" : boot_data_vdu_schema
569 "required": ["name"],
571 {"required": ["VNFC image"]},
572 {"required": ["image name"]}
574 "additionalProperties": False
578 "title":"vnfd information schema v0.1",
579 "$schema": "http://json-schema.org/draft-04/schema#",
586 "description": description_schema
,
587 "class": nameshort_schema
,
588 "public": {"type" : "boolean"},
589 "physical": {"type" : "boolean"},
590 "tenant_id": id_schema
, #only valid for admin
591 "external-connections": {"type" : "array", "items": external_connection_schema
, "minItems":1},
592 "internal-connections": {"type" : "array", "items": internal_connection_schema
, "minItems":1},
593 "VNFC":{"type" : "array", "items": vnfc_schema
, "minItems":1}
595 "required": ["name","external-connections"],
596 "additionalProperties": True
600 "additionalProperties": False
603 #VNFD schema for OSM R1
605 "title":"vnfd information schema v0.2",
606 "$schema": "http://json-schema.org/draft-04/schema#",
609 "schema_version": {"type": "string", "enum": ["0.2"]},
614 "description": description_schema
,
615 "class": nameshort_schema
,
616 "public": {"type" : "boolean"},
617 "physical": {"type" : "boolean"},
618 "tenant_id": id_schema
, #only valid for admin
619 "external-connections": {"type" : "array", "items": external_connection_schema
, "minItems":1},
620 "internal-connections": {"type" : "array", "items": internal_connection_schema_v02
, "minItems":1},
621 # "cloud-config": cloud_config_schema, #common for all vnfcs
622 "VNFC":{"type" : "array", "items": vnfc_schema
, "minItems":1}
624 "required": ["name"],
625 "additionalProperties": True
628 "required": ["vnf", "schema_version"],
629 "additionalProperties": False
632 #vnfd_schema = vnfd_schema_v01
634 # "title":"vnfd information schema v0.2",
635 # "$schema": "http://json-schema.org/draft-04/schema#",
636 # "oneOf": [vnfd_schema_v01, vnfd_schema_v02]
640 "title":"graphical scenario descriptor information schema",
641 "$schema": "http://json-schema.org/draft-04/schema#",
644 "x": integer0_schema
,
645 "y": integer0_schema
,
649 "left": {"type":"array"},
650 "right": {"type":"array"},
651 "bottom": {"type":"array"},
655 "required": ["x","y"]
659 "title":"network scenario descriptor information schema v0.1",
660 "$schema": "http://json-schema.org/draft-04/schema#",
664 "description": description_schema
,
665 "tenant_id": id_schema
, #only valid for admin
666 "public": {"type": "boolean"},
672 "patternProperties":{
676 "type":{"type":"string", "enum":["VNF", "other_network", "network", "external_network"]},
678 "graph": graph_schema
,
680 "patternProperties":{
681 "^(VNF )?model$": {"type": "string"}
689 "patternProperties":{
693 "nodes":{"oneOf":[{"type":"object", "minProperties":2}, {"type":"array", "minLength":1}]},
694 "type": {"type": "string", "enum":["link", "external_network", "dataplane_net", "bridge_net"]},
695 "graph": graph_schema
697 "required": ["nodes"]
702 "required": ["nodes"],
703 "additionalProperties": False
706 "required": ["name","topology"],
707 "additionalProperties": False
711 "title":"network scenario descriptor information schema v0.2",
712 "$schema": "http://json-schema.org/draft-04/schema#",
715 "schema_version": schema_version_2
,
720 "description": description_schema
,
721 "tenant_id": id_schema
, #only valid for admin
722 "public": {"type": "boolean"},
725 "patternProperties":{
730 "graph": graph_schema
,
731 "vnf_name": name_schema
,
739 "patternProperties":{
743 "interfaces":{"type":"array", "minLength":1},
744 "type": {"type": "string", "enum":["dataplane", "bridge"]},
745 "external" : {"type": "boolean"},
746 "graph": graph_schema
748 "required": ["interfaces"]
754 "required": ["vnfs", "name"],
755 "additionalProperties": False
758 "required": ["scenario","schema_version"],
759 "additionalProperties": False
762 #NSD schema for OSM R1
764 "title":"network scenario descriptor information schema v0.3",
765 "$schema": "http://json-schema.org/draft-04/schema#",
768 "schema_version": {"type": "string", "enum": ["0.3"]},
773 "description": description_schema
,
774 "tenant_id": id_schema
, #only valid for admin
775 "public": {"type": "boolean"},
776 "cloud-config": cloud_config_schema
, #common for all vnfs in the scenario
777 #"datacenter": name_schema,
780 "patternProperties":{
785 "graph": graph_schema
,
786 "vnf_name": name_schema
,
787 #"cloud-config": cloud_config_schema, #particular for a vnf
788 #"datacenter": name_schema,
789 "internal-connections": {
791 "patternProperties": {
795 "ip-profile": ip_profile_schema
,
802 "local_iface_name": name_schema
,
803 "ip_address": ip_schema
805 "required": ["VNFC", "local_iface_name"],
819 "patternProperties":{
830 "vnf_interface": name_schema
,
831 "ip_address": ip_schema
833 "required": ["vnf", "vnf_interface"],
836 "type": {"type": "string", "enum":["e-line", "e-lan"]},
837 "implementation": {"type": "string", "enum":["overlay", "underlay"]},
838 "external" : {"type": "boolean"},
839 "graph": graph_schema
,
840 "ip-profile": ip_profile_schema
842 "required": ["interfaces"]
848 "required": ["vnfs", "networks","name"],
849 "additionalProperties": False
852 "required": ["scenario","schema_version"],
853 "additionalProperties": False
856 #scenario_new_schema = {
857 # "title":"new scenario information schema",
858 # "$schema": "http://json-schema.org/draft-04/schema#",
859 # #"oneOf": [nsd_schema_v01, nsd_schema_v02]
860 # "oneOf": [nsd_schema_v01]
863 scenario_edit_schema
= {
864 "title":"edit scenario information schema",
865 "$schema": "http://json-schema.org/draft-04/schema#",
869 "description": description_schema
,
875 "patternProperties":{
876 "^[a-fA-F0-9]{8}(-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}$": {
882 "x": integer0_schema
,
883 "y": integer0_schema
,
884 "ifaces":{ "type": "object"}
887 "description": description_schema
,
894 "required": ["nodes"],
895 "additionalProperties": False
898 "additionalProperties": False
901 scenario_action_schema
= {
902 "title":"scenario action information schema",
903 "$schema": "http://json-schema.org/draft-04/schema#",
909 "instance_name":name_schema
,
910 "description":description_schema
,
911 "datacenter": {"type": "string"}
913 "required": ["instance_name"]
918 "instance_name":name_schema
,
919 "description":description_schema
,
920 "datacenter": {"type": "string"}
922 "required": ["instance_name"]
927 "instance_name":name_schema
,
928 "description":description_schema
,
929 "datacenter": {"type": "string"}
931 "required": ["instance_name"]
936 "instance_name":name_schema
,
937 "description":description_schema
,
938 "datacenter": {"type": "string"}
940 "required": ["instance_name"]
945 "additionalProperties": False
948 instance_scenario_create_schema_v01
= {
949 "title":"instance scenario create information schema v0.1",
950 "$schema": "http://json-schema.org/draft-04/schema#",
953 "schema_version": {"type": "string", "enum": ["0.1"]},
958 "description":description_schema
,
959 "datacenter": name_schema
,
960 "scenario" : name_schema
, #can be an UUID or name
961 "action":{"enum": ["deploy","reserve","verify" ]},
962 "connect_mgmt_interfaces": {"oneOf": [{"type":"boolean"}, {"type":"object"}]},# can be true or a dict with datacenter: net_name
963 "cloud-config": cloud_config_schema
, #common to all vnfs in the instance scenario
964 "vnfs":{ #mapping from scenario to datacenter
966 "patternProperties":{
970 "name": name_schema
, #override vnf name
971 "datacenter": name_schema
,
972 #"metadata": {"type": "object"},
973 #"user_data": {"type": "string"}
974 #"cloud-config": cloud_config_schema, #particular for a vnf
975 "external-connections": {
977 "patternProperties": {
981 "vim-network-name": name_schema
,
982 "ip_address": ip_schema
987 "internal-connections": {
989 "patternProperties": {
993 "ip-profile": ip_profile_schema
,
1000 "local_iface_name": name_schema
,
1001 "ip_address": ip_schema
1003 "required": ["VNFC", "local_iface_name"],
1014 "networks":{ #mapping from scenario to datacenter
1016 "patternProperties":{
1026 "ip_address": ip_schema
,
1027 "datacenter": name_schema
,
1028 "vim-network-name": name_schema
1030 "patternProperties":{
1031 ".": {"type": "string"}
1035 "ip-profile": ip_profile_schema
,
1036 #if the network connects VNFs deployed at different sites, you must specify one entry per site that this network connect to
1043 # By default for an scenario 'external' network openmano looks for an existing VIM network to map this external scenario network,
1044 # for other networks openamno creates at VIM
1045 # Use netmap-create to force to create an external scenario network
1046 "netmap-create": {"oneOf":[name_schema
,{"type": "null"}]}, #datacenter network to use. Null if must be created as an internal net
1047 #netmap-use: Indicates an existing VIM network that must be used for this scenario network.
1048 #Can use both the VIM network name (if it is not ambiguous) or the VIM net UUID
1049 #If both 'netmap-create' and 'netmap-use'are supplied, netmap-use precedes, but if fails openmano follows the netmap-create
1050 #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)
1051 "netmap-use": name_schema
, #
1052 "vim-network-name": name_schema
, #override network name
1053 #"ip-profile": ip_profile_schema,
1054 "datacenter": name_schema
,
1066 "additionalProperties": False,
1067 "required": ["name"]
1070 "required": ["instance"],
1071 "additionalProperties": False
1074 instance_scenario_action_schema
= {
1075 "title":"instance scenario action information schema",
1076 "$schema": "http://json-schema.org/draft-04/schema#",
1079 "start":{"type": "null"},
1080 "pause":{"type": "null"},
1081 "resume":{"type": "null"},
1082 "shutoff":{"type": "null"},
1083 "shutdown":{"type": "null"},
1084 "forceOff":{"type": "null"},
1085 "rebuild":{"type": "null"},
1087 "type": ["object","null"],
1089 "console": {"type": ["string", "null"], "enum": ["novnc", "xvpvnc", "rdp-html5", "spice-html5", None]},
1090 "vnfs":{"type": "array", "items":{"type":"string"}},
1091 "vms":{"type": "array", "items":{"type":"string"}}
1094 #"maxProperties": 1,
1095 "additionalProperties": False