X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=RO%2Fosm_ro%2Fopenmano_schemas.py;h=14e334d4f4816e626d0d963b18bffb4fd43c78de;hb=70eeb18e4fcbb8bc3c81c88f270b59966ae4d463;hp=3b077dbe634cf3356f07b679ad94c2673f4ccfc4;hpb=69647795675df7357a9aeddaa5aba15c6f92b065;p=osm%2FRO.git diff --git a/RO/osm_ro/openmano_schemas.py b/RO/osm_ro/openmano_schemas.py index 3b077dbe..14e334d4 100644 --- a/RO/osm_ro/openmano_schemas.py +++ b/RO/osm_ro/openmano_schemas.py @@ -56,6 +56,7 @@ port_schema={"type":"integer","minimum":1,"maximum":65534} object_schema={"type":"object"} schema_version_2={"type":"integer","minimum":2,"maximum":2} #schema_version_string={"type":"string","enum": ["0.1", "2", "0.2", "3", "0.3"]} +string_list = {"type": "array", "items": {"type": "string"}} log_level_schema={"type":"string", "enum":["DEBUG", "INFO", "WARNING","ERROR","CRITICAL"]} checksum_schema={"type":"string", "pattern":"^[0-9a-fA-F]{32}$"} size_schema={"type":"integer","minimum":1,"maximum":100} @@ -106,7 +107,7 @@ config_schema = { "http_console_host": nameshort_schema, "http_console_ports": { "type": "array", - "items": {"OneOf": [ + "items": {"oneOf": [ port_schema, {"type": "object", "properties": {"from": port_schema, "to": port_schema}, "required": ["from", "to"]} ]} @@ -319,7 +320,7 @@ dhcp_schema = { "type": "object", "properties":{ "enabled": boolean_schema, - "start-address": {"OneOf": [null_schema, ip_schema]}, + "start-address": {"oneOf": [null_schema, ip_schema]}, "count": integer0_schema }, # "required": ["start-address", "count"], @@ -1033,8 +1034,9 @@ instance_scenario_create_schema_v01 = { "type": "object", "properties": { "name": name_schema, # overrides vdu name schema - "mgmt_keys": {"type": "array", "items": {"type": "string"}}, + "mgmt_keys": string_list, "vduImage": name_schema, + "cloud_init": string_list, "devices": { "type": "object", "patternProperties": { @@ -1172,7 +1174,8 @@ instance_scenario_action_schema = { "osm_vdu_id": name_schema, "member-vnf-index": name_schema, "count": integer1_schema, - "type": {"enum": ["create", "delete"]} + "type": {"enum": ["create", "delete"]}, + "cloud_init": string_list, }, "additionalProperties": False, "minProperties": 1, @@ -1247,7 +1250,7 @@ sdn_port_mapping_schema = { "items": { "type": "object", "properties": { - "pci": {"OneOf": [null_schema, pci_extended_schema]}, # pci_schema, + "pci": {"oneOf": [null_schema, pci_extended_schema]}, # pci_schema, "switch_port": nameshort_schema, "switch_id": nameshort_schema, "switch_dpid": nameshort_schema,