X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Fplugins%2FOpenStack%2Fresponse.py;h=8d328f05e798f0cef75aaffd321385f5b577c76a;hb=ac3083b1174246d7aa29ef7dcf057f68e1639324;hp=75d907ea765d53c9f1e91a9ccf2ee164b1b70617;hpb=effeb7c52a650308e47ef3eb0ded8315f21f9cba;p=osm%2FMON.git diff --git a/osm_mon/plugins/OpenStack/response.py b/osm_mon/plugins/OpenStack/response.py index 75d907e..8d328f0 100644 --- a/osm_mon/plugins/OpenStack/response.py +++ b/osm_mon/plugins/OpenStack/response.py @@ -30,7 +30,7 @@ schema_version = "1.0" class OpenStack_Response(object): - """Generates responses for SO from OpenStaack plugins.""" + """Generates responses for OpenStack plugin.""" def __init__(self): """Initialize OpenStack Response instance.""" @@ -58,7 +58,7 @@ class OpenStack_Response(object): elif key == "notify_alarm": message = self.notify_alarm(**kwargs) else: - log.warn("Failed to generate a valid response message.") + log.warning("Failed to generate a valid response message.") message = None return message @@ -68,7 +68,7 @@ class OpenStack_Response(object): alarm_list_resp = {"schema_version": schema_version, "schema_type": "list_alarm_response", "correlation_id": kwargs['cor_id'], - "list_alarm_resp": kwargs['alarm_list']} + "list_alarm_response": kwargs['alarm_list']} return json.dumps(alarm_list_resp) def create_alarm_response(self, **kwargs): @@ -161,8 +161,12 @@ class OpenStack_Response(object): "schema_type": "notify_alarm", "notify_details": { "alarm_uuid": kwargs['a_id'], - "resource_uuid": kwargs['r_id'], - "vim_type": kwargs['vim_type'], + "vdu_name": kwargs['vdu_name'], + "vnf_member_index": kwargs['vnf_member_index'], + "ns_id": kwargs['ns_id'], + "metric_name": kwargs['metric_name'], + "threshold_value": kwargs['threshold_value'], + "operation": kwargs['operation'], "severity": kwargs['sev'], "status": kwargs['state'], "start_date": kwargs['date']}}