From: Priyadharshini G S Date: Thu, 28 Jan 2021 06:43:19 +0000 (+0000) Subject: Bug 1422 - NSR record contain stale vcaStatus after successful completion of day... X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F32%2F10232%2F4;p=osm%2FLCM.git Bug 1422 - NSR record contain stale vcaStatus after successful completion of day 2 fixed. Addressed review comments Change-Id: I2f5585ee48d4641136c6ac146bb10b3cf928b006 Signed-off-by: Priyadharshini G S --- diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index c8b2b0d..9290a08 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -3884,16 +3884,19 @@ class NsLcm(LcmBase): vdu_id=vdu_id, vdu_count_index=vdu_count_index, ee_descriptor_id=ee_descriptor_id) - db_nslcmop_notif = {"collection": "nslcmops", - "filter": {"_id": nslcmop_id}, - "path": "admin.VCA"} + for vca_index, vca_deployed in enumerate(db_nsr['_admin']['deployed']['VCA']): + if vca_deployed.get("member-vnf-index") == vnf_index: + db_dict = {"collection": "nsrs", + "filter": {"_id": nsr_id}, + "path": "_admin.deployed.VCA.{}.".format(vca_index)} + break nslcmop_operation_state, detailed_status = await self._ns_execute_primitive( ee_id, primitive=primitive_name, primitive_params=self._map_primitive_params(config_primitive_desc, primitive_params, desc_params), timeout=timeout_ns_action, vca_type=vca_type, - db_dict=db_nslcmop_notif) + db_dict=db_dict) db_nslcmop_update["detailed-status"] = detailed_status error_description_nslcmop = detailed_status if nslcmop_operation_state == "FAILED" else ""