Fix external networks scenario test cases
Ignore testing external subnet port IPs that have DHCP enabled Change-Id: I8487d270c2e639a1b010cbc92633a1eb599543ba
This commit is contained in:
parent
40f1b27a60
commit
4aa2368067
|
@ -406,10 +406,15 @@ class ExternalServerStackFixture(ServerStackFixture, abc.ABC):
|
|||
# external servers doesn't need floating IPs
|
||||
has_floating_ip = False
|
||||
|
||||
# We must rely on ways of configuring IPs without relying on DHCP
|
||||
config_drive = True
|
||||
|
||||
# external network servers are visible from test host
|
||||
peer_ssh_client = None
|
||||
|
||||
# external network DHCP could conflict with Neutron one
|
||||
need_dhcp = False
|
||||
|
||||
@property
|
||||
def floating_network(self):
|
||||
return self.network_stack.network_id
|
||||
|
|
|
@ -83,9 +83,8 @@ class PortTest(testtools.TestCase):
|
|||
def test_ping_subnet_gateways(self):
|
||||
"""Checks server can ping its gateway IPs"""
|
||||
network_id = self.stack.network_stack.network_id
|
||||
subnets = neutron.list_subnets(network_id=network_id,
|
||||
enable_dhcp=True)
|
||||
LOG.debug("Subnets with DHCP enabled are:\n"
|
||||
subnets = neutron.list_subnets(network_id=network_id)
|
||||
LOG.debug("Subnets enabled are:\n"
|
||||
f"{json.dumps(subnets, indent=4, sort_keys=True)}")
|
||||
gateway_ips = [netaddr.IPAddress(subnet['gateway_ip'])
|
||||
for subnet in subnets]
|
||||
|
@ -98,7 +97,8 @@ class PortTest(testtools.TestCase):
|
|||
port_ips = neutron.list_device_ip_addresses(
|
||||
device_id=device_id or self.stack.server_id,
|
||||
network_id=network_id or self.stack.network_stack.network_id,
|
||||
need_dhcp=self.stack.need_dhcp, ip_version=ip_version)
|
||||
need_dhcp=self.stack.need_dhcp,
|
||||
ip_version=ip_version)
|
||||
if port_ips:
|
||||
ping.assert_reachable_hosts(port_ips,
|
||||
timeout=600.,
|
||||
|
|
Loading…
Reference in New Issue