- log.info("Received create_alarm_response %s", content)
- if content['alarm_create_response']['correlation_id'] == cor_id:
- if not content['alarm_create_response']['status']:
- raise ValueError("Error creating alarm in MON")
- alarm_uuid = content['alarm_create_response']['alarm_uuid']
- await consumer.stop()
- return alarm_uuid
+ except JSONDecodeError:
+ content = yaml.safe_load(message.value)
+ log.info("Received create_alarm_response %s", content)
+ if content['alarm_create_response']['correlation_id'] == cor_id:
+ if not content['alarm_create_response']['status']:
+ raise ValueError("Error creating alarm in MON")
+ alarm_uuid = content['alarm_create_response']['alarm_uuid']
+ break