X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fvalidation.py;h=69caff7b3b4d593f06400f9a7129cf2850c3fae8;hp=f4823f6f8932ba32a7ba18eab9d601d1bc7256cc;hb=cea9591384b32a78fd44bf26ea7129498be034d6;hpb=c67b0e994fe4a74098158e6340125e4c88cdb950;ds=sidebyside diff --git a/osm_nbi/validation.py b/osm_nbi/validation.py index f4823f6..69caff7 100644 --- a/osm_nbi/validation.py +++ b/osm_nbi/validation.py @@ -221,11 +221,35 @@ additional_params_for_vnf = { "properties": { "member-vnf-index": name_schema, "additionalParams": object_schema, + "additionalParamsForVdu": { + "type": "array", + "items": { + "type": "object", + "properties": { + "vdu_id": name_schema, + "additionalParams": object_schema, + }, + "required": ["vdu_id", "additionalParams"], + "additionalProperties": False, + }, + }, + "additionalParamsForKdu": { + "type": "array", + "items": { + "type": "object", + "properties": { + "kdu_name": name_schema, + "additionalParams": object_schema, + }, + "required": ["kdu_name", "additionalParams"], + "additionalProperties": False, + }, + }, }, - "required": ["member-vnf-index", "additionalParams"], + "required": ["member-vnf-index"], + "minProperties": 2, "additionalProperties": False } - } ns_instantiate = { @@ -363,7 +387,7 @@ ns_scale = { # TODO for the moment it is only VDU-scaling schema_version = {"type": "string", "enum": ["1.0"]} schema_type = {"type": "string"} -vim_type = {"enum": ["openstack", "openvim", "vmware", "opennebula", "aws", "azure", "fos"]} +vim_type = shortname_schema # {"enum": ["openstack", "openvim", "vmware", "opennebula", "aws", "azure", "fos"]} vim_account_edit_schema = { "title": "vim_account edit input schema", @@ -410,7 +434,7 @@ vim_account_new_schema = { "additionalProperties": False } -wim_type = {"enum": ["tapi", "onos", "odl", "dynpac", "fake"]} +wim_type = shortname_schema # {"enum": ["tapi", "onos", "odl", "dynpac", "fake"]} wim_account_edit_schema = { "title": "wim_account edit input schema", @@ -563,7 +587,7 @@ k8scluster_edit_schema = { } # K8s Repos -k8srepo_types = {"enum": ["chart", "bundle"]} +k8srepo_types = {"enum": ["helm-chart", "juju-bundle"]} k8srepo_properties = { "name": name_schema, "description": description_schema,