Merge "List port for distributed router interface"

This commit is contained in:
Jenkins 2015-01-22 04:40:12 +00:00 committed by Gerrit Code Review
commit 2283b73425

View File

@ -45,6 +45,11 @@ IP_VERSION_DICT = {4: 'IPv4', 6: 'IPv6'}
OFF_STATE = 'OFF'
ON_STATE = 'ON'
ROUTER_INTERFACE_OWNERS = (
'network:router_interface',
'network:router_interface_distributed'
)
class NeutronAPIDictWrapper(base.APIDictWrapper):
@ -412,9 +417,9 @@ class FloatingIpManager(network_base.FloatingIpManager):
r.external_gateway_info.get('network_id')
in ext_net_ids)]
reachable_subnets = set([p.fixed_ips[0]['subnet_id'] for p in ports
if ((p.device_owner ==
'network:router_interface')
and (p.device_id in gw_routers))])
if ((p.device_owner in
ROUTER_INTERFACE_OWNERS)
and (p.device_id in gw_routers))])
return reachable_subnets
def list_targets(self):