From 23c2ed84050676b8ca74d24f68a079a77c38cd15 Mon Sep 17 00:00:00 2001 From: tierno Date: Thu, 21 May 2020 13:18:23 +0000 Subject: [PATCH] fix 1073 obtain nsd from database, not from nsr[nsd] Change-Id: I2846a215d6144743ec7e52b81921ea1b557cc0fa Signed-off-by: tierno --- osm_lcm/ns.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 5d780d9..0a70367 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -1605,8 +1605,9 @@ class NsLcm(LcmBase): # read from db: ns stage[1] = "Getting nsr={} from db".format(nsr_id) db_nsr = self.db.get_one("nsrs", {"_id": nsr_id}) - # nsd is replicated into ns (no db read) - nsd = db_nsr["nsd"] + stage[1] = "Getting nsd={} from db".format(db_nsr["nsd-id"]) + nsd = self.db.get_one("nsds", {"_id": db_nsr["nsd-id"]}) + db_nsr["nsd"] = nsd # nsr_name = db_nsr["name"] # TODO short-name?? # read from db: vnf's of this ns -- 2.25.1