Remove check_floating_ip_status & _associate_floating_ip methods
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1] it can be now reused in plugins. Replaced methods: * _associate_floating_ip * check_floating_ip_status Etherpad concerning this effort: https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup The commit also bumps the minimal version of tempest in the requirements to tempest>=27.0.0. [1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0 Change-Id: Ie17c1d9349e98ce016801bf47c1cb9dba18b51f6
This commit is contained in:
parent
f880ce3b69
commit
c1f7b90244
|
@ -331,41 +331,6 @@ class NetworkScenarioTest(ScenarioTest):
|
|||
floating_ip['id'])
|
||||
return floating_ip
|
||||
|
||||
def _associate_floating_ip(self, floating_ip, server):
|
||||
port_id, _ = self.get_server_port_id_and_ip4(server)
|
||||
kwargs = dict(port_id=port_id)
|
||||
floating_ip = self.floating_ips_client.update_floatingip(
|
||||
floating_ip['id'], **kwargs)['floatingip']
|
||||
self.assertEqual(port_id, floating_ip['port_id'])
|
||||
return floating_ip
|
||||
|
||||
def check_floating_ip_status(self, floating_ip, status):
|
||||
"""Verifies floatingip reaches the given status
|
||||
|
||||
:param dict floating_ip: floating IP dict to check status
|
||||
:param status: target status
|
||||
:raises: AssertionError if status doesn't match
|
||||
"""
|
||||
floatingip_id = floating_ip['id']
|
||||
|
||||
def refresh():
|
||||
result = (self.floating_ips_client.
|
||||
show_floatingip(floatingip_id)['floatingip'])
|
||||
return status == result['status']
|
||||
|
||||
test_utils.call_until_true(refresh,
|
||||
CONF.network.build_timeout,
|
||||
CONF.network.build_interval)
|
||||
floating_ip = self.floating_ips_client.show_floatingip(
|
||||
floatingip_id)['floatingip']
|
||||
self.assertEqual(status, floating_ip['status'],
|
||||
message="FloatingIP: {fp} is at status: {cst}. "
|
||||
"failed to reach status: {st}"
|
||||
.format(fp=floating_ip, cst=floating_ip['status'],
|
||||
st=status))
|
||||
LOG.info("FloatingIP: {fp} is at status: {st}"
|
||||
.format(fp=floating_ip, st=status))
|
||||
|
||||
def _check_tenant_network_connectivity(self, server,
|
||||
username,
|
||||
private_key,
|
||||
|
|
|
@ -6,4 +6,4 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
|||
|
||||
ddt>=1.0.1 # MIT
|
||||
oslo.log>=3.36.0 # Apache-2.0
|
||||
tempest>=17.1.0 # Apache-2.0
|
||||
tempest>=27.0.0 # Apache-2.0
|
||||
|
|
Loading…
Reference in New Issue