Updates Tempest to match Zaqar's API name change
Zaqar is a messaging service which provides support for different messaging patterns and messaging related semantics. This fix changes the old API name -queuing- to a more accurate name, -messaging-. Change-Id: I63321e8b9f277be040d0f75d5ed9f4461da0defc
This commit is contained in:
+36
-36
@@ -709,6 +709,42 @@
|
||||
#ssh_user_regex=[["^.*[Cc]irros.*$", "root"]]
|
||||
|
||||
|
||||
[messaging]
|
||||
|
||||
#
|
||||
# Options defined in tempest.config
|
||||
#
|
||||
|
||||
# Catalog type of the Messaging service. (string value)
|
||||
#catalog_type=messaging
|
||||
|
||||
# The maximum number of queue records per page when listing
|
||||
# queues (integer value)
|
||||
#max_queues_per_page=20
|
||||
|
||||
# The maximum metadata size for a queue (integer value)
|
||||
#max_queue_metadata=65536
|
||||
|
||||
# The maximum number of queue message per page when listing
|
||||
# (or) posting messages (integer value)
|
||||
#max_messages_per_page=20
|
||||
|
||||
# The maximum size of a message body (integer value)
|
||||
#max_message_size=262144
|
||||
|
||||
# The maximum number of messages per claim (integer value)
|
||||
#max_messages_per_claim=20
|
||||
|
||||
# The maximum ttl for a message (integer value)
|
||||
#max_message_ttl=1209600
|
||||
|
||||
# The maximum ttl for a claim (integer value)
|
||||
#max_claim_ttl=43200
|
||||
|
||||
# The maximum grace period for a claim (integer value)
|
||||
#max_claim_grace=43200
|
||||
|
||||
|
||||
[negative]
|
||||
|
||||
#
|
||||
@@ -897,42 +933,6 @@
|
||||
#max_resources_per_stack=1000
|
||||
|
||||
|
||||
[queuing]
|
||||
|
||||
#
|
||||
# Options defined in tempest.config
|
||||
#
|
||||
|
||||
# Catalog type of the Queuing service. (string value)
|
||||
#catalog_type=queuing
|
||||
|
||||
# The maximum number of queue records per page when listing
|
||||
# queues (integer value)
|
||||
#max_queues_per_page=20
|
||||
|
||||
# The maximum metadata size for a queue (integer value)
|
||||
#max_queue_metadata=65536
|
||||
|
||||
# The maximum number of queue message per page when listing
|
||||
# (or) posting messages (integer value)
|
||||
#max_messages_per_page=20
|
||||
|
||||
# The maximum size of a message body (integer value)
|
||||
#max_message_size=262144
|
||||
|
||||
# The maximum number of messages per claim (integer value)
|
||||
#max_messages_per_claim=20
|
||||
|
||||
# The maximum ttl for a message (integer value)
|
||||
#max_message_ttl=1209600
|
||||
|
||||
# The maximum ttl for a claim (integer value)
|
||||
#max_claim_ttl=43200
|
||||
|
||||
# The maximum grace period for a claim (integer value)
|
||||
#max_claim_grace=43200
|
||||
|
||||
|
||||
[scenario]
|
||||
|
||||
#
|
||||
|
||||
@@ -23,25 +23,25 @@ CONF = config.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class BaseQueuingTest(test.BaseTestCase):
|
||||
class BaseMessagingTest(test.BaseTestCase):
|
||||
|
||||
"""
|
||||
Base class for the Queuing tests that use the Tempest Zaqar REST client
|
||||
Base class for the Messaging tests that use the Tempest Zaqar REST client
|
||||
|
||||
It is assumed that the following option is defined in the
|
||||
[service_available] section of etc/tempest.conf
|
||||
|
||||
queuing as True
|
||||
messaging as True
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(BaseQueuingTest, cls).setUpClass()
|
||||
super(BaseMessagingTest, cls).setUpClass()
|
||||
if not CONF.service_available.zaqar:
|
||||
raise cls.skipException("Zaqar support is required")
|
||||
os = cls.get_client_manager()
|
||||
cls.queuing_cfg = CONF.queuing
|
||||
cls.client = os.queuing_client
|
||||
cls.messaging_cfg = CONF.messaging
|
||||
cls.client = os.messaging_client
|
||||
|
||||
@classmethod
|
||||
def create_queue(cls, queue_name):
|
||||
@@ -93,42 +93,42 @@ class BaseQueuingTest(test.BaseTestCase):
|
||||
|
||||
@classmethod
|
||||
def post_messages(cls, queue_name, rbody):
|
||||
'''Wrapper utility that posts messages to a queue.'''
|
||||
"""Wrapper utility that posts messages to a queue."""
|
||||
resp, body = cls.client.post_messages(queue_name, rbody)
|
||||
|
||||
return resp, body
|
||||
|
||||
@classmethod
|
||||
def list_messages(cls, queue_name):
|
||||
'''Wrapper utility that lists the messages in a queue.'''
|
||||
"""Wrapper utility that lists the messages in a queue."""
|
||||
resp, body = cls.client.list_messages(queue_name)
|
||||
|
||||
return resp, body
|
||||
|
||||
@classmethod
|
||||
def get_single_message(cls, message_uri):
|
||||
'''Wrapper utility that gets a single message.'''
|
||||
"""Wrapper utility that gets a single message."""
|
||||
resp, body = cls.client.get_single_message(message_uri)
|
||||
|
||||
return resp, body
|
||||
|
||||
@classmethod
|
||||
def get_multiple_messages(cls, message_uri):
|
||||
'''Wrapper utility that gets multiple messages.'''
|
||||
"""Wrapper utility that gets multiple messages."""
|
||||
resp, body = cls.client.get_multiple_messages(message_uri)
|
||||
|
||||
return resp, body
|
||||
|
||||
@classmethod
|
||||
def delete_messages(cls, message_uri):
|
||||
'''Wrapper utility that deletes messages.'''
|
||||
"""Wrapper utility that deletes messages."""
|
||||
resp, body = cls.client.delete_messages(message_uri)
|
||||
|
||||
return resp, body
|
||||
|
||||
@classmethod
|
||||
def post_claims(cls, queue_name, rbody, url_params=False):
|
||||
'''Wrapper utility that claims messages.'''
|
||||
"""Wrapper utility that claims messages."""
|
||||
resp, body = cls.client.post_claims(
|
||||
queue_name, rbody, url_params=False)
|
||||
|
||||
@@ -136,33 +136,34 @@ class BaseQueuingTest(test.BaseTestCase):
|
||||
|
||||
@classmethod
|
||||
def query_claim(cls, claim_uri):
|
||||
'''Wrapper utility that gets a claim.'''
|
||||
"""Wrapper utility that gets a claim."""
|
||||
resp, body = cls.client.query_claim(claim_uri)
|
||||
|
||||
return resp, body
|
||||
|
||||
@classmethod
|
||||
def update_claim(cls, claim_uri, rbody):
|
||||
'''Wrapper utility that updates a claim.'''
|
||||
"""Wrapper utility that updates a claim."""
|
||||
resp, body = cls.client.update_claim(claim_uri, rbody)
|
||||
|
||||
return resp, body
|
||||
|
||||
@classmethod
|
||||
def release_claim(cls, claim_uri):
|
||||
'''Wrapper utility that deletes a claim.'''
|
||||
"""Wrapper utility that deletes a claim."""
|
||||
resp, body = cls.client.release_claim(claim_uri)
|
||||
|
||||
return resp, body
|
||||
|
||||
@classmethod
|
||||
def generate_message_body(cls, repeat=1):
|
||||
'''Wrapper utility that sets the metadata of a queue.'''
|
||||
message_ttl = data_utils.rand_int_id(start=60,
|
||||
end=CONF.queuing.max_message_ttl)
|
||||
"""Wrapper utility that sets the metadata of a queue."""
|
||||
message_ttl = data_utils.\
|
||||
rand_int_id(start=60, end=CONF.messaging.max_message_ttl)
|
||||
|
||||
key = data_utils.arbitrary_string(size=20, base_text='QueuingKey')
|
||||
value = data_utils.arbitrary_string(size=20, base_text='QueuingValue')
|
||||
key = data_utils.arbitrary_string(size=20, base_text='MessagingKey')
|
||||
value = data_utils.arbitrary_string(size=20,
|
||||
base_text='MessagingValue')
|
||||
message_body = {key: value}
|
||||
|
||||
rbody = ([{'body': message_body, 'ttl': message_ttl}] * repeat)
|
||||
@@ -16,7 +16,7 @@
|
||||
import logging
|
||||
import urlparse
|
||||
|
||||
from tempest.api.queuing import base
|
||||
from tempest.api.messaging import base
|
||||
from tempest.common.utils import data_utils
|
||||
from tempest import config
|
||||
from tempest import test
|
||||
@@ -26,7 +26,7 @@ LOG = logging.getLogger(__name__)
|
||||
CONF = config.CONF
|
||||
|
||||
|
||||
class TestClaims(base.BaseQueuingTest):
|
||||
class TestClaims(base.BaseMessagingTest):
|
||||
_interface = 'json'
|
||||
|
||||
@classmethod
|
||||
@@ -44,9 +44,9 @@ class TestClaims(base.BaseQueuingTest):
|
||||
|
||||
# Post Claim
|
||||
claim_ttl = data_utils.rand_int_id(start=60,
|
||||
end=CONF.queuing.max_claim_ttl)
|
||||
claim_grace = data_utils.rand_int_id(start=60,
|
||||
end=CONF.queuing.max_claim_grace)
|
||||
end=CONF.messaging.max_claim_ttl)
|
||||
claim_grace = data_utils.\
|
||||
rand_int_id(start=60, end=CONF.messaging.max_claim_grace)
|
||||
claim_body = {"ttl": claim_ttl, "grace": claim_grace}
|
||||
resp, body = self.client.post_claims(queue_name=self.queue_name,
|
||||
rbody=claim_body)
|
||||
@@ -90,7 +90,7 @@ class TestClaims(base.BaseQueuingTest):
|
||||
|
||||
# Update Claim
|
||||
claim_ttl = data_utils.rand_int_id(start=60,
|
||||
end=CONF.queuing.max_claim_ttl)
|
||||
end=CONF.messaging.max_claim_ttl)
|
||||
update_rbody = {"ttl": claim_ttl}
|
||||
|
||||
self.client.update_claim(claim_uri, rbody=update_rbody)
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
import logging
|
||||
|
||||
from tempest.api.queuing import base
|
||||
from tempest.api.messaging import base
|
||||
from tempest.common.utils import data_utils
|
||||
from tempest import config
|
||||
from tempest import test
|
||||
@@ -25,7 +25,7 @@ LOG = logging.getLogger(__name__)
|
||||
CONF = config.CONF
|
||||
|
||||
|
||||
class TestMessages(base.BaseQueuingTest):
|
||||
class TestMessages(base.BaseMessagingTest):
|
||||
_interface = 'json'
|
||||
|
||||
@classmethod
|
||||
@@ -35,7 +35,7 @@ class TestMessages(base.BaseQueuingTest):
|
||||
# Create Queue
|
||||
cls.client.create_queue(cls.queue_name)
|
||||
|
||||
def _post_messages(self, repeat=CONF.queuing.max_messages_per_page):
|
||||
def _post_messages(self, repeat=CONF.messaging.max_messages_per_page):
|
||||
message_body = self.generate_message_body(repeat=repeat)
|
||||
resp, body = self.post_messages(queue_name=self.queue_name,
|
||||
rbody=message_body)
|
||||
@@ -18,7 +18,7 @@ import logging
|
||||
from six import moves
|
||||
from testtools import matchers
|
||||
|
||||
from tempest.api.queuing import base
|
||||
from tempest.api.messaging import base
|
||||
from tempest.common.utils import data_utils
|
||||
from tempest import test
|
||||
|
||||
@@ -26,7 +26,7 @@ from tempest import test
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TestQueues(base.BaseQueuingTest):
|
||||
class TestQueues(base.BaseMessagingTest):
|
||||
|
||||
@test.attr(type='smoke')
|
||||
def test_create_queue(self):
|
||||
@@ -40,7 +40,7 @@ class TestQueues(base.BaseQueuingTest):
|
||||
self.assertEqual('', body)
|
||||
|
||||
|
||||
class TestManageQueue(base.BaseQueuingTest):
|
||||
class TestManageQueue(base.BaseMessagingTest):
|
||||
_interface = 'json'
|
||||
|
||||
@classmethod
|
||||
+3
-2
@@ -151,6 +151,8 @@ from tempest.services.identity.xml.identity_client import IdentityClientXML
|
||||
from tempest.services.identity.xml.identity_client import TokenClientXML
|
||||
from tempest.services.image.v1.json.image_client import ImageClientJSON
|
||||
from tempest.services.image.v2.json.image_client import ImageClientV2JSON
|
||||
from tempest.services.messaging.json.messaging_client import \
|
||||
MessagingClientJSON
|
||||
from tempest.services.network.json.network_client import NetworkClientJSON
|
||||
from tempest.services.network.xml.network_client import NetworkClientXML
|
||||
from tempest.services.object_storage.account_client import AccountClient
|
||||
@@ -162,7 +164,6 @@ from tempest.services.object_storage.object_client import \
|
||||
ObjectClientCustomizedHeader
|
||||
from tempest.services.orchestration.json.orchestration_client import \
|
||||
OrchestrationClient
|
||||
from tempest.services.queuing.json.queuing_client import QueuingClientJSON
|
||||
from tempest.services.telemetry.json.telemetry_client import \
|
||||
TelemetryClientJSON
|
||||
from tempest.services.telemetry.xml.telemetry_client import \
|
||||
@@ -384,7 +385,7 @@ class Manager(manager.Manager):
|
||||
self.auth_provider)
|
||||
self.database_versions_client = DatabaseVersionsClientJSON(
|
||||
self.auth_provider)
|
||||
self.queuing_client = QueuingClientJSON(self.auth_provider)
|
||||
self.messaging_client = MessagingClientJSON(self.auth_provider)
|
||||
if CONF.service_available.ceilometer:
|
||||
self.telemetry_client = TelemetryClientJSON(
|
||||
self.auth_provider)
|
||||
|
||||
@@ -247,7 +247,7 @@ def check_service_availability(os, update):
|
||||
'data_processing': 'sahara',
|
||||
'baremetal': 'ironic',
|
||||
'identity': 'keystone',
|
||||
'queuing': 'zaqar',
|
||||
'messaging': 'zaqar',
|
||||
'database': 'trove'
|
||||
}
|
||||
# Get catalog list for endpoints to use for validation
|
||||
|
||||
+7
-7
@@ -470,13 +470,13 @@ NetworkFeaturesGroup = [
|
||||
)
|
||||
]
|
||||
|
||||
queuing_group = cfg.OptGroup(name='queuing',
|
||||
title='Queuing Service')
|
||||
messaging_group = cfg.OptGroup(name='messaging',
|
||||
title='Messaging Service')
|
||||
|
||||
QueuingGroup = [
|
||||
MessagingGroup = [
|
||||
cfg.StrOpt('catalog_type',
|
||||
default='queuing',
|
||||
help='Catalog type of the Queuing service.'),
|
||||
default='messaging',
|
||||
help='Catalog type of the Messaging service.'),
|
||||
cfg.IntOpt('max_queues_per_page',
|
||||
default=20,
|
||||
help='The maximum number of queue records per page when '
|
||||
@@ -1034,7 +1034,7 @@ def register_opts():
|
||||
register_opt_group(cfg.CONF, network_group, NetworkGroup)
|
||||
register_opt_group(cfg.CONF, network_feature_group,
|
||||
NetworkFeaturesGroup)
|
||||
register_opt_group(cfg.CONF, queuing_group, QueuingGroup)
|
||||
register_opt_group(cfg.CONF, messaging_group, MessagingGroup)
|
||||
register_opt_group(cfg.CONF, volume_group, VolumeGroup)
|
||||
register_opt_group(cfg.CONF, volume_feature_group,
|
||||
VolumeFeaturesGroup)
|
||||
@@ -1091,7 +1091,7 @@ class TempestConfigPrivate(object):
|
||||
'object-storage-feature-enabled']
|
||||
self.database = cfg.CONF.database
|
||||
self.orchestration = cfg.CONF.orchestration
|
||||
self.queuing = cfg.CONF.queuing
|
||||
self.messaging = cfg.CONF.messaging
|
||||
self.telemetry = cfg.CONF.telemetry
|
||||
self.dashboard = cfg.CONF.dashboard
|
||||
self.data_processing = cfg.CONF.data_processing
|
||||
|
||||
+4
-4
@@ -16,7 +16,7 @@
|
||||
import json
|
||||
import urllib
|
||||
|
||||
from tempest.api_schema.response.queuing.v1 import queues as queues_schema
|
||||
from tempest.api_schema.response.messaging.v1 import queues as queues_schema
|
||||
from tempest.common import rest_client
|
||||
from tempest.common.utils import data_utils
|
||||
from tempest import config
|
||||
@@ -25,11 +25,11 @@ from tempest import config
|
||||
CONF = config.CONF
|
||||
|
||||
|
||||
class QueuingClientJSON(rest_client.RestClient):
|
||||
class MessagingClientJSON(rest_client.RestClient):
|
||||
|
||||
def __init__(self, auth_provider):
|
||||
super(QueuingClientJSON, self).__init__(auth_provider)
|
||||
self.service = CONF.queuing.catalog_type
|
||||
super(MessagingClientJSON, self).__init__(auth_provider)
|
||||
self.service = CONF.messaging.catalog_type
|
||||
self.version = '1'
|
||||
self.uri_prefix = 'v{0}'.format(self.version)
|
||||
|
||||
Reference in New Issue
Block a user