X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_ro%2Fopenmano_schemas.py;h=4a7d5f597c538fe88ed6bd946e982b9792254b63;hb=7fe82640f590cc66a9b11adf0d25abceedf892de;hp=4238237d546d5e181db61a89b7d01a231e6a8f0e;hpb=20a608ce0d4a849f30d7125cf1dd63e81dc8cccc;p=osm%2FRO.git diff --git a/osm_ro/openmano_schemas.py b/osm_ro/openmano_schemas.py index 4238237d..4a7d5f59 100644 --- a/osm_ro/openmano_schemas.py +++ b/osm_ro/openmano_schemas.py @@ -465,7 +465,7 @@ bridge_interfaces_schema={ "bandwidth":bandwidth_schema, "vpci":pci_schema, "mac_address": mac_schema, - "model": {"type":"string", "enum":["virtio","e1000","ne2k_pci","pcnet","rtl8139"]}, + "model": {"type":"string", "enum":["virtio","e1000","ne2k_pci","pcnet","rtl8139", "paravirt"]}, "port-security": {"type" : "boolean"}, "floating-ip": {"type" : "boolean"} }, @@ -963,19 +963,45 @@ scenario_action_schema = { "additionalProperties": False } +instance_scenario_object = { + "title": "scenario object used to create an instance not based on any nsd", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "nets": { + "type": "array", + "minLength": 1, + "items": { + "type": "object", + "properties": { + "name": name_schema, + "external": {"type": "boolean"}, + "type": {"enum": ["bridge", "ptp", "data"]}, # for overlay, underlay E-LINE, underlay E-LAN + }, + "additionalProperties": False, + "required": ["name", "external", "type"] + } + } + }, + "additionalProperties": False, + "required": ["nets"] +} + instance_scenario_create_schema_v01 = { - "title":"instance scenario create information schema v0.1", + "title": "instance scenario create information schema v0.1", "$schema": "http://json-schema.org/draft-04/schema#", - "type":"object", - "properties":{ + "type": "object", + "properties": { "schema_version": {"type": "string", "enum": ["0.1"]}, - "instance":{ - "type":"object", - "properties":{ - "name":name_schema, + "instance": { + "type": "object", + "properties": { + "mgmt_keys": {"type": "array", "items": {"type":"string"}}, + "vduImage": name_schema, + "name": name_schema, "description":description_schema, "datacenter": name_schema, - "scenario" : name_schema, #can be an UUID or name + "scenario" : {"oneOff": [name_schema, instance_scenario_object]}, # can be an UUID or name or a dict "action":{"enum": ["deploy","reserve","verify" ]}, "connect_mgmt_interfaces": {"oneOf": [{"type":"boolean"}, {"type":"object"}]},# can be true or a dict with datacenter: net_name "cloud-config": cloud_config_schema, #common to all vnfs in the instance scenario @@ -996,7 +1022,9 @@ instance_scenario_create_schema_v01 = { ".": { "type": "object", "properties": { - "name": name_schema, # overrides vdu name schema + "name": name_schema, # overrides vdu name schema + "mgmt_keys": {"type": "array", "items": {"type": "string"}}, + "vduImage": name_schema, "devices": { "type": "object", "patternProperties": { @@ -1216,4 +1244,4 @@ sdn_external_port_schema = { "mac": mac_schema }, "required": ["port"] -} \ No newline at end of file +}