X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_openvim%2Fvim_schema.py;h=9440872705c77c636b9294f5e189f5f01e98d624;hb=c67abe2ff35fcdd5b85db97915a7833ab31beb56;hp=c48d48e10507e427ecd533e80181a09799909cab;hpb=a69330400c877adb0e5af22e2bf113941f808668;p=osm%2Fopenvim.git diff --git a/osm_openvim/vim_schema.py b/osm_openvim/vim_schema.py index c48d48e..9440872 100644 --- a/osm_openvim/vim_schema.py +++ b/osm_openvim/vim_schema.py @@ -146,7 +146,7 @@ metadata_schema={ "os_type": {"type":"string"}, "os_version": {"type":"string"}, "bus": {"type":"string"}, - "topology": {"type":"string", "enum": ["oneSocket"]} + "topology": {"type":"string", "enum": ["oneSocket", "oneSocket:hyperthreading"]} } } @@ -220,7 +220,8 @@ extended_schema={ "vpci":pci_schema, "imageRef":id_schema, "xml":xml_text_schema, - "dev":nameshort_schema + "dev":nameshort_schema, + "size":integer1_schema, }, "additionalProperties": False, "required": ["type"] @@ -297,7 +298,9 @@ host_data_schema={ "properties": { "core_id": integer0_schema, "thread_id": integer0_schema, - "status": {"type": "string", "enum": ["noteligible"]} + "status": {"type": "string", "enum": ["noteligible"]}, + "instance_id": {"type": "string"}, # ignored, just for compatibility with host-list + "v_thread_id": {"type": "integer"} # ignored, just for compatibility with host-list }, "additionalProperties": False, "required": ["core_id", "thread_id"] @@ -343,7 +346,7 @@ host_data_schema={ } }, "additionalProperties": False, - "required": ["name", "ip_name"] + "required": ["name", "user", "ip_name"] } host_edit_schema={ @@ -602,10 +605,26 @@ network_new_schema = { "enable_dhcp": {"type": "boolean"}, "dhcp_first_ip": ip_schema, "dhcp_last_ip": ip_schema, + "dns": {"type": "array", "items": [ip_schema]}, + "links": {"type": "array", "items": {"type": "object", "properties": { + "nat": cidr_schema, + "iface": name_schema, + "vlan": vlan_schema}, + "required": ["iface"], + "additionalProperties": False + }, + + }, + "routes": {"type": "object", "properties": {"default": ip_schema}, "patternProperties": { + "^([0-9]{1,3}.){3}[0-9]{1,3}/[0-9]{1,2}$": ip_schema, + }, + "additionalProperties": False + }, + "bind_net": name_schema, # can be name, or uuid "bind_type": {"oneOf": [{"type": "null"}, {"type": "string", "pattern": "^vlan:[0-9]{1,4}$"}]} }, - "required": ["name"] + "required": ["name"] } }, "required": ["network"], @@ -764,4 +783,4 @@ of_port_map_new_schema = { "required": ["of_port_mapings"], "additionalProperties": False -} \ No newline at end of file +}