Merge "Apply a naming rule of GET to messaging client"
diff --git a/tempest/api/messaging/base.py b/tempest/api/messaging/base.py
index b3ed941..c4214f2 100644
--- a/tempest/api/messaging/base.py
+++ b/tempest/api/messaging/base.py
@@ -71,7 +71,7 @@
@classmethod
def check_queue_exists(cls, queue_name):
"""Wrapper utility that checks the existence of a test queue."""
- resp, body = cls.client.get_queue(queue_name)
+ resp, body = cls.client.show_queue(queue_name)
return resp, body
@classmethod
@@ -89,13 +89,13 @@
@classmethod
def get_queue_stats(cls, queue_name):
"""Wrapper utility that returns the queue stats."""
- resp, body = cls.client.get_queue_stats(queue_name)
+ resp, body = cls.client.show_queue_stats(queue_name)
return resp, body
@classmethod
def get_queue_metadata(cls, queue_name):
"""Wrapper utility that gets a queue metadata."""
- resp, body = cls.client.get_queue_metadata(queue_name)
+ resp, body = cls.client.show_queue_metadata(queue_name)
return resp, body
@classmethod
@@ -121,14 +121,14 @@
@classmethod
def get_single_message(cls, message_uri):
"""Wrapper utility that gets a single message."""
- resp, body = cls.client.get_single_message(message_uri)
+ resp, body = cls.client.show_single_message(message_uri)
return resp, body
@classmethod
def get_multiple_messages(cls, message_uri):
"""Wrapper utility that gets multiple messages."""
- resp, body = cls.client.get_multiple_messages(message_uri)
+ resp, body = cls.client.show_multiple_messages(message_uri)
return resp, body
diff --git a/tempest/api/messaging/test_messages.py b/tempest/api/messaging/test_messages.py
index f982f59..c8640b3 100644
--- a/tempest/api/messaging/test_messages.py
+++ b/tempest/api/messaging/test_messages.py
@@ -49,7 +49,7 @@
# Get on the posted messages
message_uri = resp['location']
- resp, _ = self.client.get_multiple_messages(message_uri)
+ resp, _ = self.client.show_multiple_messages(message_uri)
# The test has an assertion here, because the response cannot be 204
# in this case (the client allows 200 or 204 for this API call).
self.assertEqual('200', resp['status'])
@@ -74,7 +74,7 @@
message_uri = body['resources'][0]
# Get posted message
- resp, _ = self.client.get_single_message(message_uri)
+ resp, _ = self.client.show_single_message(message_uri)
# The test has an assertion here, because the response cannot be 204
# in this case (the client allows 200 or 204 for this API call).
self.assertEqual('200', resp['status'])
@@ -87,7 +87,7 @@
message_uri = resp['location']
# Get posted messages
- resp, _ = self.client.get_multiple_messages(message_uri)
+ resp, _ = self.client.show_multiple_messages(message_uri)
# The test has an assertion here, because the response cannot be 204
# in this case (the client allows 200 or 204 for this API call).
self.assertEqual('200', resp['status'])
@@ -103,7 +103,7 @@
self.client.delete_messages(message_uri)
message_uri = message_uri.replace('/messages/', '/messages?ids=')
- resp, _ = self.client.get_multiple_messages(message_uri)
+ resp, _ = self.client.show_multiple_messages(message_uri)
# The test has an assertion here, because the response has to be 204
# in this case (the client allows 200 or 204 for this API call).
self.assertEqual('204', resp['status'])
@@ -117,7 +117,7 @@
# Delete multiple messages
self.client.delete_messages(message_uri)
- resp, _ = self.client.get_multiple_messages(message_uri)
+ resp, _ = self.client.show_multiple_messages(message_uri)
# The test has an assertion here, because the response has to be 204
# in this case (the client allows 200 or 204 for this API call).
self.assertEqual('204', resp['status'])
diff --git a/tempest/api/messaging/test_queues.py b/tempest/api/messaging/test_queues.py
index c444e0b..2dac346 100644
--- a/tempest/api/messaging/test_queues.py
+++ b/tempest/api/messaging/test_queues.py
@@ -44,7 +44,7 @@
self.delete_queue(queue_name)
self.assertRaises(lib_exc.NotFound,
- self.client.get_queue,
+ self.client.show_queue,
queue_name)
diff --git a/tempest/services/messaging/json/messaging_client.py b/tempest/services/messaging/json/messaging_client.py
index 36444a9..483ba93 100644
--- a/tempest/services/messaging/json/messaging_client.py
+++ b/tempest/services/messaging/json/messaging_client.py
@@ -58,7 +58,7 @@
self.expected_success(201, resp.status)
return resp, body
- def get_queue(self, queue_name):
+ def show_queue(self, queue_name):
uri = '{0}/queues/{1}'.format(self.uri_prefix, queue_name)
resp, body = self.get(uri)
self.expected_success(204, resp.status)
@@ -76,14 +76,14 @@
self.expected_success(204, resp.status)
return resp, body
- def get_queue_stats(self, queue_name):
+ def show_queue_stats(self, queue_name):
uri = '{0}/queues/{1}/stats'.format(self.uri_prefix, queue_name)
resp, body = self.get(uri)
body = json.loads(body)
self.validate_response(queues_schema.queue_stats, resp, body)
return resp, body
- def get_queue_metadata(self, queue_name):
+ def show_queue_metadata(self, queue_name):
uri = '{0}/queues/{1}/metadata'.format(self.uri_prefix, queue_name)
resp, body = self.get(uri)
self.expected_success(200, resp.status)
@@ -117,7 +117,7 @@
return resp, body
- def get_single_message(self, message_uri):
+ def show_single_message(self, message_uri):
resp, body = self.get(message_uri, extra_headers=True,
headers=self.headers)
if resp['status'] != '204':
@@ -126,7 +126,7 @@
body)
return resp, body
- def get_multiple_messages(self, message_uri):
+ def show_multiple_messages(self, message_uri):
resp, body = self.get(message_uri, extra_headers=True,
headers=self.headers)