From c5e58063019ca387cac9527cfc0dba9b595d1ff1 Mon Sep 17 00:00:00 2001 From: Priyadharshini G S Date: Thu, 28 Jan 2021 06:43:19 +0000 Subject: [PATCH] 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 --- osm_lcm/ns.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 "" -- 2.25.1