def heartbeat(self, context, msg):
args = jsonutils.loads(msg)<EOL>when = args.get('<STR_LIT>')<EOL>agent = args.get('<STR_LIT>')<EOL>configurations = {'<STR_LIT>': '<STR_LIT>'}<EOL>LOG.debug('<STR_LIT>', (<EOL>{'<STR_LIT:time>': when, '<STR_LIT>': agent}))<EOL>if self.obj.neutron_event:<EOL><INDENT>self.obj.neutron_event.create_rpc_client(agent)<EOL><DEDENT>self.obj.update_agent_status(agent, when)<EOL>agent_info = dict(timestamp=utils.utc_time(when), host=agent,<EOL>config=jsonutils.dumps(configurations))<EOL>self.obj.update_agent_db(agent_info)<EOL>
Process heartbeat message from agents on compute nodes.