Merge "Correct the usage on listing neutron ports"
This commit is contained in:
commit
3dc8f79c86
|
@ -504,8 +504,13 @@ class NetworkScenarioTest(ScenarioTest):
|
|||
return network
|
||||
|
||||
def _get_server_port_id_and_ip4(self, server, ip_addr=None):
|
||||
ports = self.os_admin.ports_client.list_ports(
|
||||
device_id=server['id'], fixed_ip=ip_addr)['ports']
|
||||
if ip_addr:
|
||||
ports = self.os_admin.ports_client.list_ports(
|
||||
device_id=server['id'],
|
||||
fixed_ips='ip_address=%s' % ip_addr)['ports']
|
||||
else:
|
||||
ports = self.os_admin.ports_client.list_ports(
|
||||
device_id=server['id'])['ports']
|
||||
# A port can have more than one IP address in some cases.
|
||||
# If the network is dual-stack (IPv4 + IPv6), this port is associated
|
||||
# with 2 subnets
|
||||
|
|
Loading…
Reference in New Issue