change nstdId to nstId 97/6997/1
authortierno <alfonso.tiernosepulveda@telefonica.com>
Thu, 29 Nov 2018 09:42:09 +0000 (09:42 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Thu, 29 Nov 2018 09:53:05 +0000 (09:53 +0000)
Change-Id: Ic699a950aa0063ff33e4b9b61624fcfe0364ae57
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
osm_nbi/instance_topics.py
osm_nbi/tests/test.py
osm_nbi/validation.py

index b6e025f..c3471ea 100644 (file)
@@ -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)
index a084095..7c172d7 100755 (executable)
@@ -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)
 
index f6b93a5..f0b8054 100644 (file)
@@ -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
 }