Remove obsolete required_setup_fixture function
Change-Id: If7a55c9616a8461a6b35fe2e2a9851cc6928a738
This commit is contained in:
parent
01b5462baf
commit
7c94bffa20
@ -67,7 +67,6 @@ is_fixture = _fixture.is_fixture
|
|||||||
get_fixture = _fixture.get_fixture
|
get_fixture = _fixture.get_fixture
|
||||||
fixture_property = _fixture.fixture_property
|
fixture_property = _fixture.fixture_property
|
||||||
required_fixture = _fixture.required_fixture
|
required_fixture = _fixture.required_fixture
|
||||||
required_setup_fixture = _fixture.required_setup_fixture
|
|
||||||
get_fixture_name = _fixture.get_fixture_name
|
get_fixture_name = _fixture.get_fixture_name
|
||||||
get_fixture_class = _fixture.get_fixture_class
|
get_fixture_class = _fixture.get_fixture_class
|
||||||
get_fixture_dir = _fixture.get_fixture_dir
|
get_fixture_dir = _fixture.get_fixture_dir
|
||||||
|
@ -25,7 +25,6 @@ import testtools
|
|||||||
|
|
||||||
import tobiko
|
import tobiko
|
||||||
from tobiko.common import _detail
|
from tobiko.common import _detail
|
||||||
from tobiko.common import _deprecation
|
|
||||||
from tobiko.common import _exception
|
from tobiko.common import _exception
|
||||||
from tobiko.common import _testcase
|
from tobiko.common import _testcase
|
||||||
|
|
||||||
@ -424,24 +423,13 @@ def fixture_property(*args, **kwargs):
|
|||||||
return FixtureProperty(*args, **kwargs)
|
return FixtureProperty(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def required_fixture(cls: typing.Type[F], setup=True, **params) \
|
def required_fixture(cls: typing.Type[G], setup=True, **params) \
|
||||||
-> 'RequiredFixture[F]':
|
-> 'RequiredFixture[G]':
|
||||||
"""Creates a property that gets fixture identified by given :param cls:
|
"""Creates a property that gets fixture identified by given :param cls:
|
||||||
"""
|
"""
|
||||||
return RequiredFixture[F](cls, setup=setup, **params)
|
return RequiredFixture[F](cls, setup=setup, **params)
|
||||||
|
|
||||||
|
|
||||||
@_deprecation.deprecated(
|
|
||||||
deprecated_in='0.4.7',
|
|
||||||
removed_in='0.4.12',
|
|
||||||
details='use tobiko.required_fixture function instead')
|
|
||||||
def required_setup_fixture(obj, **params):
|
|
||||||
'''Creates a property that sets up fixture identified by given :param obj:
|
|
||||||
|
|
||||||
'''
|
|
||||||
return required_fixture(obj, setup=True, **params)
|
|
||||||
|
|
||||||
|
|
||||||
def get_fixture_id(obj: typing.Any) -> typing.Any:
|
def get_fixture_id(obj: typing.Any) -> typing.Any:
|
||||||
return getattr(obj, '__tobiko_fixture_id__', None)
|
return getattr(obj, '__tobiko_fixture_id__', None)
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ class CloudsFileKeystoneCredentialsFixture(
|
|||||||
clouds_content = None
|
clouds_content = None
|
||||||
clouds_file = None
|
clouds_file = None
|
||||||
|
|
||||||
config = tobiko.required_setup_fixture(DefaultCloudsFileConfig)
|
config = tobiko.required_fixture(DefaultCloudsFileConfig)
|
||||||
|
|
||||||
def __init__(self, credentials=None, cloud_name=None,
|
def __init__(self, credentials=None, cloud_name=None,
|
||||||
clouds_content=None, clouds_file=None, clouds_files=None):
|
clouds_content=None, clouds_file=None, clouds_files=None):
|
||||||
|
@ -61,10 +61,10 @@ class CentosFlavorStackFixture(_nova.FlavorStackFixture):
|
|||||||
class CentosServerStackFixture(_nova.CloudInitServerStackFixture):
|
class CentosServerStackFixture(_nova.CloudInitServerStackFixture):
|
||||||
|
|
||||||
#: Glance image used to create a Nova server instance
|
#: Glance image used to create a Nova server instance
|
||||||
image_fixture = tobiko.required_setup_fixture(CentosImageFixture)
|
image_fixture = tobiko.required_fixture(CentosImageFixture)
|
||||||
|
|
||||||
#: Flavor used to create a Nova server instance
|
#: Flavor used to create a Nova server instance
|
||||||
flavor_stack = tobiko.required_setup_fixture(CentosFlavorStackFixture)
|
flavor_stack = tobiko.required_fixture(CentosFlavorStackFixture)
|
||||||
|
|
||||||
# I expect CentOS based servers to be very slow to boot
|
# I expect CentOS based servers to be very slow to boot
|
||||||
is_reachable_timeout = 900.
|
is_reachable_timeout = 900.
|
||||||
@ -73,4 +73,4 @@ class CentosServerStackFixture(_nova.CloudInitServerStackFixture):
|
|||||||
class Centos7ServerStackFixture(CentosServerStackFixture):
|
class Centos7ServerStackFixture(CentosServerStackFixture):
|
||||||
|
|
||||||
#: Glance image used to create a Nova server instance
|
#: Glance image used to create a Nova server instance
|
||||||
image_fixture = tobiko.required_setup_fixture(Centos7ImageFixture)
|
image_fixture = tobiko.required_fixture(Centos7ImageFixture)
|
||||||
|
@ -55,10 +55,10 @@ class CirrosFlavorStackFixture(_nova.FlavorStackFixture):
|
|||||||
class CirrosServerStackFixture(_nova.ServerStackFixture):
|
class CirrosServerStackFixture(_nova.ServerStackFixture):
|
||||||
|
|
||||||
#: Glance image used to create a Nova server instance
|
#: Glance image used to create a Nova server instance
|
||||||
image_fixture = tobiko.required_setup_fixture(CirrosImageFixture)
|
image_fixture = tobiko.required_fixture(CirrosImageFixture)
|
||||||
|
|
||||||
#: Flavor used to create a Nova server instance
|
#: Flavor used to create a Nova server instance
|
||||||
flavor_stack = tobiko.required_setup_fixture(CirrosFlavorStackFixture)
|
flavor_stack = tobiko.required_fixture(CirrosFlavorStackFixture)
|
||||||
|
|
||||||
#: CirrOS can't get IP addresses from config-drive
|
#: CirrOS can't get IP addresses from config-drive
|
||||||
need_dhcp = True
|
need_dhcp = True
|
||||||
@ -70,7 +70,7 @@ class CirrosServerStackFixture(_nova.ServerStackFixture):
|
|||||||
class CirrosPeerServerStackFixture(CirrosServerStackFixture,
|
class CirrosPeerServerStackFixture(CirrosServerStackFixture,
|
||||||
_nova.PeerServerStackFixture):
|
_nova.PeerServerStackFixture):
|
||||||
#: Peer server used to reach this one
|
#: Peer server used to reach this one
|
||||||
peer_stack = tobiko.required_setup_fixture(CirrosServerStackFixture)
|
peer_stack = tobiko.required_fixture(CirrosServerStackFixture)
|
||||||
|
|
||||||
|
|
||||||
class CirrosSameHostServerStackFixture(
|
class CirrosSameHostServerStackFixture(
|
||||||
@ -85,7 +85,7 @@ class CirrosDifferentHostServerStackFixture(
|
|||||||
|
|
||||||
class RebootCirrosServerOperation(sh.RebootHostOperation):
|
class RebootCirrosServerOperation(sh.RebootHostOperation):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(CirrosServerStackFixture)
|
stack = tobiko.required_fixture(CirrosServerStackFixture)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ssh_client(self):
|
def ssh_client(self):
|
||||||
@ -100,7 +100,7 @@ class EvacuableCirrosImageFixture(CirrosImageFixture):
|
|||||||
class EvacuableServerStackFixture(CirrosServerStackFixture):
|
class EvacuableServerStackFixture(CirrosServerStackFixture):
|
||||||
|
|
||||||
#: Glance image used to create a Nova server instance
|
#: Glance image used to create a Nova server instance
|
||||||
image_fixture = tobiko.required_setup_fixture(EvacuableCirrosImageFixture)
|
image_fixture = tobiko.required_fixture(EvacuableCirrosImageFixture)
|
||||||
|
|
||||||
|
|
||||||
class ExtraDhcpOptsCirrosServerStackFixture(CirrosServerStackFixture):
|
class ExtraDhcpOptsCirrosServerStackFixture(CirrosServerStackFixture):
|
||||||
|
@ -57,7 +57,7 @@ class FedoraFlavorStackFixture(_nova.FlavorStackFixture):
|
|||||||
class FedoraServerStackFixture(_nova.CloudInitServerStackFixture):
|
class FedoraServerStackFixture(_nova.CloudInitServerStackFixture):
|
||||||
|
|
||||||
#: Glance image used to create a Nova server instance
|
#: Glance image used to create a Nova server instance
|
||||||
image_fixture = tobiko.required_setup_fixture(FedoraImageFixture)
|
image_fixture = tobiko.required_fixture(FedoraImageFixture)
|
||||||
|
|
||||||
#: Flavor used to create a Nova server instance
|
#: Flavor used to create a Nova server instance
|
||||||
flavor_stack = tobiko.required_setup_fixture(FedoraFlavorStackFixture)
|
flavor_stack = tobiko.required_fixture(FedoraFlavorStackFixture)
|
||||||
|
@ -28,13 +28,13 @@ class L3haNetworkStackFixture(_neutron.NetworkStackFixture):
|
|||||||
@neutron.skip_if_missing_networking_extensions('l3-ha')
|
@neutron.skip_if_missing_networking_extensions('l3-ha')
|
||||||
class L3haServerStackFixture(_cirros.CirrosServerStackFixture):
|
class L3haServerStackFixture(_cirros.CirrosServerStackFixture):
|
||||||
#: Heat stack for creating internal network with L3HA enabled
|
#: Heat stack for creating internal network with L3HA enabled
|
||||||
network_stack = tobiko.required_setup_fixture(
|
network_stack = tobiko.required_fixture(
|
||||||
L3haNetworkStackFixture)
|
L3haNetworkStackFixture)
|
||||||
|
|
||||||
|
|
||||||
class L3haPeerServerStackFixture(
|
class L3haPeerServerStackFixture(
|
||||||
L3haServerStackFixture, _nova.PeerServerStackFixture):
|
L3haServerStackFixture, _nova.PeerServerStackFixture):
|
||||||
peer_stack = tobiko.required_setup_fixture(L3haServerStackFixture)
|
peer_stack = tobiko.required_fixture(L3haServerStackFixture)
|
||||||
|
|
||||||
|
|
||||||
class L3haSameHostServerStackFixture(
|
class L3haSameHostServerStackFixture(
|
||||||
|
@ -147,7 +147,7 @@ class NetworkStackFixture(heat.HeatStackFixture):
|
|||||||
"""Extra network creation parameters"""
|
"""Extra network creation parameters"""
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
floating_network_stack = tobiko.required_setup_fixture(
|
floating_network_stack = tobiko.required_fixture(
|
||||||
FloatingNetworkStackFixture)
|
FloatingNetworkStackFixture)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -92,10 +92,10 @@ class ServerStackFixture(heat.HeatStackFixture, abc.ABC):
|
|||||||
template = _hot.heat_template_file('nova/server.yaml')
|
template = _hot.heat_template_file('nova/server.yaml')
|
||||||
|
|
||||||
#: stack with the key pair for the server instance
|
#: stack with the key pair for the server instance
|
||||||
key_pair_stack = tobiko.required_setup_fixture(KeyPairStackFixture)
|
key_pair_stack = tobiko.required_fixture(KeyPairStackFixture)
|
||||||
|
|
||||||
#: stack with the internal where the server port is created
|
#: stack with the internal where the server port is created
|
||||||
network_stack = tobiko.required_setup_fixture(_neutron.NetworkStackFixture)
|
network_stack = tobiko.required_fixture(_neutron.NetworkStackFixture)
|
||||||
|
|
||||||
#: whenever the server relies only on DHCP for address assignation
|
#: whenever the server relies only on DHCP for address assignation
|
||||||
@property
|
@property
|
||||||
@ -105,10 +105,7 @@ class ServerStackFixture(heat.HeatStackFixture, abc.ABC):
|
|||||||
#: whenever the server will use config-drive to get metadata
|
#: whenever the server will use config-drive to get metadata
|
||||||
config_drive = False
|
config_drive = False
|
||||||
|
|
||||||
@property
|
image_fixture: tobiko.RequiredFixture[glance.GlanceImageFixture]
|
||||||
def image_fixture(self) -> glance.GlanceImageFixture:
|
|
||||||
"""Glance image used to create a Nova server instance"""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def delete_stack(self, stack_id=None):
|
def delete_stack(self, stack_id=None):
|
||||||
if self._outputs:
|
if self._outputs:
|
||||||
@ -133,10 +130,7 @@ class ServerStackFixture(heat.HeatStackFixture, abc.ABC):
|
|||||||
def connection_timeout(self) -> tobiko.Seconds:
|
def connection_timeout(self) -> tobiko.Seconds:
|
||||||
return self.image_fixture.connection_timeout
|
return self.image_fixture.connection_timeout
|
||||||
|
|
||||||
@property
|
flavor_stack: tobiko.RequiredFixture[FlavorStackFixture]
|
||||||
def flavor_stack(self) -> FlavorStackFixture:
|
|
||||||
"""stack used to create flavor for Nova server instance"""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def flavor(self) -> str:
|
def flavor(self) -> str:
|
||||||
@ -446,7 +440,7 @@ class ExternalServerStackFixture(ServerStackFixture, abc.ABC):
|
|||||||
# pylint: disable=abstract-method
|
# pylint: disable=abstract-method
|
||||||
|
|
||||||
#: stack with the network where the server port is created
|
#: stack with the network where the server port is created
|
||||||
network_stack = tobiko.required_setup_fixture(
|
network_stack = tobiko.required_fixture(
|
||||||
_neutron.ExternalNetworkStackFixture)
|
_neutron.ExternalNetworkStackFixture)
|
||||||
|
|
||||||
# external servers doesn't need floating IPs
|
# external servers doesn't need floating IPs
|
||||||
@ -472,10 +466,7 @@ class PeerServerStackFixture(ServerStackFixture, abc.ABC):
|
|||||||
|
|
||||||
has_floating_ip = False
|
has_floating_ip = False
|
||||||
|
|
||||||
@property
|
peer_stack: tobiko.RequiredFixture[ServerStackFixture]
|
||||||
def peer_stack(self) -> ServerStackFixture:
|
|
||||||
"""Peer server used to reach this one"""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ssh_client(self) -> ssh.SSHClientFixture:
|
def ssh_client(self) -> ssh.SSHClientFixture:
|
||||||
@ -567,7 +558,7 @@ class ServerGroupStackFixture(heat.HeatStackFixture):
|
|||||||
|
|
||||||
|
|
||||||
class AffinityServerGroupStackFixture(tobiko.SharedFixture):
|
class AffinityServerGroupStackFixture(tobiko.SharedFixture):
|
||||||
server_group_stack = tobiko.required_setup_fixture(
|
server_group_stack = tobiko.required_fixture(
|
||||||
ServerGroupStackFixture)
|
ServerGroupStackFixture)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -576,7 +567,7 @@ class AffinityServerGroupStackFixture(tobiko.SharedFixture):
|
|||||||
|
|
||||||
|
|
||||||
class AntiAffinityServerGroupStackFixture(tobiko.SharedFixture):
|
class AntiAffinityServerGroupStackFixture(tobiko.SharedFixture):
|
||||||
server_group_stack = tobiko.required_setup_fixture(
|
server_group_stack = tobiko.required_fixture(
|
||||||
ServerGroupStackFixture)
|
ServerGroupStackFixture)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -33,7 +33,7 @@ LOG = log.getLogger(__name__)
|
|||||||
class AmphoraIPv4LoadBalancerStack(heat.HeatStackFixture):
|
class AmphoraIPv4LoadBalancerStack(heat.HeatStackFixture):
|
||||||
template = _hot.heat_template_file('octavia/load_balancer.yaml')
|
template = _hot.heat_template_file('octavia/load_balancer.yaml')
|
||||||
|
|
||||||
vip_network = tobiko.required_setup_fixture(_neutron.NetworkStackFixture)
|
vip_network = tobiko.required_fixture(_neutron.NetworkStackFixture)
|
||||||
|
|
||||||
#: Floating IP network where the Neutron floating IP are created
|
#: Floating IP network where the Neutron floating IP are created
|
||||||
@property
|
@property
|
||||||
@ -103,7 +103,7 @@ class OctaviaOtherServerStackFixture(_ubuntu.UbuntuServerStackFixture):
|
|||||||
class HttpRoundRobinAmphoraIpv4Listener(heat.HeatStackFixture):
|
class HttpRoundRobinAmphoraIpv4Listener(heat.HeatStackFixture):
|
||||||
template = _hot.heat_template_file('octavia/listener.yaml')
|
template = _hot.heat_template_file('octavia/listener.yaml')
|
||||||
|
|
||||||
loadbalancer = tobiko.required_setup_fixture(
|
loadbalancer = tobiko.required_fixture(
|
||||||
AmphoraIPv4LoadBalancerStack)
|
AmphoraIPv4LoadBalancerStack)
|
||||||
|
|
||||||
lb_port = 80
|
lb_port = 80
|
||||||
@ -197,7 +197,7 @@ class HttpRoundRobinAmphoraIpv4Listener(heat.HeatStackFixture):
|
|||||||
# Members attributes
|
# Members attributes
|
||||||
server_stack = tobiko.required_fixture(_ubuntu.UbuntuServerStackFixture)
|
server_stack = tobiko.required_fixture(_ubuntu.UbuntuServerStackFixture)
|
||||||
|
|
||||||
other_server_stack = tobiko.required_setup_fixture(
|
other_server_stack = tobiko.required_fixture(
|
||||||
OctaviaOtherServerStackFixture)
|
OctaviaOtherServerStackFixture)
|
||||||
|
|
||||||
application_port = 80
|
application_port = 80
|
||||||
@ -261,7 +261,7 @@ class OVNIPv6LoadBalancerStack(OVNIPv4LoadBalancerStack):
|
|||||||
|
|
||||||
|
|
||||||
class TcpSourceIpPortOvnIpv4Listener(HttpRoundRobinAmphoraIpv4Listener):
|
class TcpSourceIpPortOvnIpv4Listener(HttpRoundRobinAmphoraIpv4Listener):
|
||||||
loadbalancer = tobiko.required_setup_fixture(OVNIPv4LoadBalancerStack)
|
loadbalancer = tobiko.required_fixture(OVNIPv4LoadBalancerStack)
|
||||||
lb_protocol = 'TCP'
|
lb_protocol = 'TCP'
|
||||||
lb_port = 22
|
lb_port = 22
|
||||||
has_monitor = False
|
has_monitor = False
|
||||||
|
@ -47,7 +47,7 @@ class QosPolicyStackFixture(heat.HeatStackFixture):
|
|||||||
class QosNetworkStackFixture(_neutron.NetworkStackFixture):
|
class QosNetworkStackFixture(_neutron.NetworkStackFixture):
|
||||||
|
|
||||||
#: stack with the qos policy for the network
|
#: stack with the qos policy for the network
|
||||||
qos_stack = tobiko.required_setup_fixture(QosPolicyStackFixture)
|
qos_stack = tobiko.required_fixture(QosPolicyStackFixture)
|
||||||
|
|
||||||
has_qos_policy = True
|
has_qos_policy = True
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ class QosNetworkStackFixture(_neutron.NetworkStackFixture):
|
|||||||
|
|
||||||
class QosServerStackFixture(_ubuntu.UbuntuServerStackFixture):
|
class QosServerStackFixture(_ubuntu.UbuntuServerStackFixture):
|
||||||
#: stack with the network with a qos policy
|
#: stack with the network with a qos policy
|
||||||
network_stack = tobiko.required_setup_fixture(QosNetworkStackFixture)
|
network_stack = tobiko.required_fixture(QosNetworkStackFixture)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def has_vlan(self) -> bool:
|
def has_vlan(self) -> bool:
|
||||||
|
@ -82,7 +82,7 @@ class RedHatServerStackFixture(_centos.CentosServerStackFixture):
|
|||||||
#: Glance image used to create a Nova server instance
|
#: Glance image used to create a Nova server instance
|
||||||
# (alternative is given for cases the RHEL image is failed to be
|
# (alternative is given for cases the RHEL image is failed to be
|
||||||
# set up)
|
# set up)
|
||||||
image_fixture = tobiko.required_setup_fixture(RhelImageFixture)
|
image_fixture = tobiko.required_fixture(RhelImageFixture)
|
||||||
|
|
||||||
#: Flavor used to create a Nova server instance
|
#: Flavor used to create a Nova server instance
|
||||||
flavor_stack = tobiko.required_setup_fixture(RedHatFlavorStackFixture)
|
flavor_stack = tobiko.required_fixture(RedHatFlavorStackFixture)
|
||||||
|
@ -165,10 +165,10 @@ class UbuntuFlavorStackFixture(_nova.FlavorStackFixture):
|
|||||||
class UbuntuMinimalServerStackFixture(_nova.CloudInitServerStackFixture):
|
class UbuntuMinimalServerStackFixture(_nova.CloudInitServerStackFixture):
|
||||||
|
|
||||||
#: Glance image used to create a Nova server instance
|
#: Glance image used to create a Nova server instance
|
||||||
image_fixture = tobiko.required_setup_fixture(UbuntuMinimalImageFixture)
|
image_fixture = tobiko.required_fixture(UbuntuMinimalImageFixture)
|
||||||
|
|
||||||
#: Flavor used to create a Nova server instance
|
#: Flavor used to create a Nova server instance
|
||||||
flavor_stack = tobiko.required_setup_fixture(UbuntuFlavorStackFixture)
|
flavor_stack = tobiko.required_fixture(UbuntuFlavorStackFixture)
|
||||||
|
|
||||||
|
|
||||||
class UbuntuServerStackFixture(UbuntuMinimalServerStackFixture,
|
class UbuntuServerStackFixture(UbuntuMinimalServerStackFixture,
|
||||||
@ -181,7 +181,7 @@ class UbuntuServerStackFixture(UbuntuMinimalServerStackFixture,
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
#: Glance image used to create a Nova server instance
|
#: Glance image used to create a Nova server instance
|
||||||
image_fixture = tobiko.required_setup_fixture(UbuntuImageFixture)
|
image_fixture = tobiko.required_fixture(UbuntuImageFixture)
|
||||||
|
|
||||||
# port of running HTTP server
|
# port of running HTTP server
|
||||||
@property
|
@property
|
||||||
|
@ -70,7 +70,7 @@ SSHConnectionDict = typing.Dict[SSHConnectionKey, SSHConnection]
|
|||||||
|
|
||||||
class SSHConnectionManager(tobiko.SharedFixture):
|
class SSHConnectionManager(tobiko.SharedFixture):
|
||||||
|
|
||||||
config = tobiko.required_setup_fixture(_config.OpenStackTopologyConfig)
|
config = tobiko.required_fixture(_config.OpenStackTopologyConfig)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(SSHConnectionManager, self).__init__()
|
super(SSHConnectionManager, self).__init__()
|
||||||
|
@ -49,7 +49,7 @@ class NeutronNovaCommonReader(tobiko.SharedFixture):
|
|||||||
groups: typing.List[str]
|
groups: typing.List[str]
|
||||||
message_pattern: str
|
message_pattern: str
|
||||||
datetime_pattern: typing.Pattern
|
datetime_pattern: typing.Pattern
|
||||||
config = tobiko.required_setup_fixture(_config.OpenStackTopologyConfig)
|
config = tobiko.required_fixture(_config.OpenStackTopologyConfig)
|
||||||
service_name = neutron.SERVER
|
service_name = neutron.SERVER
|
||||||
|
|
||||||
def setup_fixture(self):
|
def setup_fixture(self):
|
||||||
|
@ -187,7 +187,7 @@ class OpenStackTopologyNode(object):
|
|||||||
|
|
||||||
class OpenStackTopology(tobiko.SharedFixture):
|
class OpenStackTopology(tobiko.SharedFixture):
|
||||||
|
|
||||||
config = tobiko.required_setup_fixture(_config.OpenStackTopologyConfig)
|
config = tobiko.required_fixture(_config.OpenStackTopologyConfig)
|
||||||
|
|
||||||
agent_to_service_name_mappings = {
|
agent_to_service_name_mappings = {
|
||||||
neutron.DHCP_AGENT: 'devstack@q-dhcp',
|
neutron.DHCP_AGENT: 'devstack@q-dhcp',
|
||||||
@ -202,7 +202,7 @@ class OpenStackTopology(tobiko.SharedFixture):
|
|||||||
|
|
||||||
has_containers = False
|
has_containers = False
|
||||||
|
|
||||||
_connections = tobiko.required_setup_fixture(
|
_connections = tobiko.required_fixture(
|
||||||
_connection.SSHConnectionManager)
|
_connection.SSHConnectionManager)
|
||||||
|
|
||||||
# In Devstack based env logs can be accessed by journalctl
|
# In Devstack based env logs can be accessed by journalctl
|
||||||
|
@ -221,7 +221,7 @@ class SSHClientFixture(tobiko.SharedFixture):
|
|||||||
|
|
||||||
client = None
|
client = None
|
||||||
|
|
||||||
default = tobiko.required_setup_fixture(_config.SSHDefaultConfigFixture)
|
default = tobiko.required_fixture(_config.SSHDefaultConfigFixture)
|
||||||
config_files = None
|
config_files = None
|
||||||
host_config = None
|
host_config = None
|
||||||
global_host_config = None
|
global_host_config = None
|
||||||
@ -514,7 +514,7 @@ UNDEFINED_CLIENT = 'UNDEFINED_CLIENT'
|
|||||||
|
|
||||||
class SSHClientManager(object):
|
class SSHClientManager(object):
|
||||||
|
|
||||||
default = tobiko.required_setup_fixture(_config.SSHDefaultConfigFixture)
|
default = tobiko.required_fixture(_config.SSHDefaultConfigFixture)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.clients = {}
|
self.clients = {}
|
||||||
|
@ -67,7 +67,7 @@ def get_ssh_host_url(host: str) -> parse.ParseResult:
|
|||||||
|
|
||||||
class SSHConfigFixture(tobiko.SharedFixture):
|
class SSHConfigFixture(tobiko.SharedFixture):
|
||||||
|
|
||||||
default = tobiko.required_setup_fixture(SSHDefaultConfigFixture)
|
default = tobiko.required_fixture(SSHDefaultConfigFixture)
|
||||||
|
|
||||||
config_files = None
|
config_files = None
|
||||||
config = None
|
config = None
|
||||||
@ -143,7 +143,7 @@ class SSHHostConfig(collections.namedtuple('SSHHostConfig', ['host',
|
|||||||
'host_config',
|
'host_config',
|
||||||
'config_files'])):
|
'config_files'])):
|
||||||
|
|
||||||
default = tobiko.required_setup_fixture(SSHDefaultConfigFixture)
|
default = tobiko.required_fixture(SSHDefaultConfigFixture)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hostname(self):
|
def hostname(self):
|
||||||
|
@ -354,7 +354,7 @@ class DHCPAgentTest(BaseAgentTest):
|
|||||||
agent_name = neutron.DHCP_AGENT
|
agent_name = neutron.DHCP_AGENT
|
||||||
|
|
||||||
#: Resources stack with Nova server to send messages to
|
#: Resources stack with Nova server to send messages to
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
def test_restart_dhcp_agent(self):
|
def test_restart_dhcp_agent(self):
|
||||||
'''Test that dnsmasq processes are not broken after DHCP agent restart
|
'''Test that dnsmasq processes are not broken after DHCP agent restart
|
||||||
@ -407,8 +407,8 @@ class L3AgentTest(BaseAgentTest):
|
|||||||
agent_name = neutron.L3_AGENT
|
agent_name = neutron.L3_AGENT
|
||||||
|
|
||||||
#: Resources stack with Nova server to send messages to
|
#: Resources stack with Nova server to send messages to
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosPeerServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosPeerServerStackFixture)
|
||||||
ha_stack = tobiko.required_setup_fixture(stacks.L3haServerStackFixture)
|
ha_stack = tobiko.required_fixture(stacks.L3haServerStackFixture)
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(L3AgentTest, self).setUp()
|
super(L3AgentTest, self).setUp()
|
||||||
@ -543,7 +543,7 @@ class OpenVSwitchAgentTest(BaseAgentTest):
|
|||||||
agent_name = neutron.OPENVSWITCH_AGENT
|
agent_name = neutron.OPENVSWITCH_AGENT
|
||||||
|
|
||||||
#: Resources stack with Nova server to send messages to
|
#: Resources stack with Nova server to send messages to
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
def get_agent_from_host(self, hypervisor_host):
|
def get_agent_from_host(self, hypervisor_host):
|
||||||
# pylint: disable=not-an-iterable
|
# pylint: disable=not-an-iterable
|
||||||
@ -569,7 +569,7 @@ class OvnControllerTest(BaseAgentTest):
|
|||||||
agent_name = neutron.OVN_CONTROLLER
|
agent_name = neutron.OVN_CONTROLLER
|
||||||
|
|
||||||
#: Resources stack with Nova server to send messages to
|
#: Resources stack with Nova server to send messages to
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(OvnControllerTest, self).setUp()
|
super(OvnControllerTest, self).setUp()
|
||||||
@ -672,7 +672,7 @@ class OvnControllerTest(BaseAgentTest):
|
|||||||
class MetadataAgentTest(BaseAgentTest):
|
class MetadataAgentTest(BaseAgentTest):
|
||||||
|
|
||||||
#: Resources stack with Nova server to send messages to
|
#: Resources stack with Nova server to send messages to
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
agent_name = neutron.METADATA_AGENT
|
agent_name = neutron.METADATA_AGENT
|
||||||
|
|
||||||
|
@ -39,10 +39,10 @@ class OctaviaBasicFaultTest(testtools.TestCase):
|
|||||||
Reach the members to make sure they are ready to be checked.
|
Reach the members to make sure they are ready to be checked.
|
||||||
Generate network traffic again to verify Octavia functionality.
|
Generate network traffic again to verify Octavia functionality.
|
||||||
"""
|
"""
|
||||||
loadbalancer_stack = tobiko.required_setup_fixture(
|
loadbalancer_stack = tobiko.required_fixture(
|
||||||
stacks.AmphoraIPv4LoadBalancerStack)
|
stacks.AmphoraIPv4LoadBalancerStack)
|
||||||
|
|
||||||
listener_stack = tobiko.required_setup_fixture(
|
listener_stack = tobiko.required_fixture(
|
||||||
stacks.HttpRoundRobinAmphoraIpv4Listener)
|
stacks.HttpRoundRobinAmphoraIpv4Listener)
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -49,10 +49,10 @@ class OctaviaServicesFaultTest(testtools.TestCase):
|
|||||||
Then we test that traffic which is being sent from the client to the LB
|
Then we test that traffic which is being sent from the client to the LB
|
||||||
is received as expected.
|
is received as expected.
|
||||||
"""
|
"""
|
||||||
loadbalancer_stack = tobiko.required_setup_fixture(
|
loadbalancer_stack = tobiko.required_fixture(
|
||||||
stacks.AmphoraIPv4LoadBalancerStack)
|
stacks.AmphoraIPv4LoadBalancerStack)
|
||||||
|
|
||||||
listener_stack = tobiko.required_setup_fixture(
|
listener_stack = tobiko.required_fixture(
|
||||||
stacks.HttpRoundRobinAmphoraIpv4Listener)
|
stacks.HttpRoundRobinAmphoraIpv4Listener)
|
||||||
|
|
||||||
list_octavia_active_units = ('systemctl list-units ' +
|
list_octavia_active_units = ('systemctl list-units ' +
|
||||||
|
@ -28,7 +28,7 @@ class CentosServerStackTest(test_cirros.CirrosServerStackTest):
|
|||||||
"""Test CentOS server instance"""
|
"""Test CentOS server instance"""
|
||||||
|
|
||||||
#: Stack of resources with a server attached to a floating IP
|
#: Stack of resources with a server attached to a floating IP
|
||||||
stack = tobiko.required_setup_fixture(stacks.CentosServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CentosServerStackFixture)
|
||||||
|
|
||||||
def test_user_data(self):
|
def test_user_data(self):
|
||||||
user_data = self.stack.user_data
|
user_data = self.stack.user_data
|
||||||
@ -50,7 +50,7 @@ class CentosServerStackTest(test_cirros.CirrosServerStackTest):
|
|||||||
class Centos7ServerStackTest(CentosServerStackTest):
|
class Centos7ServerStackTest(CentosServerStackTest):
|
||||||
|
|
||||||
#: Stack of resources with a server attached to a floating IP
|
#: Stack of resources with a server attached to a floating IP
|
||||||
stack = tobiko.required_setup_fixture(stacks.Centos7ServerStackFixture)
|
stack = tobiko.required_fixture(stacks.Centos7ServerStackFixture)
|
||||||
|
|
||||||
def test_python(self):
|
def test_python(self):
|
||||||
python_version = sh.execute(['python', '--version'],
|
python_version = sh.execute(['python', '--version'],
|
||||||
|
@ -34,7 +34,7 @@ class CirrosServerStackTest(testtools.TestCase):
|
|||||||
"""Tests connectivity to Nova instances via floating IPs"""
|
"""Tests connectivity to Nova instances via floating IPs"""
|
||||||
|
|
||||||
#: Stack of resources with a server attached to a floating IP
|
#: Stack of resources with a server attached to a floating IP
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
nameservers_filenames: typing.Optional[typing.Sequence[str]] = None
|
nameservers_filenames: typing.Optional[typing.Sequence[str]] = None
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ class CirrosServerStackTest(testtools.TestCase):
|
|||||||
class EvacuablesServerStackTest(CirrosServerStackTest):
|
class EvacuablesServerStackTest(CirrosServerStackTest):
|
||||||
|
|
||||||
#: Stack of resources with a server attached to a floating IP
|
#: Stack of resources with a server attached to a floating IP
|
||||||
stack = tobiko.required_setup_fixture(stacks.EvacuableServerStackFixture)
|
stack = tobiko.required_fixture(stacks.EvacuableServerStackFixture)
|
||||||
|
|
||||||
def test_image_fixture_tags(self):
|
def test_image_fixture_tags(self):
|
||||||
image_fixture = self.stack.image_fixture
|
image_fixture = self.stack.image_fixture
|
||||||
@ -141,7 +141,7 @@ class EvacuablesServerStackTest(CirrosServerStackTest):
|
|||||||
class CirrosPeerServerStackTest(CirrosServerStackTest):
|
class CirrosPeerServerStackTest(CirrosServerStackTest):
|
||||||
|
|
||||||
#: Stack of resources with an HTTP server
|
#: Stack of resources with an HTTP server
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosPeerServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosPeerServerStackFixture)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def peer_ssh_client(self):
|
def peer_ssh_client(self):
|
||||||
|
@ -28,7 +28,7 @@ class FedoraServerStackTest(test_cirros.CirrosServerStackTest):
|
|||||||
"""Test Fedora server instance"""
|
"""Test Fedora server instance"""
|
||||||
|
|
||||||
#: Stack of resources with a server attached to a floating IP
|
#: Stack of resources with a server attached to a floating IP
|
||||||
stack = tobiko.required_setup_fixture(stacks.FedoraServerStackFixture)
|
stack = tobiko.required_fixture(stacks.FedoraServerStackFixture)
|
||||||
|
|
||||||
nameservers_filenames = ('/run/systemd/resolve/resolv.conf',)
|
nameservers_filenames = ('/run/systemd/resolve/resolv.conf',)
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class NetworkTest(testtools.TestCase):
|
|||||||
"""Tests network creation"""
|
"""Tests network creation"""
|
||||||
|
|
||||||
#: Stack of resources with a network with a gateway router
|
#: Stack of resources with a network with a gateway router
|
||||||
stack = tobiko.required_setup_fixture(stacks.NetworkStackFixture)
|
stack = tobiko.required_fixture(stacks.NetworkStackFixture)
|
||||||
|
|
||||||
@neutron.skip_if_missing_networking_extensions('port-security')
|
@neutron.skip_if_missing_networking_extensions('port-security')
|
||||||
def test_port_security_enabled(self):
|
def test_port_security_enabled(self):
|
||||||
@ -86,7 +86,7 @@ class NetworkTest(testtools.TestCase):
|
|||||||
class NetworkWithNetMtuWriteTest(NetworkTest):
|
class NetworkWithNetMtuWriteTest(NetworkTest):
|
||||||
|
|
||||||
#: Stack of resources with a network with a gateway router
|
#: Stack of resources with a network with a gateway router
|
||||||
stack = tobiko.required_setup_fixture(
|
stack = tobiko.required_fixture(
|
||||||
stacks.NetworkWithNetMtuWriteStackFixture)
|
stacks.NetworkWithNetMtuWriteStackFixture)
|
||||||
|
|
||||||
def test_net_mtu_write(self):
|
def test_net_mtu_write(self):
|
||||||
@ -99,7 +99,7 @@ class NetworkWithNetMtuWriteTest(NetworkTest):
|
|||||||
class L3HaNetworkTest(NetworkTest):
|
class L3HaNetworkTest(NetworkTest):
|
||||||
|
|
||||||
#: Stack of resources with a network with a gateway router
|
#: Stack of resources with a network with a gateway router
|
||||||
stack = tobiko.required_setup_fixture(stacks.L3haNetworkStackFixture)
|
stack = tobiko.required_fixture(stacks.L3haNetworkStackFixture)
|
||||||
|
|
||||||
|
|
||||||
@keystone.skip_unless_has_keystone_credentials()
|
@keystone.skip_unless_has_keystone_credentials()
|
||||||
|
@ -23,14 +23,14 @@ from tobiko.openstack import stacks
|
|||||||
|
|
||||||
class ServerGroupTestCase(testtools.TestCase):
|
class ServerGroupTestCase(testtools.TestCase):
|
||||||
|
|
||||||
affinity_stack = tobiko.required_setup_fixture(
|
affinity_stack = tobiko.required_fixture(
|
||||||
stacks.AffinityServerGroupStackFixture)
|
stacks.AffinityServerGroupStackFixture)
|
||||||
|
|
||||||
def test_affinity_server_group(self):
|
def test_affinity_server_group(self):
|
||||||
group_id = self.affinity_stack.scheduler_group
|
group_id = self.affinity_stack.scheduler_group
|
||||||
self.assertIsNotNone(group_id)
|
self.assertIsNotNone(group_id)
|
||||||
|
|
||||||
anti_affinity_stack = tobiko.required_setup_fixture(
|
anti_affinity_stack = tobiko.required_fixture(
|
||||||
stacks.AntiAffinityServerGroupStackFixture)
|
stacks.AntiAffinityServerGroupStackFixture)
|
||||||
|
|
||||||
def test_anti_affinity_server_group(self):
|
def test_anti_affinity_server_group(self):
|
||||||
|
@ -26,4 +26,4 @@ class RedHatServerStackTest(test_centos.CentosServerStackTest):
|
|||||||
"""Test Red Hat server instance"""
|
"""Test Red Hat server instance"""
|
||||||
|
|
||||||
#: Stack of resources with a server attached to a floating IP
|
#: Stack of resources with a server attached to a floating IP
|
||||||
stack = tobiko.required_setup_fixture(stacks.RedHatServerStackFixture)
|
stack = tobiko.required_fixture(stacks.RedHatServerStackFixture)
|
||||||
|
@ -25,7 +25,7 @@ class UbuntuServerStackTest(test_cirros.CirrosServerStackTest):
|
|||||||
"""Tests connectivity to Nova instances via floating IPs"""
|
"""Tests connectivity to Nova instances via floating IPs"""
|
||||||
|
|
||||||
#: Stack of resources with a server attached to a floating IP
|
#: Stack of resources with a server attached to a floating IP
|
||||||
stack = tobiko.required_setup_fixture(stacks.UbuntuServerStackFixture)
|
stack = tobiko.required_fixture(stacks.UbuntuServerStackFixture)
|
||||||
|
|
||||||
nameservers_filenames = ('/run/systemd/resolve/resolv.conf',)
|
nameservers_filenames = ('/run/systemd/resolve/resolv.conf',)
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ class UbuntuServerStackTest(test_cirros.CirrosServerStackTest):
|
|||||||
class UbuntuMinimalServerStackTest(UbuntuServerStackTest):
|
class UbuntuMinimalServerStackTest(UbuntuServerStackTest):
|
||||||
|
|
||||||
#: Stack of resources with a server attached to a floating IP
|
#: Stack of resources with a server attached to a floating IP
|
||||||
stack = tobiko.required_setup_fixture(
|
stack = tobiko.required_fixture(
|
||||||
stacks.UbuntuMinimalServerStackFixture)
|
stacks.UbuntuMinimalServerStackFixture)
|
||||||
|
|
||||||
def test_ping_fixed_ipv4(self):
|
def test_ping_fixed_ipv4(self):
|
||||||
|
@ -26,7 +26,7 @@ class GlanceApiTestCase(testtools.TestCase):
|
|||||||
"""Tests glance images API"""
|
"""Tests glance images API"""
|
||||||
|
|
||||||
#: Stack of resources with a network with a gateway router
|
#: Stack of resources with a network with a gateway router
|
||||||
fixture = tobiko.required_setup_fixture(stacks.CirrosImageFixture)
|
fixture = tobiko.required_fixture(stacks.CirrosImageFixture)
|
||||||
|
|
||||||
def test_get_image(self):
|
def test_get_image(self):
|
||||||
image = glance.get_image(self.fixture.image_id)
|
image = glance.get_image(self.fixture.image_id)
|
||||||
|
@ -45,7 +45,7 @@ class MyStack(heat.HeatStackFixture):
|
|||||||
|
|
||||||
class HeatStackFixtureTest(testtools.TestCase):
|
class HeatStackFixtureTest(testtools.TestCase):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(MyStack)
|
stack = tobiko.required_fixture(MyStack)
|
||||||
|
|
||||||
def test_get_stack(self):
|
def test_get_stack(self):
|
||||||
self.stack.wait_for_create_complete()
|
self.stack.wait_for_create_complete()
|
||||||
|
@ -35,7 +35,7 @@ class NeutronApiTest(testtools.TestCase):
|
|||||||
"""Tests network creation"""
|
"""Tests network creation"""
|
||||||
|
|
||||||
#: Stack of resources with a network with a gateway router
|
#: Stack of resources with a network with a gateway router
|
||||||
stack = tobiko.required_setup_fixture(stacks.NetworkStackFixture)
|
stack = tobiko.required_fixture(stacks.NetworkStackFixture)
|
||||||
|
|
||||||
def test_find_network_with_id(self):
|
def test_find_network_with_id(self):
|
||||||
network = neutron.find_network(id=self.stack.network_id)
|
network = neutron.find_network(id=self.stack.network_id)
|
||||||
@ -133,7 +133,7 @@ class NeutronApiTest(testtools.TestCase):
|
|||||||
class PortTest(testtools.TestCase):
|
class PortTest(testtools.TestCase):
|
||||||
|
|
||||||
#: Stack of resources with a network with a gateway router
|
#: Stack of resources with a network with a gateway router
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
def test_list_port_addresses(self, ip_version=None):
|
def test_list_port_addresses(self, ip_version=None):
|
||||||
port = neutron.find_port(device_id=self.stack.server_id)
|
port = neutron.find_port(device_id=self.stack.server_id)
|
||||||
|
@ -29,7 +29,7 @@ from tobiko.shell import ping
|
|||||||
|
|
||||||
class KeyPairTest(testtools.TestCase):
|
class KeyPairTest(testtools.TestCase):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(stacks.KeyPairStackFixture)
|
stack = tobiko.required_fixture(stacks.KeyPairStackFixture)
|
||||||
|
|
||||||
def test_key_files(self):
|
def test_key_files(self):
|
||||||
self.assertTrue(os.path.isfile(self.stack.key_file))
|
self.assertTrue(os.path.isfile(self.stack.key_file))
|
||||||
@ -40,7 +40,7 @@ class KeyPairTest(testtools.TestCase):
|
|||||||
class ClientTest(testtools.TestCase):
|
class ClientTest(testtools.TestCase):
|
||||||
|
|
||||||
#: Stack of resources with a server attached to a floating IP
|
#: Stack of resources with a server attached to a floating IP
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
@nova.skip_if_missing_hypervisors(count=1)
|
@nova.skip_if_missing_hypervisors(count=1)
|
||||||
def test_list_hypervisors(self):
|
def test_list_hypervisors(self):
|
||||||
@ -111,7 +111,7 @@ class ServerActionsStack(stacks.CirrosServerStackFixture):
|
|||||||
|
|
||||||
class ServerActionsTest(testtools.TestCase):
|
class ServerActionsTest(testtools.TestCase):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(ServerActionsStack)
|
stack = tobiko.required_fixture(ServerActionsStack)
|
||||||
|
|
||||||
def test_activate_server(self, initial_status='SHUTOFF'):
|
def test_activate_server(self, initial_status='SHUTOFF'):
|
||||||
self.stack.ensure_server_status(initial_status)
|
self.stack.ensure_server_status(initial_status)
|
||||||
@ -183,7 +183,7 @@ class MigrateServerStack(stacks.CirrosServerStackFixture):
|
|||||||
@nova.skip_if_missing_hypervisors(count=2)
|
@nova.skip_if_missing_hypervisors(count=2)
|
||||||
class MigrateServerTest(testtools.TestCase):
|
class MigrateServerTest(testtools.TestCase):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(MigrateServerStack)
|
stack = tobiko.required_fixture(MigrateServerStack)
|
||||||
|
|
||||||
def test_migrate_server(self):
|
def test_migrate_server(self):
|
||||||
"""Tests cold migration actually changes hypervisor
|
"""Tests cold migration actually changes hypervisor
|
||||||
|
@ -44,7 +44,7 @@ class PodmanNodeFixture(tobiko.SharedFixture):
|
|||||||
@keystone.skip_unless_has_keystone_credentials()
|
@keystone.skip_unless_has_keystone_credentials()
|
||||||
class PodmanClientTest(testtools.TestCase):
|
class PodmanClientTest(testtools.TestCase):
|
||||||
|
|
||||||
node = tobiko.required_setup_fixture(PodmanNodeFixture)
|
node = tobiko.required_fixture(PodmanNodeFixture)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ssh_client(self):
|
def ssh_client(self):
|
||||||
|
@ -34,7 +34,7 @@ from tobiko.openstack import stacks
|
|||||||
@keystone.skip_unless_has_keystone_credentials()
|
@keystone.skip_unless_has_keystone_credentials()
|
||||||
class CurlExecuteTest(testtools.TestCase):
|
class CurlExecuteTest(testtools.TestCase):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(stacks.UbuntuServerStackFixture)
|
stack = tobiko.required_fixture(stacks.UbuntuServerStackFixture)
|
||||||
|
|
||||||
def test_execute_curl(
|
def test_execute_curl(
|
||||||
self,
|
self,
|
||||||
|
@ -185,7 +185,7 @@ class SSHExecuteTest(ExecuteTest):
|
|||||||
|
|
||||||
expected_shell = SSH_EXPECTED_SHELL
|
expected_shell = SSH_EXPECTED_SHELL
|
||||||
|
|
||||||
server_stack = tobiko.required_setup_fixture(
|
server_stack = tobiko.required_fixture(
|
||||||
stacks.UbuntuMinimalServerStackFixture)
|
stacks.UbuntuMinimalServerStackFixture)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -199,5 +199,5 @@ class SSHExecuteTest(ExecuteTest):
|
|||||||
@keystone.skip_unless_has_keystone_credentials()
|
@keystone.skip_unless_has_keystone_credentials()
|
||||||
class CirrosSSHExecuteTest(SSHExecuteTest):
|
class CirrosSSHExecuteTest(SSHExecuteTest):
|
||||||
|
|
||||||
server_stack = tobiko.required_setup_fixture(
|
server_stack = tobiko.required_fixture(
|
||||||
stacks.CirrosServerStackFixture)
|
stacks.CirrosServerStackFixture)
|
||||||
|
@ -61,14 +61,14 @@ class GetHostnameTest(testtools.TestCase):
|
|||||||
tobiko.skip_test('SSH proxy server is not configured')
|
tobiko.skip_test('SSH proxy server is not configured')
|
||||||
self.test_ssh_hostname(ssh_client=ssh_client)
|
self.test_ssh_hostname(ssh_client=ssh_client)
|
||||||
|
|
||||||
cirros_server = tobiko.required_setup_fixture(
|
cirros_server = tobiko.required_fixture(
|
||||||
stacks.CirrosServerStackFixture)
|
stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
@keystone.skip_unless_has_keystone_credentials()
|
@keystone.skip_unless_has_keystone_credentials()
|
||||||
def test_cirros_hostname(self):
|
def test_cirros_hostname(self):
|
||||||
self.test_ssh_hostname(ssh_client=self.cirros_server.ssh_client)
|
self.test_ssh_hostname(ssh_client=self.cirros_server.ssh_client)
|
||||||
|
|
||||||
ubuntu_server = tobiko.required_setup_fixture(
|
ubuntu_server = tobiko.required_fixture(
|
||||||
stacks.UbuntuServerStackFixture)
|
stacks.UbuntuServerStackFixture)
|
||||||
|
|
||||||
@keystone.skip_unless_has_keystone_credentials()
|
@keystone.skip_unless_has_keystone_credentials()
|
||||||
|
@ -28,10 +28,10 @@ from tobiko.openstack import stacks
|
|||||||
|
|
||||||
class IfconfigTest(testtools.TestCase):
|
class IfconfigTest(testtools.TestCase):
|
||||||
|
|
||||||
cirros_stack = tobiko.required_setup_fixture(
|
cirros_stack = tobiko.required_fixture(
|
||||||
stacks.CirrosServerStackFixture)
|
stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
ubuntu_stack = tobiko.required_setup_fixture(
|
ubuntu_stack = tobiko.required_fixture(
|
||||||
stacks.UbuntuServerStackFixture)
|
stacks.UbuntuServerStackFixture)
|
||||||
|
|
||||||
def test_list_ip_addresses(self, ip_version=None, **execute_params):
|
def test_list_ip_addresses(self, ip_version=None, **execute_params):
|
||||||
|
@ -29,19 +29,19 @@ from tobiko.tests.functional.shell import _fixtures
|
|||||||
|
|
||||||
class IpTest(testtools.TestCase):
|
class IpTest(testtools.TestCase):
|
||||||
|
|
||||||
centos_stack = tobiko.required_setup_fixture(
|
centos_stack = tobiko.required_fixture(
|
||||||
stacks.CentosServerStackFixture)
|
stacks.CentosServerStackFixture)
|
||||||
|
|
||||||
cirros_stack = tobiko.required_setup_fixture(
|
cirros_stack = tobiko.required_fixture(
|
||||||
stacks.CirrosServerStackFixture)
|
stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
fedora_stack = tobiko.required_setup_fixture(
|
fedora_stack = tobiko.required_fixture(
|
||||||
stacks.FedoraServerStackFixture)
|
stacks.FedoraServerStackFixture)
|
||||||
|
|
||||||
ubuntu_stack = tobiko.required_setup_fixture(
|
ubuntu_stack = tobiko.required_fixture(
|
||||||
stacks.UbuntuServerStackFixture)
|
stacks.UbuntuServerStackFixture)
|
||||||
|
|
||||||
namespace = tobiko.required_setup_fixture(
|
namespace = tobiko.required_fixture(
|
||||||
_fixtures.NetworkNamespaceFixture)
|
_fixtures.NetworkNamespaceFixture)
|
||||||
|
|
||||||
def test_list_ip_addresses(self, ip_version=None, scope=None,
|
def test_list_ip_addresses(self, ip_version=None, scope=None,
|
||||||
|
@ -196,7 +196,7 @@ class ProxyPingTest(PingTest):
|
|||||||
|
|
||||||
class NamespacePingTest(PingTest):
|
class NamespacePingTest(PingTest):
|
||||||
|
|
||||||
namespace = tobiko.required_setup_fixture(
|
namespace = tobiko.required_fixture(
|
||||||
_fixtures.NetworkNamespaceFixture)
|
_fixtures.NetworkNamespaceFixture)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -215,7 +215,7 @@ class NamespacePingTest(PingTest):
|
|||||||
|
|
||||||
class CirrosPingTest(PingTest):
|
class CirrosPingTest(PingTest):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ssh_client(self):
|
def ssh_client(self):
|
||||||
@ -224,14 +224,14 @@ class CirrosPingTest(PingTest):
|
|||||||
|
|
||||||
class CentosPingTest(CirrosPingTest):
|
class CentosPingTest(CirrosPingTest):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(stacks.CentosServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CentosServerStackFixture)
|
||||||
|
|
||||||
|
|
||||||
class FedoraPingTest(CirrosPingTest):
|
class FedoraPingTest(CirrosPingTest):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(stacks.FedoraServerStackFixture)
|
stack = tobiko.required_fixture(stacks.FedoraServerStackFixture)
|
||||||
|
|
||||||
|
|
||||||
class UbuntuPingTest(CirrosPingTest):
|
class UbuntuPingTest(CirrosPingTest):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(stacks.UbuntuServerStackFixture)
|
stack = tobiko.required_fixture(stacks.UbuntuServerStackFixture)
|
||||||
|
@ -44,7 +44,7 @@ class ProcessFixture(tobiko.SharedFixture):
|
|||||||
|
|
||||||
class ProcessTest(testtools.TestCase):
|
class ProcessTest(testtools.TestCase):
|
||||||
|
|
||||||
fixture = tobiko.required_setup_fixture(ProcessFixture)
|
fixture = tobiko.required_fixture(ProcessFixture)
|
||||||
|
|
||||||
def test_stdout(self):
|
def test_stdout(self):
|
||||||
fixture = self.fixture
|
fixture = self.fixture
|
||||||
@ -61,12 +61,12 @@ class LocalProcessFixture(ProcessFixture):
|
|||||||
|
|
||||||
class LocalProcessTest(ProcessTest):
|
class LocalProcessTest(ProcessTest):
|
||||||
|
|
||||||
fixture = tobiko.required_setup_fixture(LocalProcessFixture)
|
fixture = tobiko.required_fixture(LocalProcessFixture)
|
||||||
|
|
||||||
|
|
||||||
class SSHProcessFixture(ProcessFixture):
|
class SSHProcessFixture(ProcessFixture):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(
|
stack = tobiko.required_fixture(
|
||||||
stacks.UbuntuMinimalServerStackFixture)
|
stacks.UbuntuMinimalServerStackFixture)
|
||||||
|
|
||||||
def setup_fixture(self):
|
def setup_fixture(self):
|
||||||
@ -77,16 +77,16 @@ class SSHProcessFixture(ProcessFixture):
|
|||||||
@keystone.skip_unless_has_keystone_credentials()
|
@keystone.skip_unless_has_keystone_credentials()
|
||||||
class SSHProcessTest(ProcessTest):
|
class SSHProcessTest(ProcessTest):
|
||||||
|
|
||||||
fixture = tobiko.required_setup_fixture(SSHProcessFixture)
|
fixture = tobiko.required_fixture(SSHProcessFixture)
|
||||||
|
|
||||||
|
|
||||||
class CirrosProcessFixture(SSHProcessFixture):
|
class CirrosProcessFixture(SSHProcessFixture):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(
|
stack = tobiko.required_fixture(
|
||||||
stacks.CirrosServerStackFixture)
|
stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
|
|
||||||
@keystone.skip_unless_has_keystone_credentials()
|
@keystone.skip_unless_has_keystone_credentials()
|
||||||
class CirrosProcessTest(ProcessTest):
|
class CirrosProcessTest(ProcessTest):
|
||||||
|
|
||||||
fixture = tobiko.required_setup_fixture(CirrosProcessFixture)
|
fixture = tobiko.required_fixture(CirrosProcessFixture)
|
||||||
|
@ -112,7 +112,7 @@ class LocalPsTest(testtools.TestCase):
|
|||||||
|
|
||||||
class CirrosPsTest(LocalPsTest):
|
class CirrosPsTest(LocalPsTest):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ssh_client(self) -> ssh.SSHClientType:
|
def ssh_client(self) -> ssh.SSHClientType:
|
||||||
|
@ -36,7 +36,7 @@ class RebootHostStack(stacks.CirrosServerStackFixture):
|
|||||||
|
|
||||||
class RebootHostTest(testtools.TestCase):
|
class RebootHostTest(testtools.TestCase):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(RebootHostStack)
|
stack = tobiko.required_fixture(RebootHostStack)
|
||||||
|
|
||||||
def test_reboot_host(self, nova_reboot=False, **params):
|
def test_reboot_host(self, nova_reboot=False, **params):
|
||||||
server = self.stack.ensure_server_status('ACTIVE')
|
server = self.stack.ensure_server_status('ACTIVE')
|
||||||
|
@ -17,14 +17,16 @@ from __future__ import absolute_import
|
|||||||
|
|
||||||
import tobiko
|
import tobiko
|
||||||
from tobiko.shell import sh
|
from tobiko.shell import sh
|
||||||
from tobiko import tripleo
|
|
||||||
from tobiko.tests.functional.openstack import test_topology
|
from tobiko.tests.functional.openstack import test_topology
|
||||||
|
from tobiko import tripleo
|
||||||
|
|
||||||
|
|
||||||
@tripleo.skip_if_missing_undercloud
|
@tripleo.skip_if_missing_undercloud
|
||||||
class TripleoTopologyTest(test_topology.OpenStackTopologyTest):
|
class TripleoTopologyTest(test_topology.OpenStackTopologyTest):
|
||||||
|
|
||||||
topology = tobiko.required_setup_fixture(tripleo.TripleoTopology)
|
@property
|
||||||
|
def topology(self) -> tripleo.TripleoTopology:
|
||||||
|
return tobiko.setup_fixture(tripleo.TripleoTopology)
|
||||||
|
|
||||||
def test_undercloud_group(self):
|
def test_undercloud_group(self):
|
||||||
ssh_client = tripleo.undercloud_ssh_client()
|
ssh_client = tripleo.undercloud_ssh_client()
|
||||||
|
@ -25,7 +25,7 @@ from tobiko.openstack import topology
|
|||||||
|
|
||||||
class OpenstackNodesTest(testtools.TestCase):
|
class OpenstackNodesTest(testtools.TestCase):
|
||||||
|
|
||||||
topology = tobiko.required_setup_fixture(
|
topology = tobiko.required_fixture(
|
||||||
topology.get_default_openstack_topology_class())
|
topology.get_default_openstack_topology_class())
|
||||||
|
|
||||||
def test_public_ips(self):
|
def test_public_ips(self):
|
||||||
|
@ -124,7 +124,7 @@ class NeutronLogCliTest(BaseCliTest):
|
|||||||
|
|
||||||
LOGS_AMOUNT = 2
|
LOGS_AMOUNT = 2
|
||||||
|
|
||||||
sec_groups_stack = tobiko.required_setup_fixture(
|
sec_groups_stack = tobiko.required_fixture(
|
||||||
stacks.SecurityGroupsFixture)
|
stacks.SecurityGroupsFixture)
|
||||||
|
|
||||||
def _get_icmp_sec_group_id(self):
|
def _get_icmp_sec_group_id(self):
|
||||||
|
@ -39,7 +39,7 @@ class FloatingIPTest(testtools.TestCase):
|
|||||||
"""Tests connectivity via floating IPs"""
|
"""Tests connectivity via floating IPs"""
|
||||||
|
|
||||||
#: Resources stack with floating IP and Nova server
|
#: Resources stack with floating IP and Nova server
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
def test_ssh(self):
|
def test_ssh(self):
|
||||||
"""Test SSH connectivity to floating IP address"""
|
"""Test SSH connectivity to floating IP address"""
|
||||||
@ -128,7 +128,7 @@ class FloatingIPWithPortSecurityFixture(stacks.CirrosServerStackFixture):
|
|||||||
"""Heat stack for testing a floating IP instance with port security"""
|
"""Heat stack for testing a floating IP instance with port security"""
|
||||||
|
|
||||||
#: Resources stack with security group to allow ping Nova servers
|
#: Resources stack with security group to allow ping Nova servers
|
||||||
security_groups_stack = tobiko.required_setup_fixture(
|
security_groups_stack = tobiko.required_fixture(
|
||||||
stacks.SecurityGroupsFixture)
|
stacks.SecurityGroupsFixture)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -143,7 +143,7 @@ class FloatingIPWithPortSecurityTest(FloatingIPTest):
|
|||||||
"""Tests connectivity via floating IPs with port security"""
|
"""Tests connectivity via floating IPs with port security"""
|
||||||
|
|
||||||
#: Resources stack with floating IP and Nova server with port security
|
#: Resources stack with floating IP and Nova server with port security
|
||||||
stack = tobiko.required_setup_fixture(FloatingIPWithPortSecurityFixture)
|
stack = tobiko.required_fixture(FloatingIPWithPortSecurityFixture)
|
||||||
|
|
||||||
def test_ping(self):
|
def test_ping(self):
|
||||||
"""Test connectivity to floating IP address"""
|
"""Test connectivity to floating IP address"""
|
||||||
@ -195,7 +195,7 @@ class FloatingIPWithICMPSecurityGroupFixture(
|
|||||||
class FloatingIPWithICMPSecurityGroupTest(FloatingIPTest):
|
class FloatingIPWithICMPSecurityGroupTest(FloatingIPTest):
|
||||||
"""Tests connectivity via floating IP with security ICMP security group"""
|
"""Tests connectivity via floating IP with security ICMP security group"""
|
||||||
#: Resources stack with floating IP and Nova server to ping
|
#: Resources stack with floating IP and Nova server to ping
|
||||||
stack = tobiko.required_setup_fixture(
|
stack = tobiko.required_fixture(
|
||||||
FloatingIPWithICMPSecurityGroupFixture)
|
FloatingIPWithICMPSecurityGroupFixture)
|
||||||
|
|
||||||
|
|
||||||
@ -206,7 +206,7 @@ class FloatingIPWithNetMtuWritableFixture(stacks.CirrosServerStackFixture):
|
|||||||
"""Heat stack for testing floating IP with a custom MTU network value"""
|
"""Heat stack for testing floating IP with a custom MTU network value"""
|
||||||
|
|
||||||
#: Heat stack for creating internal network with custom MTU value
|
#: Heat stack for creating internal network with custom MTU value
|
||||||
network_stack = tobiko.required_setup_fixture(
|
network_stack = tobiko.required_fixture(
|
||||||
stacks.NetworkWithNetMtuWriteStackFixture)
|
stacks.NetworkWithNetMtuWriteStackFixture)
|
||||||
|
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ class FloatingIpWithMtuWritableTest(FloatingIPTest):
|
|||||||
"""Tests connectivity via floating IP with a custom MTU value"""
|
"""Tests connectivity via floating IP with a custom MTU value"""
|
||||||
|
|
||||||
#: Resources stack with floating IP and Nova server
|
#: Resources stack with floating IP and Nova server
|
||||||
stack = tobiko.required_setup_fixture(FloatingIPWithNetMtuWritableFixture)
|
stack = tobiko.required_fixture(FloatingIPWithNetMtuWritableFixture)
|
||||||
|
|
||||||
def test_net_mtu_write(self):
|
def test_net_mtu_write(self):
|
||||||
"""Test 'mtu' network attribute"""
|
"""Test 'mtu' network attribute"""
|
||||||
@ -234,13 +234,13 @@ class FloatingIpWithMtuWritableTest(FloatingIPTest):
|
|||||||
count=2)
|
count=2)
|
||||||
class FloatingIpWithL3HATest(FloatingIPTest):
|
class FloatingIpWithL3HATest(FloatingIPTest):
|
||||||
#: Resources stack with floating IP and Nova server
|
#: Resources stack with floating IP and Nova server
|
||||||
stack = tobiko.required_setup_fixture(stacks.L3haServerStackFixture)
|
stack = tobiko.required_fixture(stacks.L3haServerStackFixture)
|
||||||
|
|
||||||
|
|
||||||
@topology.skip_unless_osp_version('16.1', higher=True)
|
@topology.skip_unless_osp_version('16.1', higher=True)
|
||||||
class TestFloatingIPLogging(testtools.TestCase):
|
class TestFloatingIPLogging(testtools.TestCase):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(stacks.NetworkStackFixture)
|
stack = tobiko.required_fixture(stacks.NetworkStackFixture)
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestFloatingIPLogging, self).setUp()
|
super(TestFloatingIPLogging, self).setUp()
|
||||||
|
@ -29,7 +29,7 @@ from tobiko.shell import sh
|
|||||||
class NetworkTest(testtools.TestCase):
|
class NetworkTest(testtools.TestCase):
|
||||||
|
|
||||||
#: Resources stack with Nova server to send messages to
|
#: Resources stack with Nova server to send messages to
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosPeerServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosPeerServerStackFixture)
|
||||||
|
|
||||||
def test_stack_create_complete(self):
|
def test_stack_create_complete(self):
|
||||||
self.stack.key_pair_stack.wait_for_create_complete()
|
self.stack.key_pair_stack.wait_for_create_complete()
|
||||||
@ -62,7 +62,7 @@ class NetworkTest(testtools.TestCase):
|
|||||||
class SameHostNetworkTest(NetworkTest):
|
class SameHostNetworkTest(NetworkTest):
|
||||||
|
|
||||||
#: Resources stack with Nova server to send messages to
|
#: Resources stack with Nova server to send messages to
|
||||||
stack = tobiko.required_setup_fixture(
|
stack = tobiko.required_fixture(
|
||||||
stacks.CirrosSameHostServerStackFixture)
|
stacks.CirrosSameHostServerStackFixture)
|
||||||
|
|
||||||
def test_same_host(self):
|
def test_same_host(self):
|
||||||
@ -79,7 +79,7 @@ class SameHostNetworkTest(NetworkTest):
|
|||||||
class DifferentHostNetworkTest(NetworkTest):
|
class DifferentHostNetworkTest(NetworkTest):
|
||||||
|
|
||||||
#: Resources stack with Nova server to send messages to
|
#: Resources stack with Nova server to send messages to
|
||||||
stack = tobiko.required_setup_fixture(
|
stack = tobiko.required_fixture(
|
||||||
stacks.CirrosDifferentHostServerStackFixture)
|
stacks.CirrosDifferentHostServerStackFixture)
|
||||||
|
|
||||||
def test_different_host(self):
|
def test_different_host(self):
|
||||||
@ -98,7 +98,7 @@ class DifferentHostNetworkTest(NetworkTest):
|
|||||||
count=2)
|
count=2)
|
||||||
class L3haNetworkTest(NetworkTest):
|
class L3haNetworkTest(NetworkTest):
|
||||||
#: Resources stack with floating IP and Nova server
|
#: Resources stack with floating IP and Nova server
|
||||||
stack = tobiko.required_setup_fixture(stacks.L3haPeerServerStackFixture)
|
stack = tobiko.required_fixture(stacks.L3haPeerServerStackFixture)
|
||||||
|
|
||||||
|
|
||||||
@neutron.skip_if_missing_networking_extensions('l3-ha')
|
@neutron.skip_if_missing_networking_extensions('l3-ha')
|
||||||
@ -106,7 +106,7 @@ class L3haNetworkTest(NetworkTest):
|
|||||||
count=2)
|
count=2)
|
||||||
class L3haSameHostNetworkTest(SameHostNetworkTest):
|
class L3haSameHostNetworkTest(SameHostNetworkTest):
|
||||||
#: Resources stack with Nova server to send messages to
|
#: Resources stack with Nova server to send messages to
|
||||||
stack = tobiko.required_setup_fixture(
|
stack = tobiko.required_fixture(
|
||||||
stacks.L3haSameHostServerStackFixture)
|
stacks.L3haSameHostServerStackFixture)
|
||||||
|
|
||||||
|
|
||||||
@ -116,5 +116,5 @@ class L3haSameHostNetworkTest(SameHostNetworkTest):
|
|||||||
@nova.skip_if_missing_hypervisors(count=2, state='up', status='enabled')
|
@nova.skip_if_missing_hypervisors(count=2, state='up', status='enabled')
|
||||||
class L3haDifferentHostNetworkTest(DifferentHostNetworkTest):
|
class L3haDifferentHostNetworkTest(DifferentHostNetworkTest):
|
||||||
#: Resources stack with Nova server to send messages to
|
#: Resources stack with Nova server to send messages to
|
||||||
stack = tobiko.required_setup_fixture(
|
stack = tobiko.required_fixture(
|
||||||
stacks.L3haDifferentHostServerStackFixture)
|
stacks.L3haDifferentHostServerStackFixture)
|
||||||
|
@ -44,7 +44,7 @@ class PortTest(testtools.TestCase):
|
|||||||
"""Test Neutron ports"""
|
"""Test Neutron ports"""
|
||||||
|
|
||||||
#: Resources stack with Nova server to send messages to
|
#: Resources stack with Nova server to send messages to
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
def test_port_ips(self, ip_version: typing.Optional[int] = None):
|
def test_port_ips(self, ip_version: typing.Optional[int] = None):
|
||||||
"""Checks port IPS has been assigned to server via DHCP protocol"""
|
"""Checks port IPS has been assigned to server via DHCP protocol"""
|
||||||
@ -124,7 +124,7 @@ class UbuntuExternalPortTest(PortTest):
|
|||||||
"""Test Neutron ports"""
|
"""Test Neutron ports"""
|
||||||
|
|
||||||
#: Resources stack with Nova server to send messages to
|
#: Resources stack with Nova server to send messages to
|
||||||
stack = tobiko.required_setup_fixture(
|
stack = tobiko.required_fixture(
|
||||||
stacks.UbuntuExternalServerStackFixture)
|
stacks.UbuntuExternalServerStackFixture)
|
||||||
|
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ class UbuntuExternalPortTest(PortTest):
|
|||||||
count=2)
|
count=2)
|
||||||
class L3HAPortTest(PortTest):
|
class L3HAPortTest(PortTest):
|
||||||
#: Resources stack with floating IP and Nova server
|
#: Resources stack with floating IP and Nova server
|
||||||
stack = tobiko.required_setup_fixture(stacks.L3haServerStackFixture)
|
stack = tobiko.required_fixture(stacks.L3haServerStackFixture)
|
||||||
|
|
||||||
|
|
||||||
# --- Port events logging ----------------------------------------------------
|
# --- Port events logging ----------------------------------------------------
|
||||||
@ -147,7 +147,7 @@ class PortLogsStack(stacks.CirrosServerStackFixture):
|
|||||||
@neutron.skip_unless_is_ovs()
|
@neutron.skip_unless_is_ovs()
|
||||||
class PortLogsTest(testtools.TestCase):
|
class PortLogsTest(testtools.TestCase):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(PortLogsStack)
|
stack = tobiko.required_fixture(PortLogsStack)
|
||||||
|
|
||||||
def test_nova_port_notification_on_activate(self):
|
def test_nova_port_notification_on_activate(self):
|
||||||
self.stack.ensure_server_status('SHUTOFF')
|
self.stack.ensure_server_status('SHUTOFF')
|
||||||
@ -206,7 +206,7 @@ class PortLogsTest(testtools.TestCase):
|
|||||||
|
|
||||||
class ExtraDhcpOptsPortTest(PortTest):
|
class ExtraDhcpOptsPortTest(PortTest):
|
||||||
"""Test extra-dhcp-options port parameter"""
|
"""Test extra-dhcp-options port parameter"""
|
||||||
stack = tobiko.required_setup_fixture(
|
stack = tobiko.required_fixture(
|
||||||
stacks.ExtraDhcpOptsCirrosServerStackFixture)
|
stacks.ExtraDhcpOptsCirrosServerStackFixture)
|
||||||
|
|
||||||
def test_extra_dhcp_opts(self):
|
def test_extra_dhcp_opts(self):
|
||||||
@ -230,7 +230,7 @@ class ExtraDhcpOptsPortTest(PortTest):
|
|||||||
@neutron.skip_unless_is_ovn()
|
@neutron.skip_unless_is_ovn()
|
||||||
class ExtraDhcpOptsPortLoggingTest(testtools.TestCase):
|
class ExtraDhcpOptsPortLoggingTest(testtools.TestCase):
|
||||||
|
|
||||||
stack = tobiko.required_setup_fixture(stacks.NetworkStackFixture)
|
stack = tobiko.required_fixture(stacks.NetworkStackFixture)
|
||||||
|
|
||||||
@pytest.mark.flaky(reruns=2, reruns_delay=60)
|
@pytest.mark.flaky(reruns=2, reruns_delay=60)
|
||||||
def test_extra_dhcp_opts_logs_unsupported_options(self):
|
def test_extra_dhcp_opts_logs_unsupported_options(self):
|
||||||
|
@ -42,9 +42,9 @@ class QoSNetworkTest(testtools.TestCase):
|
|||||||
"""Tests QoS basic functionality"""
|
"""Tests QoS basic functionality"""
|
||||||
|
|
||||||
#: Resources stacks with QoS Policy and QoS Rules and Advanced server
|
#: Resources stacks with QoS Policy and QoS Rules and Advanced server
|
||||||
network = tobiko.required_setup_fixture(stacks.QosNetworkStackFixture)
|
network = tobiko.required_fixture(stacks.QosNetworkStackFixture)
|
||||||
policy = tobiko.required_setup_fixture(stacks.QosPolicyStackFixture)
|
policy = tobiko.required_fixture(stacks.QosPolicyStackFixture)
|
||||||
server = tobiko.required_setup_fixture(stacks.QosServerStackFixture)
|
server = tobiko.required_fixture(stacks.QosServerStackFixture)
|
||||||
|
|
||||||
@pytest.mark.flaky(reruns=3, reruns_delay=120)
|
@pytest.mark.flaky(reruns=3, reruns_delay=120)
|
||||||
def test_ping_dscp(self):
|
def test_ping_dscp(self):
|
||||||
|
@ -36,7 +36,7 @@ class RouterTest(testtools.TestCase):
|
|||||||
"""Test Neutron routers"""
|
"""Test Neutron routers"""
|
||||||
|
|
||||||
#: Resources stack with Nova server to send messages to
|
#: Resources stack with Nova server to send messages to
|
||||||
stack = tobiko.required_setup_fixture(stacks.CirrosServerStackFixture)
|
stack = tobiko.required_fixture(stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(RouterTest, self).setUp()
|
super(RouterTest, self).setUp()
|
||||||
@ -130,7 +130,7 @@ class L3HARouterTest(RouterTest):
|
|||||||
"""Test Neutron HA routers"""
|
"""Test Neutron HA routers"""
|
||||||
|
|
||||||
#: Resources stack with Nova server to send messages to
|
#: Resources stack with Nova server to send messages to
|
||||||
stack = tobiko.required_setup_fixture(stacks.L3haServerStackFixture)
|
stack = tobiko.required_fixture(stacks.L3haServerStackFixture)
|
||||||
|
|
||||||
@neutron.skip_if_missing_networking_extensions('l3_agent_scheduler')
|
@neutron.skip_if_missing_networking_extensions('l3_agent_scheduler')
|
||||||
def test_router_is_scheduled_on_l3_agents(self):
|
def test_router_is_scheduled_on_l3_agents(self):
|
||||||
@ -150,8 +150,8 @@ class NetworkWithNoServersStack(stacks.NetworkStackFixture):
|
|||||||
@neutron.skip_unless_is_ovs()
|
@neutron.skip_unless_is_ovs()
|
||||||
class DVRTest(testtools.TestCase):
|
class DVRTest(testtools.TestCase):
|
||||||
|
|
||||||
router_stack = tobiko.required_setup_fixture(NetworkWithNoServersStack)
|
router_stack = tobiko.required_fixture(NetworkWithNoServersStack)
|
||||||
server_stack = tobiko.required_setup_fixture(
|
server_stack = tobiko.required_fixture(
|
||||||
stacks.CirrosServerStackFixture)
|
stacks.CirrosServerStackFixture)
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -41,10 +41,10 @@ class OctaviaBasicTrafficScenarioTest(testtools.TestCase):
|
|||||||
Create a client that is connected to the load balancer VIP port,
|
Create a client that is connected to the load balancer VIP port,
|
||||||
Generate network traffic from the client to the load balanacer.
|
Generate network traffic from the client to the load balanacer.
|
||||||
"""
|
"""
|
||||||
loadbalancer_stack = tobiko.required_setup_fixture(
|
loadbalancer_stack = tobiko.required_fixture(
|
||||||
stacks.AmphoraIPv4LoadBalancerStack)
|
stacks.AmphoraIPv4LoadBalancerStack)
|
||||||
|
|
||||||
listener_stack = tobiko.required_setup_fixture(
|
listener_stack = tobiko.required_fixture(
|
||||||
stacks.HttpRoundRobinAmphoraIpv4Listener)
|
stacks.HttpRoundRobinAmphoraIpv4Listener)
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
@ -95,10 +95,10 @@ class OctaviaOVNProviderTrafficTest(testtools.TestCase):
|
|||||||
Create a client that is connected to the load balancer VIP port via FIP,
|
Create a client that is connected to the load balancer VIP port via FIP,
|
||||||
Generate network traffic from the client to the load balanacer via ssh.
|
Generate network traffic from the client to the load balanacer via ssh.
|
||||||
"""
|
"""
|
||||||
loadbalancer_stack = tobiko.required_setup_fixture(
|
loadbalancer_stack = tobiko.required_fixture(
|
||||||
stacks.OVNIPv4LoadBalancerStack)
|
stacks.OVNIPv4LoadBalancerStack)
|
||||||
|
|
||||||
listener_stack = tobiko.required_setup_fixture(
|
listener_stack = tobiko.required_fixture(
|
||||||
stacks.TcpSourceIpPortOvnIpv4Listener)
|
stacks.TcpSourceIpPortOvnIpv4Listener)
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -102,7 +102,7 @@ class V3CloudsFileFixture(CloudsFileFixture):
|
|||||||
|
|
||||||
class CloudsFileKeystoneCredentialsFixtureTest(openstack.OpenstackTest):
|
class CloudsFileKeystoneCredentialsFixtureTest(openstack.OpenstackTest):
|
||||||
|
|
||||||
config = tobiko.required_setup_fixture(
|
config = tobiko.required_fixture(
|
||||||
_clouds_file.DefaultCloudsFileConfig)
|
_clouds_file.DefaultCloudsFileConfig)
|
||||||
|
|
||||||
def test_init(self):
|
def test_init(self):
|
||||||
|
@ -179,7 +179,7 @@ class OvercloudHostConfig(tobiko.SharedFixture):
|
|||||||
hostname = None
|
hostname = None
|
||||||
port = None
|
port = None
|
||||||
username = None
|
username = None
|
||||||
key_file = tobiko.required_setup_fixture(OvercloudSshKeyFileFixture)
|
key_file = tobiko.required_fixture(OvercloudSshKeyFileFixture)
|
||||||
ip_version = None
|
ip_version = None
|
||||||
network_name = None
|
network_name = None
|
||||||
key_filename = None
|
key_filename = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user