bagpipe: only select gw for IPv4 subnets

Until bagpipe supports IPv6, we need to restrict the DB lookup
to Ipv4 subnets.
Change-Id: I510a498cf260a09d12a515168eacd40967701d0b
Closes-bug: 1526705
This commit is contained in:
Thomas Morin
2016年01月04日 16:08:25 +01:00
parent 7683a00a96
commit 01d245f5a8

View File

@@ -54,6 +54,7 @@ def get_network_info_for_port(context, port_id):
join(models_v2.Subnet,
models_v2.IPAllocation.subnet_id ==
models_v2.Subnet.id).
filter(models_v2.Subnet.ip_version == 4).
filter(models_v2.Port.id == port_id).one())
(mac_address, ip_address, cidr, gateway_ip) = net_info
Reference in New Issue
openstack/networking-bgpvpn
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.