Merge "Fixed the LP bug 993739."
diff --git a/tempest/services/nova/json/servers_client.py b/tempest/services/nova/json/servers_client.py
index 08ac6df..53b2d6f 100644
--- a/tempest/services/nova/json/servers_client.py
+++ b/tempest/services/nova/json/servers_client.py
@@ -21,6 +21,7 @@
         flavor_ref (Required): The flavor used to build the server.
         Following optional keyword arguments are accepted:
         adminPass: Sets the initial root password.
+        key_name: Key name of keypair that was created earlier.
         meta: A dictionary of values to be used as metadata.
         personality: A list of dictionaries for files to be injected into
         the server.
@@ -40,7 +41,7 @@
             'flavorRef': flavor_ref
         }
 
-        for option in ['personality', 'adminPass',
+        for option in ['personality', 'adminPass', 'key_name',
                         'security_groups', 'networks', 'user_data',
                         'availability_zone', 'accessIPv4', 'accessIPv6',
                         'min_count', 'max_count', ('metadata', 'meta'),
diff --git a/tempest/tests/test_floating_ips_actions.py b/tempest/tests/test_floating_ips_actions.py
index a9222a4..563d0e3 100644
--- a/tempest/tests/test_floating_ips_actions.py
+++ b/tempest/tests/test_floating_ips_actions.py
@@ -48,16 +48,18 @@
         Positive test:Allocation of a new floating IP to a project
         should be succesfull
         """
-        resp, body = self.client.create_floating_ip()
-        self.assertEqual(200, resp.status)
-        floating_ip_id_allocated = body['id']
-        resp, floating_ip_details = \
+        try:
+            resp, body = self.client.create_floating_ip()
+            self.assertEqual(200, resp.status)
+            floating_ip_id_allocated = body['id']
+            resp, floating_ip_details = \
                 self.client.get_floating_ip_details(floating_ip_id_allocated)
-        #Checking if the details of allocated IP is in list of floating IP
-        resp, body = self.client.list_floating_ips()
-        self.assertTrue(floating_ip_details in body)
-        #Deleting the floating IP which is created in this method
-        self.client.delete_floating_ip(floating_ip_id_allocated)
+            #Checking if the details of allocated IP is in list of floating IP
+            resp, body = self.client.list_floating_ips()
+            self.assertTrue(floating_ip_details in body)
+        finally:
+            #Deleting the floating IP which is created in this method
+            self.client.delete_floating_ip(floating_ip_id_allocated)
 
     @attr(type='positive')
     def test_delete_floating_ip(self):