remove internal content at ns.nsd 64/8764/1
authortierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 3 Apr 2020 10:09:06 +0000 (10:09 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 3 Apr 2020 10:09:06 +0000 (10:09 +0000)
Change-Id: If6d53b73239d3bf8dbb28937c2fb9e949641d0e5
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
osm_nbi/instance_topics.py

index 776edc1..d444116 100644 (file)
@@ -241,7 +241,7 @@ class NsrTopic(BaseTopic):
                 "deploymentStatus": None,
                 "configurationStatus": None,
                 "vcaStatus": None,
-                "nsd": nsd,
+                "nsd": {k: v for k, v in nsd.items() if k in ("vld", "_id", "id", "constituent-vnfd", "name")},
                 "datacenter": ns_request["vimAccountId"],
                 "resource-orchestrator": "osmopenmano",
                 "description": ns_request.get("nsDescription", ""),
@@ -271,10 +271,7 @@ class NsrTopic(BaseTopic):
             ns_request["nsr_id"] = nsr_id
             # Create vld
             if nsd.get("vld"):
-                nsr_descriptor["vld"] = []
-                for nsd_vld in nsd.get("vld"):
-                    nsr_descriptor["vld"].append(
-                        {key: nsd_vld[key] for key in ("id", "vim-network-name", "vim-network-id") if key in nsd_vld})
+                nsr_descriptor["vld"] = nsd["vld"]
 
             # Create VNFR
             needed_vnfds = {}