Honour ssh_connect_method in test_baremetal_server_ops
This commit changes test_baremetal_server_ops to add
a floating IP and check SSH connectivity with floating IP
only if [compute]ssh_connect_method == 'floating'.
Change-Id: I13bfd76522ebddd68fd347758e4861150ebedbea
diff --git a/tempest/scenario/test_baremetal_basic_ops.py b/tempest/scenario/test_baremetal_basic_ops.py
index 612a5a2..e54c25a 100644
--- a/tempest/scenario/test_baremetal_basic_ops.py
+++ b/tempest/scenario/test_baremetal_basic_ops.py
@@ -126,8 +126,9 @@
self.boot_instance()
self.validate_ports()
self.verify_connectivity()
- floating_ip = self.add_floating_ip()
- self.verify_connectivity(ip=floating_ip)
+ if CONF.compute.ssh_connect_method == 'floating':
+ floating_ip = self.add_floating_ip()
+ self.verify_connectivity(ip=floating_ip)
vm_client = self.get_remote_client(self.instance)