Merge "port instance_actions and server_list tests into nova v3 part2"
diff --git a/tempest/api/compute/v3/servers/test_instance_actions.py b/tempest/api/compute/v3/servers/test_instance_actions.py
index 5019003..ea92c9f 100644
--- a/tempest/api/compute/v3/servers/test_instance_actions.py
+++ b/tempest/api/compute/v3/servers/test_instance_actions.py
@@ -20,12 +20,12 @@
 from tempest.test import attr
 
 
-class InstanceActionsTestJSON(base.BaseV2ComputeTest):
+class InstanceActionsV3TestJSON(base.BaseV3ComputeTest):
     _interface = 'json'
 
     @classmethod
     def setUpClass(cls):
-        super(InstanceActionsTestJSON, cls).setUpClass()
+        super(InstanceActionsV3TestJSON, cls).setUpClass()
         cls.client = cls.servers_client
         resp, server = cls.create_test_server(wait_until='ACTIVE')
         cls.request_id = resp['x-compute-request-id']
@@ -65,5 +65,5 @@
                           self.server_id, '999')
 
 
-class InstanceActionsTestXML(InstanceActionsTestJSON):
+class InstanceActionsV3TestXML(InstanceActionsV3TestJSON):
     _interface = 'xml'
diff --git a/tempest/api/compute/v3/servers/test_list_server_filters.py b/tempest/api/compute/v3/servers/test_list_server_filters.py
index 65bdd19..5f14460 100644
--- a/tempest/api/compute/v3/servers/test_list_server_filters.py
+++ b/tempest/api/compute/v3/servers/test_list_server_filters.py
@@ -24,17 +24,17 @@
 from tempest.test import skip_because
 
 
-class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
+class ListServerFiltersV3TestJSON(base.BaseV3ComputeTest):
     _interface = 'json'
 
     @classmethod
     def setUpClass(cls):
-        super(ListServerFiltersTestJSON, cls).setUpClass()
+        super(ListServerFiltersV3TestJSON, cls).setUpClass()
         cls.client = cls.servers_client
 
         # Check to see if the alternate image ref actually exists...
         images_client = cls.images_client
-        resp, images = images_client.list_images()
+        resp, images = images_client.image_list()
 
         if cls.image_ref != cls.image_ref_alt and \
             any([image for image in images
@@ -46,13 +46,13 @@
         # Do some sanity checks here. If one of the images does
         # not exist, fail early since the tests won't work...
         try:
-            cls.images_client.get_image(cls.image_ref)
+            cls.images_client.get_image_meta(cls.image_ref)
         except exceptions.NotFound:
             raise RuntimeError("Image %s (image_ref) was not found!" %
                                cls.image_ref)
 
         try:
-            cls.images_client.get_image(cls.image_ref_alt)
+            cls.images_client.get_image_meta(cls.image_ref_alt)
         except exceptions.NotFound:
             raise RuntimeError("Image %s (image_ref_alt) was not found!" %
                                cls.image_ref_alt)
@@ -165,7 +165,8 @@
         # Filter the detailed list of servers by server status
         params = {'status': 'active'}
         resp, body = self.client.list_servers_with_detail(params)
-        servers = body['servers']
+        expected_servers = (self.s1['id'], self.s2['id'], self.s3['id'])
+        servers = [x for x in body['servers'] if x['id'] in expected_servers]
 
         self.assertIn(self.s1['id'], map(lambda x: x['id'], servers))
         self.assertIn(self.s2['id'], map(lambda x: x['id'], servers))
@@ -234,5 +235,5 @@
         self.assertEqual(1, len(servers['servers']))
 
 
-class ListServerFiltersTestXML(ListServerFiltersTestJSON):
+class ListServerFiltersV3TestXML(ListServerFiltersV3TestJSON):
     _interface = 'xml'
diff --git a/tempest/api/compute/v3/servers/test_list_servers_negative.py b/tempest/api/compute/v3/servers/test_list_servers_negative.py
index a06e209..6225345 100644
--- a/tempest/api/compute/v3/servers/test_list_servers_negative.py
+++ b/tempest/api/compute/v3/servers/test_list_servers_negative.py
@@ -24,7 +24,7 @@
 from tempest.test import attr
 
 
-class ListServersNegativeTestJSON(base.BaseV2ComputeTest):
+class ListServersNegativeV3TestJSON(base.BaseV3ComputeTest):
     _interface = 'json'
 
     @classmethod
@@ -49,7 +49,7 @@
 
     @classmethod
     def setUpClass(cls):
-        super(ListServersNegativeTestJSON, cls).setUpClass()
+        super(ListServersNegativeV3TestJSON, cls).setUpClass()
         cls.client = cls.servers_client
         cls.servers = []
 
@@ -182,7 +182,7 @@
     @attr(type='gate')
     def test_list_servers_by_changes_since(self):
         # Servers are listed by specifying changes-since date
-        changes_since = {'changes-since': self.start_time.isoformat()}
+        changes_since = {'changes_since': self.start_time.isoformat()}
         resp, body = self.client.list_servers(changes_since)
         self.assertEqual('200', resp['status'])
         # changes-since returns all instances, including deleted.
@@ -196,12 +196,12 @@
     def test_list_servers_by_changes_since_invalid_date(self):
         # Return an error when invalid date format is passed
         self.assertRaises(exceptions.BadRequest, self.client.list_servers,
-                          {'changes-since': '2011/01/01'})
+                          {'changes_since': '2011/01/01'})
 
     @attr(type=['negative', 'gate'])
     def test_list_servers_by_changes_since_future_date(self):
         # Return an empty list when a date in the future is passed
-        changes_since = {'changes-since': '2051-01-01T12:34:00Z'}
+        changes_since = {'changes_since': '2051-01-01T12:34:00Z'}
         resp, body = self.client.list_servers(changes_since)
         self.assertEqual('200', resp['status'])
         self.assertEqual(0, len(body['servers']))
@@ -218,5 +218,5 @@
         self.assertEqual([], actual)
 
 
-class ListServersNegativeTestXML(ListServersNegativeTestJSON):
+class ListServersNegativeV3TestXML(ListServersNegativeV3TestJSON):
     _interface = 'xml'