Skip to content
Snippets Groups Projects
Commit 0b27334b authored by Jegan S's avatar Jegan S Committed by garciadeblas
Browse files

Bug 2312 Fix for manual healing with invalid vdu id


Change-Id: I8d9388da3a883889e90d7cd6a2a6a741338c6f6b
Signed-off-by: default avatarjegan <jegan.s@tataelxsi.co.in>
parent 3d1d627b
No related branches found
No related tags found
No related merge requests found
......@@ -1549,7 +1549,24 @@ class NsLcmOpTopic(BaseTopic):
)
def _check_heal_ns_operation(self, indata, nsr):
return
try:
for data in indata.get("healVnfData"):
vnf_id = data.get("vnfInstanceId")
vnf = self.db.get_one("vnfrs", {"_id": vnf_id})
vnfd_member_vnf_index = vnf.get("member-vnf-index-ref")
vnfd = self._get_vnfd_from_vnf_member_index(
vnfd_member_vnf_index, nsr["_id"]
)
if data.get("additionalParams"):
vdu_id = data["additionalParams"].get("vdu")
if vdu_id:
for index in range(len(vdu_id)):
vdu = vdu_id[index].get("vdu-id")
self._check_valid_vdu(vnfd, vdu)
except (DbException, AttributeError, IndexError, KeyError, ValueError) as e:
raise type(e)(
"Ns healing request could not be processed with error: {}.".format(e)
)
def _check_instantiate_ns_operation(self, indata, nsr, session):
vnf_member_index_to_vnfd = {} # map between vnf_member_index to vnf descriptor.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment