From: tierno Date: Thu, 29 Nov 2018 09:42:09 +0000 (+0000) Subject: change nstdId to nstId X-Git-Tag: v5.0.0~5 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F97%2F6997%2F1;p=osm%2FNBI.git change nstdId to nstId Change-Id: Ic699a950aa0063ff33e4b9b61624fcfe0364ae57 Signed-off-by: tierno --- diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index b6e025f..c3471ea 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -783,8 +783,8 @@ class NsiTopic(BaseTopic): step = "" # look for nstd self.logger.info(str(slice_request)) - step = "getting nstd id='{}' from database".format(slice_request.get("nstdId")) - _filter = {"id": slice_request["nstdId"]} + step = "getting nstd id='{}' from database".format(slice_request.get("nstId")) + _filter = {"_id": slice_request["nstId"]} _filter.update(BaseTopic._get_project_filter(session, write=False, show_all=True)) nstd = self.db.get_one("nsts", _filter) nstd.pop("_admin", None) diff --git a/osm_nbi/tests/test.py b/osm_nbi/tests/test.py index a084095..7c172d7 100755 --- a/osm_nbi/tests/test.py +++ b/osm_nbi/tests/test.py @@ -1651,7 +1651,7 @@ class TestNetSliceInstances: vim = r_json[0] self.vim_id = vim["_id"] - ns_data = {"nsiDescription": "default description", "nsiName": "my_slice", "nstdId": "cirros_nst", + ns_data = {"nsiDescription": "default description", "nsiName": "my_slice", "nstId": nst_id, "vimAccountId": self.vim_id} ns_data_text = yaml.safe_dump(ns_data, default_flow_style=True, width=256) diff --git a/osm_nbi/validation.py b/osm_nbi/validation.py index f6b93a5..f0b8054 100644 --- a/osm_nbi/validation.py +++ b/osm_nbi/validation.py @@ -584,7 +584,7 @@ nsi_instantiate = { "nsiInstanceId": id_schema, "nsiName": name_schema, "nsiDescription": {"oneOf": [description_schema, {"type": "null"}]}, - "nstdId": string_schema, + "nstId": string_schema, "vimAccountId": id_schema, "ssh_keys": {"type": "string"}, "nsi_id": id_schema, @@ -594,7 +594,7 @@ nsi_instantiate = { "items": ns_instantiate }, }, - "required": ["nsiName", "nstdId", "vimAccountId"], + "required": ["nsiName", "nstId", "vimAccountId"], "additionalProperties": False }