From 66351ef4b120bb9dbc03f5bca08a9cd82f911339 Mon Sep 17 00:00:00 2001 From: Federico Ressi Date: Fri, 12 Feb 2021 13:19:15 +0100 Subject: [PATCH] Test CentOS Nova server with external network Change-Id: I2a6ef56e3f0622999118c3f1eb776d2271a94d14 --- tobiko/openstack/stacks/__init__.py | 1 + tobiko/openstack/stacks/_centos.py | 5 +++++ tobiko/tests/scenario/neutron/test_port.py | 11 ++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/tobiko/openstack/stacks/__init__.py b/tobiko/openstack/stacks/__init__.py index b8152ccf3..e2f48077e 100644 --- a/tobiko/openstack/stacks/__init__.py +++ b/tobiko/openstack/stacks/__init__.py @@ -27,6 +27,7 @@ from tobiko.openstack.stacks import _ubuntu CentosFlavorStackFixture = _centos.CentosFlavorStackFixture CentosImageFixture = _centos.CentosImageFixture CentosServerStackFixture = _centos.CentosServerStackFixture +CentosExternalServerStackFixture = _centos.CentosExternalServerStackFixture CirrosFlavorStackFixture = _cirros.CirrosFlavorStackFixture CirrosImageFixture = _cirros.CirrosImageFixture diff --git a/tobiko/openstack/stacks/_centos.py b/tobiko/openstack/stacks/_centos.py index 1af312d51..14d744599 100644 --- a/tobiko/openstack/stacks/_centos.py +++ b/tobiko/openstack/stacks/_centos.py @@ -52,3 +52,8 @@ class CentosServerStackFixture(_nova.ServerStackFixture): #: Setup SWAP file in bytes swap_maxsize = 1 * 1024 * 1024 * 1024 # 1 GB + + +class CentosExternalServerStackFixture(CentosServerStackFixture, + _nova.ExternalServerStackFixture): + pass diff --git a/tobiko/tests/scenario/neutron/test_port.py b/tobiko/tests/scenario/neutron/test_port.py index b8868a951..eb98a640e 100644 --- a/tobiko/tests/scenario/neutron/test_port.py +++ b/tobiko/tests/scenario/neutron/test_port.py @@ -113,7 +113,7 @@ class PortTest(testtools.TestCase): # --- Test opening ports on external network ---------------------------------- @stacks.skip_unless_has_external_network -class ExternalPortTest(PortTest): +class CirrosExternalPortTest(PortTest): """Test Neutron ports""" #: Resources stack with Nova server to send messages to @@ -121,6 +121,15 @@ class ExternalPortTest(PortTest): stacks.CirrosExternalServerStackFixture) +@stacks.skip_unless_has_external_network +class CentosExternalPortTest(PortTest): + """Test Neutron ports""" + + #: Resources stack with Nova server to send messages to + stack = tobiko.required_setup_fixture( + stacks.CentosExternalServerStackFixture) + + # --- Test la-h3 extension ---------------------------------------------------- @neutron.skip_if_missing_networking_extensions('l3-ha')