Merge "make schedule_to_every_node use real scheduler hint"
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index ec2192f..b3f69c1 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -147,7 +147,7 @@
            Method will delete the server when it's dirty.
            The setUp method is responsible for creating a new server.
            Exceptions raised in tearDown class are fails the test case,
-           This method supposed to use only by tierDown methods, when
+           This method supposed to use only by tearDown methods, when
            the shared server_id is stored in the server_id of the class.
         """
         if getattr(cls, 'server_id', None) is not None:
diff --git a/tempest/config.py b/tempest/config.py
index 95553e1..26823de 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -255,6 +255,7 @@
                     "when sshing to a guest."),
     cfg.StrOpt('ssh_auth_method',
                default='keypair',
+               choices=('keypair', 'configured', 'adminpass', 'disabled'),
                help="Auth method used for authenticate to the instance. "
                     "Valid choices are: keypair, configured, adminpass "
                     "and disabled. "
@@ -264,6 +265,7 @@
                     "Disabled: avoid using ssh when it is an option."),
     cfg.StrOpt('ssh_connect_method',
                default='floating',
+               choices=('fixed', 'floating'),
                help="How to connect to the instance? "
                     "fixed: using the first ip belongs the fixed network "
                     "floating: creating and using a floating ip."),
diff --git a/tempest/scenario/test_baremetal_basic_ops.py b/tempest/scenario/test_baremetal_basic_ops.py
index c0b82b6..ed691ac 100644
--- a/tempest/scenario/test_baremetal_basic_ops.py
+++ b/tempest/scenario/test_baremetal_basic_ops.py
@@ -107,13 +107,6 @@
             return None
         return int(ephemeral)
 
-    def add_floating_ip(self):
-        floating_ip = (self.floating_ips_client.create_floating_ip()
-                       ['floating_ip'])
-        self.floating_ips_client.associate_floating_ip_to_server(
-            floating_ip['ip'], self.instance['id'])
-        return floating_ip['ip']
-
     def validate_ports(self):
         for port in self.get_ports(self.node['uuid']):
             n_port_id = port['extra']['vif_port_id']
@@ -131,7 +124,7 @@
         self.validate_ports()
         self.verify_connectivity()
         if CONF.compute.ssh_connect_method == 'floating':
-            floating_ip = self.add_floating_ip()
+            floating_ip = self.create_floating_ip(self.instance)['ip']
             self.verify_connectivity(ip=floating_ip)
 
         vm_client = self.get_remote_client(self.instance)
diff --git a/tempest/scenario/test_server_basic_ops.py b/tempest/scenario/test_server_basic_ops.py
index e2f8adb..c55cff6 100644
--- a/tempest/scenario/test_server_basic_ops.py
+++ b/tempest/scenario/test_server_basic_ops.py
@@ -89,17 +89,10 @@
     def verify_ssh(self):
         if self.run_ssh:
             # Obtain a floating IP
-            self.floating_ip = (self.floating_ips_client.create_floating_ip()
-                                ['floating_ip'])
-            self.addCleanup(self.delete_wrapper,
-                            self.floating_ips_client.delete_floating_ip,
-                            self.floating_ip['id'])
-            # Attach a floating IP
-            self.floating_ips_client.associate_floating_ip_to_server(
-                self.floating_ip['ip'], self.instance['id'])
+            self.fip = self.create_floating_ip(self.instance)['ip']
             # Check ssh
             self.ssh_client = self.get_remote_client(
-                server_or_ip=self.floating_ip['ip'],
+                server_or_ip=self.fip,
                 username=self.image_utils.ssh_user(self.image_ref),
                 private_key=self.keypair['private_key'])
 
@@ -110,12 +103,11 @@
 
             def exec_cmd_and_verify_output():
                 cmd = 'curl ' + md_url
-                floating_ip = self.floating_ip['ip']
                 result = self.ssh_client.exec_command(cmd)
                 if result:
                     msg = ('Failed while verifying metadata on server. Result '
-                           'of command "%s" is NOT "%s".' % (cmd, floating_ip))
-                    self.assertEqual(floating_ip, result, msg)
+                           'of command "%s" is NOT "%s".' % (cmd, self.fip))
+                    self.assertEqual(self.fip, result, msg)
                     return 'Verification is successful!'
 
             if not test.call_until_true(exec_cmd_and_verify_output,
diff --git a/tempest/scenario/test_shelve_instance.py b/tempest/scenario/test_shelve_instance.py
index bc80412..3b38888 100644
--- a/tempest/scenario/test_shelve_instance.py
+++ b/tempest/scenario/test_shelve_instance.py
@@ -79,15 +79,9 @@
                                         create_kwargs=create_kwargs)
 
         if CONF.compute.use_floatingip_for_ssh:
-            floating_ip = (self.floating_ips_client.create_floating_ip()
-                           ['floating_ip'])
-            self.addCleanup(self.delete_wrapper,
-                            self.floating_ips_client.delete_floating_ip,
-                            floating_ip['id'])
-            self.floating_ips_client.associate_floating_ip_to_server(
-                floating_ip['ip'], server['id'])
+            floating_ip = self.create_floating_ip(server)['ip']
             timestamp = self.create_timestamp(
-                floating_ip['ip'], private_key=keypair['private_key'])
+                floating_ip, private_key=keypair['private_key'])
         else:
             timestamp = self.create_timestamp(
                 server, private_key=keypair['private_key'])
@@ -97,7 +91,7 @@
         # with the instance snapshot
         self._shelve_then_unshelve_server(server)
         if CONF.compute.use_floatingip_for_ssh:
-            timestamp2 = self.get_timestamp(floating_ip['ip'],
+            timestamp2 = self.get_timestamp(floating_ip,
                                             private_key=keypair['private_key'])
         else:
             timestamp2 = self.get_timestamp(server,