Merge "Remove use of deprecated config options for volume API selection"
diff --git a/ironic_tempest_plugin/tests/scenario/baremetal_manager.py b/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
index 1788463..db0d200 100644
--- a/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
+++ b/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
@@ -34,14 +34,13 @@
def inner(*args, **kwargs):
# TODO(vsaienko): make number of retries and delay between
# them configurable in future.
- e = None
for att in range(10):
try:
return func(*args, **kwargs)
- except lib_exc.Conflict as e:
+ except lib_exc.Conflict:
+ if att == 9:
+ raise
time.sleep(1)
- raise lib_exc.Conflict(e)
-
return inner
diff --git a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
index eac82f3..9948ca8 100644
--- a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
+++ b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
@@ -17,6 +17,7 @@
from oslo_utils import uuidutils
from tempest import config
+from tempest.lib.common.utils.linux import remote_client
from tempest.lib.common.utils import test_utils
from tempest.lib import exceptions as lib_exc
from tempest.scenario import manager
@@ -600,3 +601,21 @@
# NOTE(dtantsur): apparently cirros cannot boot from md devices :(
# So we only move the node to active (verifying deployment).
self.set_node_to_active()
+
+ def rescue_unrescue(self):
+ rescue_password = uuidutils.generate_uuid()
+ self.rescue_node(self.node['uuid'], rescue_password)
+ self.assertTrue(self.ping_ip_address(self.node_ip,
+ should_succeed=True))
+
+ # Open ssh connection to server
+ linux_client = remote_client.RemoteClient(
+ self.node_ip,
+ 'rescue',
+ password=rescue_password,
+ ssh_timeout=CONF.baremetal.rescue_timeout)
+ linux_client.validate_authentication()
+
+ self.unrescue_node(self.node['uuid'])
+ self.assertTrue(self.ping_ip_address(self.node_ip,
+ should_succeed=True))
diff --git a/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_basic_ops.py b/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_basic_ops.py
index ecd4463..0f91b01 100644
--- a/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_basic_ops.py
+++ b/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_basic_ops.py
@@ -204,13 +204,7 @@
@utils.services('image', 'network')
def test_rescue_mode(self):
self.set_node_to_active(self.image_ref)
- self.rescue_node(self.node['uuid'], 'abc123')
- self.assertTrue(self.ping_ip_address(self.node_ip,
- should_succeed=True))
-
- self.unrescue_node(self.node['uuid'])
- self.assertTrue(self.ping_ip_address(self.node_ip,
- should_succeed=True))
+ self.rescue_unrescue()
class BaremetalIpmiRescuePartitioned(bsm.BaremetalStandaloneScenarioTest):
@@ -233,13 +227,7 @@
@utils.services('image', 'network')
def test_rescue_mode(self):
self.set_node_to_active(self.image_ref)
- self.rescue_node(self.node['uuid'], 'abc123')
- self.assertTrue(self.ping_ip_address(self.node_ip,
- should_succeed=True))
-
- self.unrescue_node(self.node['uuid'])
- self.assertTrue(self.ping_ip_address(self.node_ip,
- should_succeed=True))
+ self.rescue_unrescue()
class BaremetalIloDirectWholediskHttpLink(