X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_policy_module%2Fcommon%2Flcm_client.py;h=c94a424b5c9870fd502f8ff3d97d240d8fb8bcd1;hb=be42d54170ca40d8d52e2c9fc8d888621585d6cf;hp=102b0dc8dfb1e3c195a1d93a35078800df64097c;hpb=3cab75bfb39b4f03509ccb90dc26404bceec557a;p=osm%2FPOL.git diff --git a/osm_policy_module/common/lcm_client.py b/osm_policy_module/common/lcm_client.py index 102b0dc..c94a424 100644 --- a/osm_policy_module/common/lcm_client.py +++ b/osm_policy_module/common/lcm_client.py @@ -133,8 +133,16 @@ class LcmClient: return nslcmop async def heal( - self, nsr_id: str, vnfinstance_id: str, vdur_name: str, vdu_id: str, - vnf_member_index: str, heal_type: str, day1: bool, count_index: int): + self, + nsr_id: str, + vnfinstance_id: str, + vdur_name: str, + vdu_id: str, + vnf_member_index: str, + heal_type: str, + day1: bool, + count_index: int, + ): """ Sends healing action to LCM through the message bus. @@ -159,8 +167,15 @@ class LcmClient: ) nsr = self.db_client.get_nsr(nsr_id) nslcmop = self._generate_nslcmop_heal( - nsr_id, vnfinstance_id, vdur_name, vdu_id, vnf_member_index, heal_type, day1, - count_index, nsr['_admin'] + nsr_id, + vnfinstance_id, + vdur_name, + vdu_id, + vnf_member_index, + heal_type, + day1, + count_index, + nsr["_admin"], ) self.db_client.create_nslcmop(nslcmop) log.debug("Sending heal action message: %s", json.dumps(nslcmop)) @@ -213,12 +228,12 @@ class LcmClient: { "run-day1": day1, "count-index": count_index, - "vdu-id": vdu_id + "vdu-id": vdu_id, } - ] - } + ], + }, } - ] + ], } nslcmop = { @@ -239,8 +254,8 @@ class LcmClient: "nsInstance": "/osm/nslcm/v1/ns_instances/" + nsr_id, }, "_admin": { - "projects_read": admin['projects_read'], - "projects_write": admin['projects_write'] - } + "projects_read": admin["projects_read"], + "projects_write": admin["projects_write"], + }, } return nslcmop