From 340df4872fd8c0ab86a29ee86ff27f80afcc7679 Mon Sep 17 00:00:00 2001 From: tierno Date: Fri, 3 Apr 2020 10:09:06 +0000 Subject: [PATCH] remove internal content at ns.nsd Change-Id: If6d53b73239d3bf8dbb28937c2fb9e949641d0e5 Signed-off-by: tierno --- osm_nbi/instance_topics.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index 776edc1..d444116 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -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 = {} -- 2.25.1