From: tierno Date: Thu, 21 May 2020 13:18:23 +0000 (+0000) Subject: fix 1073 obtain nsd from database, not from nsr[nsd] X-Git-Tag: release-v8.0-start~3 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FLCM.git;a=commitdiff_plain;h=d732fb8be7345fc3e9381750359a5b027929a8e2 fix 1073 obtain nsd from database, not from nsr[nsd] Change-Id: I2846a215d6144743ec7e52b81921ea1b557cc0fa Signed-off-by: tierno --- 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