log.debug("_process_msg topic=%s key=%s msg=%s", topic, key, msg)
try:
if key in ALLOWED_KAFKA_KEYS:
log.debug("_process_msg topic=%s key=%s msg=%s", topic, key, msg)
try:
if key in ALLOWED_KAFKA_KEYS:
async def _handle_policy_update(self, content):
log.info("_handle_policy_update: %s", content)
async def _handle_policy_update(self, content):
log.info("_handle_policy_update: %s", content)
if (
content["operationState"] == "COMPLETED"
or content["operationState"] == "PARTIALLY_COMPLETED"
):
log.info(
"Updating policies of VNF with nsr_id: %s and vnf-member-index: %s"
if (
content["operationState"] == "COMPLETED"
or content["operationState"] == "PARTIALLY_COMPLETED"
):
log.info(
"Updating policies of VNF with nsr_id: %s and vnf-member-index: %s"
- % (nsr_id, vnf_member_index))
- await self.autoscaling_service.delete_scaling_groups(nsr_id, vnf_member_index)
+ % (nsr_id, vnf_member_index)
+ )
+ await self.autoscaling_service.delete_scaling_groups(
+ nsr_id, vnf_member_index
+ )
await self.alarming_service.configure_vnf_alarms(nsr_id, vnf_member_index)
else:
log.info(
"Network service is not in COMPLETED or PARTIALLY_COMPLETED state. "
"Current state is %s. Skipping...",
await self.alarming_service.configure_vnf_alarms(nsr_id, vnf_member_index)
else:
log.info(
"Network service is not in COMPLETED or PARTIALLY_COMPLETED state. "
"Current state is %s. Skipping...",
if (
content["operationState"] == "COMPLETED"
or content["operationState"] == "PARTIALLY_COMPLETED"
):
log.info(
"Deleting policies of VNF with nsr_id: %s and vnf-member-index: %s"
if (
content["operationState"] == "COMPLETED"
or content["operationState"] == "PARTIALLY_COMPLETED"
):
log.info(
"Deleting policies of VNF with nsr_id: %s and vnf-member-index: %s"
- % (nsr_id, vnf_member_index))
- await self.autoscaling_service.delete_scaling_groups(nsr_id, vnf_member_index)
+ % (nsr_id, vnf_member_index)
+ )
+ await self.autoscaling_service.delete_scaling_groups(
+ nsr_id, vnf_member_index
+ )
await self.alarming_service.delete_vnf_alarms(nsr_id, vnf_member_index)
else:
log.info(
"Network service is not in COMPLETED or PARTIALLY_COMPLETED state. "
"Current state is %s. Skipping...",
await self.alarming_service.delete_vnf_alarms(nsr_id, vnf_member_index)
else:
log.info(
"Network service is not in COMPLETED or PARTIALLY_COMPLETED state. "
"Current state is %s. Skipping...",