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.
)
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))
{
"run-day1": day1,
"count-index": count_index,
- "vdu-id": vdu_id
+ "vdu-id": vdu_id,
}
- ]
- }
+ ],
+ },
}
- ]
+ ],
}
nslcmop = {
"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