diff --git a/octavia/tests/tempest/common/manager.py b/octavia/tests/tempest/common/manager.py index 0d008c9f16..2fd49cf4eb 100644 --- a/octavia/tests/tempest/common/manager.py +++ b/octavia/tests/tempest/common/manager.py @@ -443,8 +443,13 @@ class NetworkScenarioTest(ScenarioTest): return subnet 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