

def _configure_ipv6_ra_on_ext_gw_port_if_necessary(self, ri, state):
    ex_gw_port_id = (ri.ex_gw_port and ri.ex_gw_port['id'])
    if ((state == 'master') and ex_gw_port_id and ri.use_ipv6):
        gateway_ips = ri._get_external_gw_ips(ri.ex_gw_port)
        if (not ri.is_v6_gateway_set(gateway_ips)):
            interface_name = ri.get_external_device_name(ex_gw_port_id)
            if ri.router.get('distributed', False):
                namespace = ri.ha_namespace
            else:
                namespace = ri.ns_name
            ri.driver.configure_ipv6_ra(namespace, interface_name)

dataset/ETHPy150Open openstack/neutron/neutron/agent/l3/ha.py AgentMixin._configure_ipv6_ra_on_ext_gw_port_if_necessary/original