From: tierno Date: Thu, 7 Mar 2019 16:26:47 +0000 (+0000) Subject: bug 636 validation vim_account-create config. Deny null values X-Git-Tag: v6.0.0~59 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=commitdiff_plain;h=f0637057dc1be391f068c7e2b9c8f81b16f0921e;hp=7b7ffa61e6282094c1bd528e60b3b395c3ab1358 bug 636 validation vim_account-create config. Deny null values Change-Id: I02a06d749eee02e5faa4bd54ccf10439dbb6e4e7 Signed-off-by: tierno --- diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index 36b6a42..9dced30 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -192,6 +192,7 @@ class NsrTopic(BaseTopic): "nsd-name-ref": nsd["name"], "operational-events": [], # "id", "timestamp", "description", "event", "nsd-ref": nsd["id"], + "nsd-id": nsd["_id"], "instantiate_params": self._format_ns_request(ns_request), "additionalParamsForNs": self._format_addional_params(ns_request), "ns-instance-config-ref": nsr_id, diff --git a/osm_nbi/validation.py b/osm_nbi/validation.py index 0ec8304..c79cdaf 100644 --- a/osm_nbi/validation.py +++ b/osm_nbi/validation.py @@ -302,6 +302,7 @@ ns_action = { # TODO for the moment it is only contemplated the vnfd primitive "member_vnf_index": name_schema, "vnf_member_index": name_schema, # TODO for backward compatibility. To remove in future "vdu_id": name_schema, + "vdu_count_index": integer0_schema, "primitive": name_schema, "primitive_params": {"type": "object"}, }, @@ -420,7 +421,12 @@ wim_account_new_schema = { "wim_url": description_schema, "user": shortname_schema, "password": passwd_schema, - "config": {"type": "object"} + "config": { + "type": "object", + "patternProperties": { + ".": {"not": {"type": "null"}} + } + } }, "required": ["name", "wim_url", "wim_type"], "additionalProperties": False