X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fvalidation.py;h=7d03d906030e35ece1453c34fe68f7ca9436ed0a;hp=fd4e0e580ffea3039a8db4ed4a5c4642267358b0;hb=e4c83a7871f341a8340e6befc9b4e66a72e4927d;hpb=c8bbaaadc76e93a1f0338d7a26264afc31fd1928 diff --git a/osm_nbi/validation.py b/osm_nbi/validation.py index fd4e0e5..7d03d90 100644 --- a/osm_nbi/validation.py +++ b/osm_nbi/validation.py @@ -178,6 +178,7 @@ ns_instantiate_internal_vld = { "properties": { "name": name_schema, "vim-network-name": name_schema, + "vim-network-id": name_schema, "ip-profile": ip_profile_update_schema, "internal-connection-point": { "type": "array", @@ -212,6 +213,18 @@ ns_instantiate = { "nsDescription": {"oneOf": [description_schema, {"type": "null"}]}, "nsdId": id_schema, "vimAccountId": id_schema, + "additionalParamsForNs": object_schema, + "additionalParamsForVnf": { + "type": "array", + "items": { + "type": "object", + "properties": { + "member-vnf-index": name_schema, + "additionalParams": object_schema, + }, + "required": ["member-vnf-index", "additionalParams"] + } + }, "ssh_keys": {"type": "array", "items": {"type": "string"}}, "nsr_id": id_schema, "vduImage": name_schema, @@ -247,6 +260,7 @@ ns_instantiate = { "properties": { "name": string_schema, "vim-network-name": {"OneOf": [string_schema, object_schema]}, + "vim-network-id": {"OneOf": [string_schema, object_schema]}, "ip-profile": object_schema, "vnfd-connection-point-ref": { "type": "array", @@ -325,6 +339,7 @@ ns_scale = { # TODO for the moment it is only VDU-scaling schema_version = {"type": "string", "enum": ["1.0"]} +schema_type = {"type": "string"} vim_account_edit_schema = { "title": "vim_account edit input schema", "$schema": "http://json-schema.org/draft-04/schema#", @@ -332,7 +347,7 @@ vim_account_edit_schema = { "properties": { "name": name_schema, "description": description_schema, - "type": nameshort_schema, # currently "openvim" or "openstack", can be enlarged with plugins + "type": nameshort_schema, "vim": name_schema, "datacenter": name_schema, "vim_url": description_schema, @@ -345,7 +360,6 @@ vim_account_edit_schema = { }, "additionalProperties": False } -schema_type = {"type": "string"} vim_account_new_schema = { "title": "vim_account creation input schema", @@ -371,6 +385,42 @@ vim_account_new_schema = { "additionalProperties": False } +wim_account_edit_schema = { + "title": "wim_account edit input schema", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "name": name_schema, + "description": description_schema, + "type": nameshort_schema, + "wim": name_schema, + "wim_url": description_schema, + "user": nameshort_schema, + "password": passwd_schema, + "config": {"type": "object"} + }, + "additionalProperties": False +} + +wim_account_new_schema = { + "title": "wim_account creation input schema", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "schema_version": schema_version, + "schema_type": schema_type, + "name": name_schema, + "description": description_schema, + "wim": name_schema, + "wim_type": {"enum": ["tapi", "onos", "odl", "dynpac"]}, + "wim_url": description_schema, + "user": nameshort_schema, + "password": passwd_schema, + "config": {"type": "object"} + }, + "required": ["name", "wim_url", "wim_type"], + "additionalProperties": False +} sdn_properties = { "name": name_schema, @@ -446,7 +496,7 @@ pdu_interface = { # TODO, add user, password, ssh-key "mac-address": mac_schema, "vim-network-name": nameshort_schema, # interface is connected to one vim network, or switch port - # TODO "vim-network-id": nameshort_schema, + "vim-network-id": nameshort_schema, # # provide this in case SDN assist must deal with this interface # "switch-dpid": dpid_Schema, # "switch-port": nameshort_schema, @@ -588,6 +638,7 @@ nsi_vld_instantiate = { "properties": { "name": string_schema, "vim-network-name": {"OneOf": [string_schema, object_schema]}, + "vim-network-id": {"OneOf": [string_schema, object_schema]}, "ip-profile": object_schema, }, "required": ["name"],