Merge "Let topology to decide how to start background ping"

This commit is contained in:
Zuul 2024-11-26 12:55:48 +00:00 committed by Gerrit Code Review
commit 3699ad61d3
3 changed files with 10 additions and 4 deletions

View File

@ -650,6 +650,10 @@ class OpenStackTopology(tobiko.SharedFixture):
ip_version=self.ip_version,
ssh_config=True)
def check_or_start_background_vm_ping(self):
tobiko.skip_test("Background ping not supported by "
"this topology class.")
def get_openstack_topology(topology_class: typing.Type = None) -> \
OpenStackTopology:

View File

@ -21,10 +21,9 @@ import tobiko
from tobiko.openstack import neutron
from tobiko.openstack import nova
from tobiko.openstack import stacks
from tobiko.openstack import topology
from tobiko.shell import ping
from tobiko.shell import sh
from tobiko.tripleo import undercloud
from tobiko.tripleo import nova as tripleo_nova
@pytest.mark.minimal
@ -62,7 +61,6 @@ class NetworkTest(testtools.TestCase):
@pytest.mark.background
@undercloud.skip_if_missing_undercloud
class BackgroundProcessTest(NetworkTest):
def test_check_background_vm_ping(self):
@ -72,7 +70,7 @@ class BackgroundProcessTest(NetworkTest):
then execute some check logic i.e. a check function.
if the process by name isn't running,
start a separate process i.e a background function"""
tripleo_nova.check_or_start_background_vm_ping()
topology.get_openstack_topology().check_or_start_background_vm_ping()
@pytest.mark.migrate_server

View File

@ -32,6 +32,7 @@ from tobiko.shell import ssh
from tobiko.tripleo import _overcloud
from tobiko.tripleo import _undercloud
from tobiko.tripleo import containers
from tobiko.tripleo import nova as tripleo_nova
CONF = config.CONF
LOG = log.getLogger(__name__)
@ -187,6 +188,9 @@ class TripleoTopology(rhosp.RhospTopology):
"name: '%s'", node.name)
return subgroups
def check_or_start_background_vm_ping(self):
tripleo_nova.check_or_start_background_vm_ping()
class TripleoTopologyNode(rhosp.RhospNode):