

def _update_metadata_proxy(self, ri, router_id, state):
    if (state == 'master'):
        LOG.debug('Spawning metadata proxy for router %s', router_id)
        self.metadata_driver.spawn_monitored_metadata_proxy(self.process_monitor, router_id.ns_name, self.conf.metadata_port, self.conf, router_id=ri.router_id)
    else:
        LOG.debug('Closing metadata proxy for router %s', router_id)
        self.metadata_driver.destroy_monitored_metadata_proxy(self.process_monitor, ri.router_id, self.conf)

dataset/ETHPy150Open openstack/neutron/neutron/agent/l3/ha.py AgentMixin._update_metadata_proxy/VarMisuse@44/75 `ri`->`router_id`