I am getting a response in Rabbitmq message queue for various operations in Devstack (KILO version).
Now I need to listen to particular 'event_type' from the response.
Payload data is as follows:
\"event_type\": \"compute.instance.update\"
I have tried python code to parse the same is as follows:
def _handle_message(self, body):
event_type = body['event_type']
Now the issues is that due to the slashes in it I am getting the error as follows:
2015-10-06 00:07:53,013 KeyError('event_type',)
I am not suppose to change the way how the responses are being sent.
I can modify the way how I am trying to parse it.
Please some one help me regarding this.
Note:
I was getting the code which I made working fine in previous versions of devstack.In those reponse data doesn't have thoses slashes.Now the main issue is with slashes.
Alternatively, In simple words what I need now is matching the \"event_type\" exactly using python code.