Remove zaqar tests from tempest

These tests aren't run in any gating job that I can find on either
tempest or zaqar. Zaqar also falls outside of the scope we set for
projects with in-tree tempest tests. A plugin is being worked in
zaqar change I06053d2d0d761c6398708280f3ef38274dec390c. But,
since these tests are unverified and haven't been run in quite some
time lets just remove them.

Change-Id: I047392de3341169992fc5e64aec1e571059840a8
This commit is contained in:
Matthew Treinish 2016-02-18 17:42:15 -05:00
parent 58c3afb6fc
commit fc11264f50
No known key found for this signature in database
GPG Key ID: FD12A0F214C9E177
17 changed files with 1 additions and 1002 deletions

View File

@ -1,161 +0,0 @@
# Copyright (c) 2014 Rackspace, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from tempest.common.utils import data_utils
from tempest import config
from tempest import test
CONF = config.CONF
class BaseMessagingTest(test.BaseTestCase):
"""Base class for the Messaging (Zaqar) tests
It is assumed that the following option is defined in the
[service_available] section of etc/tempest.conf
messaging as True
"""
credentials = ['primary']
@classmethod
def skip_checks(cls):
super(BaseMessagingTest, cls).skip_checks()
if not CONF.service_available.zaqar:
raise cls.skipException("Zaqar support is required")
@classmethod
def setup_clients(cls):
super(BaseMessagingTest, cls).setup_clients()
cls.client = cls.os.messaging_client
@classmethod
def resource_setup(cls):
super(BaseMessagingTest, cls).resource_setup()
cls.messaging_cfg = CONF.messaging
@classmethod
def create_queue(cls, queue_name):
"""Wrapper utility that returns a test queue."""
resp, body = cls.client.create_queue(queue_name)
return resp, body
@classmethod
def delete_queue(cls, queue_name):
"""Wrapper utility that deletes a test queue."""
resp, body = cls.client.delete_queue(queue_name)
return resp, body
@classmethod
def check_queue_exists(cls, queue_name):
"""Wrapper utility that checks the existence of a test queue."""
resp, body = cls.client.show_queue(queue_name)
return resp, body
@classmethod
def check_queue_exists_head(cls, queue_name):
"""Wrapper utility checks the head of a queue via http HEAD."""
resp, body = cls.client.head_queue(queue_name)
return resp, body
@classmethod
def list_queues(cls):
"""Wrapper utility that lists queues."""
resp, body = cls.client.list_queues()
return resp, body
@classmethod
def get_queue_stats(cls, queue_name):
"""Wrapper utility that returns the queue stats."""
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.show_queue_metadata(queue_name)
return resp, body
@classmethod
def set_queue_metadata(cls, queue_name, rbody):
"""Wrapper utility that sets the metadata of a queue."""
resp, body = cls.client.set_queue_metadata(queue_name, rbody)
return resp, body
@classmethod
def post_messages(cls, queue_name, rbody):
"""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."""
resp, body = cls.client.list_messages(queue_name)
return resp, body
@classmethod
def delete_messages(cls, message_uri):
"""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."""
resp, body = cls.client.post_claims(
queue_name, rbody, url_params=False)
return resp, body
@classmethod
def query_claim(cls, claim_uri):
"""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."""
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."""
resp, body = cls.client.delete_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.messaging.max_message_ttl)
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)
return rbody

View File

@ -1,125 +0,0 @@
# Copyright (c) 2014 Rackspace, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from six.moves.urllib import parse as urlparse
from tempest_lib import decorators
from tempest.api.messaging import base
from tempest.common.utils import data_utils
from tempest import config
from tempest import test
CONF = config.CONF
class TestClaims(base.BaseMessagingTest):
@classmethod
def resource_setup(cls):
super(TestClaims, cls).resource_setup()
cls.queue_name = data_utils.rand_name('Queues-Test')
# Create Queue
cls.create_queue(cls.queue_name)
def _post_and_claim_messages(self, queue_name, repeat=1):
# Post Messages
message_body = self.generate_message_body(repeat=repeat)
self.client.post_messages(queue_name=self.queue_name,
rbody=message_body)
# Post Claim
claim_ttl = data_utils.rand_int_id(start=60,
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)
return resp, body
@test.attr(type='smoke')
@test.idempotent_id('936cb1ca-b7af-44dd-a752-805e8c98156f')
def test_post_claim(self):
_, body = self._post_and_claim_messages(queue_name=self.queue_name)
claimed_message_uri = body[0]['href']
# Skipping this step till bug-1331517 is fixed
# Get posted claim
# self.client.query_claim(claimed_message_uri)
# Delete Claimed message
self.client.delete_messages(claimed_message_uri)
@decorators.skip_because(bug="1331517")
@test.attr(type='smoke')
@test.idempotent_id('84e491f4-68c6-451f-9846-b8f868eb27c5')
def test_query_claim(self):
# Post a Claim
resp, body = self._post_and_claim_messages(queue_name=self.queue_name)
# Query Claim
claim_uri = resp['location']
self.client.query_claim(claim_uri)
# Delete Claimed message
claimed_message_uri = body[0]['href']
self.delete_messages(claimed_message_uri)
@decorators.skip_because(bug="1328111")
@test.attr(type='smoke')
@test.idempotent_id('420ef0c5-9bd6-4b82-b06d-d9da330fefd3')
def test_update_claim(self):
# Post a Claim
resp, body = self._post_and_claim_messages(queue_name=self.queue_name)
claim_uri = resp['location']
claimed_message_uri = body[0]['href']
# Update Claim
claim_ttl = data_utils.rand_int_id(start=60,
end=CONF.messaging.max_claim_ttl)
update_rbody = {"ttl": claim_ttl}
self.client.update_claim(claim_uri, rbody=update_rbody)
# Verify claim ttl >= updated ttl value
_, body = self.client.query_claim(claim_uri)
updated_claim_ttl = body["ttl"]
self.assertTrue(updated_claim_ttl >= claim_ttl)
# Delete Claimed message
self.client.delete_messages(claimed_message_uri)
@test.attr(type='smoke')
@test.idempotent_id('fd4c7921-cb3f-4ed8-9ac8-e8f1e74c44aa')
def test_release_claim(self):
# Post a Claim
resp, body = self._post_and_claim_messages(queue_name=self.queue_name)
claim_uri = resp['location']
# Release Claim
self.client.delete_claim(claim_uri)
# Delete Claimed message
# This will implicitly verify that the claim is deleted.
message_uri = urlparse.urlparse(claim_uri).path
self.client.delete_messages(message_uri)
@classmethod
def resource_cleanup(cls):
cls.delete_queue(cls.queue_name)
super(TestClaims, cls).resource_cleanup()

View File

@ -1,125 +0,0 @@
# Copyright (c) 2014 Rackspace, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from tempest.api.messaging import base
from tempest.common.utils import data_utils
from tempest import config
from tempest import test
CONF = config.CONF
class TestMessages(base.BaseMessagingTest):
@classmethod
def resource_setup(cls):
super(TestMessages, cls).resource_setup()
cls.queue_name = data_utils.rand_name('Queues-Test')
# Create Queue
cls.client.create_queue(cls.queue_name)
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)
return resp, body
@test.attr(type='smoke')
@test.idempotent_id('93867172-a414-4eb3-a639-96e943c516b4')
def test_post_messages(self):
# Post Messages
resp, _ = self._post_messages()
# Get on the posted messages
message_uri = resp['location']
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'])
@test.attr(type='smoke')
@test.idempotent_id('c967d59a-e919-41cb-994b-1c4300452c80')
def test_list_messages(self):
# Post Messages
self._post_messages()
# List Messages
resp, _ = self.list_messages(queue_name=self.queue_name)
# 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'])
@test.attr(type='smoke')
@test.idempotent_id('2a68e3de-24df-47c3-9039-ec4156656bf8')
def test_get_message(self):
# Post Messages
_, body = self._post_messages()
message_uri = body['resources'][0]
# Get posted message
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'])
@test.attr(type='smoke')
@test.idempotent_id('c4b0a30b-efda-4b87-a395-0c43140df74d')
def test_get_multiple_messages(self):
# Post Messages
resp, _ = self._post_messages()
message_uri = resp['location']
# Get posted messages
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'])
@test.attr(type='smoke')
@test.idempotent_id('fc0fca47-dd8b-4ecc-8522-d9c191f9bc9f')
def test_delete_single_message(self):
# Post Messages
_, body = self._post_messages()
message_uri = body['resources'][0]
# Delete posted message & verify the delete operration
self.client.delete_messages(message_uri)
message_uri = message_uri.replace('/messages/', '/messages?ids=')
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'])
@test.attr(type='smoke')
@test.idempotent_id('00cca069-5c8f-4b42-bff1-c577da2a4546')
def test_delete_multiple_messages(self):
# Post Messages
resp, _ = self._post_messages()
message_uri = resp['location']
# Delete multiple messages
self.client.delete_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'])
@classmethod
def resource_cleanup(cls):
cls.delete_queue(cls.queue_name)
super(TestMessages, cls).resource_cleanup()

View File

@ -1,124 +0,0 @@
# Copyright (c) 2014 Rackspace, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from six import moves
from tempest_lib import exceptions as lib_exc
from testtools import matchers
from tempest.api.messaging import base
from tempest.common.utils import data_utils
from tempest import test
class TestQueues(base.BaseMessagingTest):
@test.attr(type='smoke')
@test.idempotent_id('9f1c4c72-80c5-4dac-acf3-188cef42e36c')
def test_create_delete_queue(self):
# Create & Delete Queue
queue_name = data_utils.rand_name('test')
_, body = self.create_queue(queue_name)
self.addCleanup(self.client.delete_queue, queue_name)
# NOTE(gmann): create_queue returns response status code as 201
# so specifically checking the expected empty response body as
# this is not going to be checked in response_checker().
self.assertEqual('', body)
self.delete_queue(queue_name)
self.assertRaises(lib_exc.NotFound,
self.client.show_queue,
queue_name)
class TestManageQueue(base.BaseMessagingTest):
@classmethod
def resource_setup(cls):
super(TestManageQueue, cls).resource_setup()
cls.queues = list()
for _ in moves.xrange(5):
queue_name = data_utils.rand_name('Queues-Test')
cls.queues.append(queue_name)
# Create Queue
cls.client.create_queue(queue_name)
@test.attr(type='smoke')
@test.idempotent_id('ccd3d69e-f156-4c5f-8a12-b4f24bee44e1')
def test_check_queue_existence(self):
# Checking Queue Existence
for queue_name in self.queues:
self.check_queue_exists(queue_name)
@test.attr(type='smoke')
@test.idempotent_id('e27634d8-9c8f-47d8-a677-655c47658d3e')
def test_check_queue_head(self):
# Checking Queue Existence by calling HEAD
for queue_name in self.queues:
self.check_queue_exists_head(queue_name)
@test.attr(type='smoke')
@test.idempotent_id('0a0feeca-7768-4303-806d-82bbbb796ad3')
def test_list_queues(self):
# Listing queues
_, body = self.list_queues()
self.assertEqual(len(body['queues']), len(self.queues))
for item in body['queues']:
self.assertIn(item['name'], self.queues)
@test.attr(type='smoke')
@test.idempotent_id('8fb66602-077d-49d6-ae1a-5f2091739178')
def test_get_queue_stats(self):
# Retrieve random queue
queue_name = self.queues[data_utils.rand_int_id(0,
len(self.queues) - 1)]
# Get Queue Stats for a newly created Queue
_, body = self.get_queue_stats(queue_name)
msgs = body['messages']
for element in ('free', 'claimed', 'total'):
self.assertEqual(0, msgs[element])
for element in ('oldest', 'newest'):
self.assertNotIn(element, msgs)
@test.attr(type='smoke')
@test.idempotent_id('0e2441e6-6593-4bdb-a3c0-20e66eeb3fff')
def test_set_and_get_queue_metadata(self):
# Retrieve random queue
queue_name = self.queues[data_utils.rand_int_id(0,
len(self.queues) - 1)]
# Check the Queue has no metadata
_, body = self.get_queue_metadata(queue_name)
self.assertThat(body, matchers.HasLength(0))
# Create metadata
key3 = [0, 1, 2, 3, 4]
key2 = data_utils.rand_name('value')
req_body1 = dict()
req_body1[data_utils.rand_name('key3')] = key3
req_body1[data_utils.rand_name('key2')] = key2
req_body = dict()
req_body[data_utils.rand_name('key1')] = req_body1
# Set Queue Metadata
self.set_queue_metadata(queue_name, req_body)
# Get Queue Metadata
_, body = self.get_queue_metadata(queue_name)
self.assertThat(body, matchers.Equals(req_body))
@classmethod
def resource_cleanup(cls):
for queue_name in cls.queues:
cls.client.delete_queue(queue_name)
super(TestManageQueue, cls).resource_cleanup()

View File

@ -1,239 +0,0 @@
# Copyright (c) 2014 Rackspace, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
list_link = {
'type': 'object',
'properties': {
'rel': {'type': 'string'},
'href': {
'type': 'string',
'format': 'uri'
}
},
'required': ['href', 'rel']
}
list_queue = {
'type': 'object',
'properties': {
'name': {'type': 'string'},
'href': {
'type': 'string',
'format': 'uri'
},
'metadata': {'type': 'object'}
},
'required': ['name', 'href']
}
list_queues = {
'status_code': [200, 204],
'response_body': {
'type': 'object',
'properties': {
'links': {
'type': 'array',
'items': list_link,
'maxItems': 1
},
'queues': {
'type': 'array',
'items': list_queue
}
},
'required': ['links', 'queues']
}
}
age = {
'type': 'number',
'minimum': 0
}
message_link = {
'type': 'object',
'properties': {
'href': {
'type': 'string',
'format': 'uri'
},
'age': age,
'created': {
'type': 'string',
'format': 'date-time'
}
},
'required': ['href', 'age', 'created']
}
messages = {
'type': 'object',
'properties': {
'free': {'type': 'number'},
'claimed': {'type': 'number'},
'total': {'type': 'number'},
'oldest': message_link,
'newest': message_link
},
'required': ['free', 'claimed', 'total']
}
queue_stats = {
'status_code': [200],
'response_body': {
'type': 'object',
'properties': {
'messages': messages
},
'required': ['messages']
}
}
resource_schema = {
'type': 'array',
'items': {
'type': 'string'
},
'minItems': 1
}
post_messages = {
'status_code': [201],
'response_body': {
'type': 'object',
'properties': {
'resources': resource_schema,
'partial': {'type': 'boolean'}
}
},
'required': ['resources', 'partial']
}
message_ttl = {
'type': 'number',
'minimum': 1
}
list_messages_links = {
'type': 'array',
'maxItems': 1,
'minItems': 1,
'items': {
'type': 'object',
'properties': {
'rel': {'type': 'string'},
'href': {'type': 'string'}
},
'required': ['rel', 'href']
}
}
list_messages_response = {
'type': 'array',
'minItems': 1,
'items': {
'type': 'object',
'properties': {
'href': {'type': 'string'},
'ttl': message_ttl,
'age': age,
'body': {'type': 'object'}
},
'required': ['href', 'ttl', 'age', 'body']
}
}
list_messages = {
'status_code': [200, 204],
'response_body': {
'type': 'object',
'properties': {
'links': list_messages_links,
'messages': list_messages_response
}
},
'required': ['links', 'messages']
}
single_message = {
'type': 'object',
'properties': {
'href': {'type': 'string'},
'ttl': message_ttl,
'age': age,
'body': {'type': 'object'}
},
'required': ['href', 'ttl', 'age', 'body']
}
get_single_message = {
'status_code': [200],
'response_body': single_message
}
get_multiple_messages = {
'status_code': [200],
'response_body': {
'type': 'array',
'items': single_message,
'minItems': 1
}
}
messages_claimed = {
'type': 'object',
'properties': {
'href': {
'type': 'string',
'format': 'uri'
},
'ttl': message_ttl,
'age': {'type': 'number'},
'body': {'type': 'object'}
},
'required': ['href', 'ttl', 'age', 'body']
}
claim_messages = {
'status_code': [201, 204],
'response_body': {
'type': 'array',
'items': messages_claimed,
'minItems': 1
}
}
claim_ttl = {
'type': 'number',
'minimum': 1
}
query_claim = {
'status_code': [200],
'response_body': {
'type': 'object',
'properties': {
'age': {'type': 'number'},
'ttl': claim_ttl,
'messages': {
'type': 'array',
'minItems': 1
}
},
'required': ['ttl', 'age', 'messages']
}
}

View File

@ -132,8 +132,6 @@ from tempest.services.identity.v3.json.services_client import \
from tempest.services.identity.v3.json.users_clients import UsersV3Client
from tempest.services.image.v1.json.images_client import ImagesClient
from tempest.services.image.v2.json.images_client import ImagesClientV2
from tempest.services.messaging.json.messaging_client import \
MessagingClient
from tempest.services.network.json.network_client import NetworkClient
from tempest.services.network.json.security_group_rules_client import \
SecurityGroupRulesClient
@ -344,11 +342,6 @@ class Manager(manager.Manager):
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
self.messaging_client = MessagingClient(
self.auth_provider,
CONF.messaging.catalog_type,
CONF.identity.region,
**self.default_params_with_timeout_values)
if CONF.service_available.ceilometer:
self.telemetry_client = TelemetryClient(
self.auth_provider,

View File

@ -269,7 +269,6 @@ def check_service_availability(os, update):
'data_processing': 'sahara',
'baremetal': 'ironic',
'identity': 'keystone',
'messaging': 'zaqar',
'database': 'trove'
}
# Get catalog list for endpoints to use for validation

View File

@ -561,41 +561,6 @@ NetworkFeaturesGroup = [
" port admin state"),
]
messaging_group = cfg.OptGroup(name='messaging',
title='Messaging Service')
MessagingGroup = [
cfg.StrOpt('catalog_type',
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 '
'listing queues'),
cfg.IntOpt('max_queue_metadata',
default=65536,
help='The maximum metadata size for a queue'),
cfg.IntOpt('max_messages_per_page',
default=20,
help='The maximum number of queue message per page when '
'listing (or) posting messages'),
cfg.IntOpt('max_message_size',
default=262144,
help='The maximum size of a message body'),
cfg.IntOpt('max_messages_per_claim',
default=20,
help='The maximum number of messages per claim'),
cfg.IntOpt('max_message_ttl',
default=1209600,
help='The maximum ttl for a message'),
cfg.IntOpt('max_claim_ttl',
default=43200,
help='The maximum ttl for a claim'),
cfg.IntOpt('max_claim_grace',
default=43200,
help='The maximum grace period for a claim'),
]
validation_group = cfg.OptGroup(name='validation',
title='SSH Validation options')
@ -1113,9 +1078,6 @@ ServiceAvailableGroup = [
cfg.BoolOpt('trove',
default=False,
help="Whether or not Trove is expected to be available"),
cfg.BoolOpt('zaqar',
default=False,
help="Whether or not Zaqar is expected to be available"),
]
debug_group = cfg.OptGroup(name="debug",
@ -1242,7 +1204,6 @@ _opts = [
(image_feature_group, ImageFeaturesGroup),
(network_group, NetworkGroup),
(network_feature_group, NetworkFeaturesGroup),
(messaging_group, MessagingGroup),
(validation_group, ValidationGroup),
(volume_group, VolumeGroup),
(volume_feature_group, VolumeFeaturesGroup),
@ -1318,7 +1279,6 @@ class TempestConfigPrivate(object):
'object-storage-feature-enabled']
self.database = _CONF.database
self.orchestration = _CONF.orchestration
self.messaging = _CONF.messaging
self.telemetry = _CONF.telemetry
self.telemetry_feature_enabled = _CONF['telemetry-feature-enabled']
self.dashboard = _CONF.dashboard

View File

@ -20,7 +20,7 @@ import pep8
PYTHON_CLIENTS = ['cinder', 'glance', 'keystone', 'nova', 'swift', 'neutron',
'trove', 'ironic', 'savanna', 'heat', 'ceilometer',
'zaqar', 'sahara']
'sahara']
PYTHON_CLIENT_RE = re.compile('import (%s)client' % '|'.join(PYTHON_CLIENTS))
TEST_DEFINITION = re.compile(r'^\s*def test.*')

View File

@ -1,4 +1,3 @@
./tempest/services/messaging/json/messaging_client.py
./tempest/services/object_storage/object_client.py
./tempest/services/telemetry/json/alarming_client.py
./tempest/services/telemetry/json/telemetry_client.py

View File

@ -1,176 +0,0 @@
# Copyright (c) 2014 Rackspace, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import uuid
from oslo_serialization import jsonutils as json
from six.moves.urllib import parse as urllib
from tempest.api_schema.response.messaging.v1 import queues as queues_schema
from tempest.common import service_client
class MessagingClient(service_client.ServiceClient):
def __init__(self, auth_provider, service, region,
endpoint_type=None, build_interval=None, build_timeout=None,
disable_ssl_certificate_validation=None, ca_certs=None,
trace_requests=None):
dscv = disable_ssl_certificate_validation
super(MessagingClient, self).__init__(
auth_provider, service, region,
endpoint_type=endpoint_type,
build_interval=build_interval,
build_timeout=build_timeout,
disable_ssl_certificate_validation=dscv,
ca_certs=ca_certs,
trace_requests=trace_requests)
self.version = '1'
self.uri_prefix = 'v{0}'.format(self.version)
client_id = uuid.uuid4().hex
self.headers = {'Client-ID': client_id}
def list_queues(self):
uri = '{0}/queues'.format(self.uri_prefix)
resp, body = self.get(uri)
if resp['status'] != '204':
body = json.loads(body)
self.validate_response(queues_schema.list_queues, resp, body)
return resp, body
def create_queue(self, queue_name):
uri = '{0}/queues/{1}'.format(self.uri_prefix, queue_name)
resp, body = self.put(uri, body=None)
self.expected_success(201, resp.status)
return resp, body
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)
return resp, body
def head_queue(self, queue_name):
uri = '{0}/queues/{1}'.format(self.uri_prefix, queue_name)
resp, body = self.head(uri)
self.expected_success(204, resp.status)
return resp, body
def delete_queue(self, queue_name):
uri = '{0}/queues/{1}'.format(self.uri_prefix, queue_name)
resp, body = self.delete(uri)
self.expected_success(204, resp.status)
return resp, body
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 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)
body = json.loads(body)
return resp, body
def set_queue_metadata(self, queue_name, rbody):
uri = '{0}/queues/{1}/metadata'.format(self.uri_prefix, queue_name)
resp, body = self.put(uri, body=json.dumps(rbody))
self.expected_success(204, resp.status)
return resp, body
def post_messages(self, queue_name, rbody):
uri = '{0}/queues/{1}/messages'.format(self.uri_prefix, queue_name)
resp, body = self.post(uri, body=json.dumps(rbody),
extra_headers=True,
headers=self.headers)
body = json.loads(body)
self.validate_response(queues_schema.post_messages, resp, body)
return resp, body
def list_messages(self, queue_name):
uri = '{0}/queues/{1}/messages?echo=True'.format(self.uri_prefix,
queue_name)
resp, body = self.get(uri, extra_headers=True, headers=self.headers)
if resp['status'] != '204':
body = json.loads(body)
self.validate_response(queues_schema.list_messages, resp, body)
return resp, body
def show_single_message(self, message_uri):
resp, body = self.get(message_uri, extra_headers=True,
headers=self.headers)
if resp['status'] != '204':
body = json.loads(body)
self.validate_response(queues_schema.get_single_message, resp,
body)
return resp, body
def show_multiple_messages(self, message_uri):
resp, body = self.get(message_uri, extra_headers=True,
headers=self.headers)
if resp['status'] != '204':
body = json.loads(body)
self.validate_response(queues_schema.get_multiple_messages,
resp,
body)
return resp, body
def delete_messages(self, message_uri):
resp, body = self.delete(message_uri)
self.expected_success(204, resp.status)
return resp, body
def post_claims(self, queue_name, rbody, url_params=False):
uri = '{0}/queues/{1}/claims'.format(self.uri_prefix, queue_name)
if url_params:
uri += '?%s' % urllib.urlencode(url_params)
resp, body = self.post(uri, body=json.dumps(rbody),
extra_headers=True,
headers=self.headers)
body = json.loads(body)
self.validate_response(queues_schema.claim_messages, resp, body)
return resp, body
def query_claim(self, claim_uri):
resp, body = self.get(claim_uri)
if resp['status'] != '204':
body = json.loads(body)
self.validate_response(queues_schema.query_claim, resp, body)
return resp, body
def update_claim(self, claim_uri, rbody):
resp, body = self.patch(claim_uri, body=json.dumps(rbody))
self.expected_success(204, resp.status)
return resp, body
def delete_claim(self, claim_uri):
resp, body = self.delete(claim_uri)
self.expected_success(204, resp.status)
return resp, body

View File

@ -31,7 +31,6 @@ from tempest.services.identity.v3.json import regions_client
from tempest.services.identity.v3.json import services_client
from tempest.services.image.v1.json import images_client
from tempest.services.image.v2.json import images_client as images_v2_client
from tempest.services.messaging.json import messaging_client
from tempest.services.network.json import network_client
from tempest.services.object_storage import account_client
from tempest.services.object_storage import container_client
@ -86,7 +85,6 @@ class TestServiceClient(base.TestCase):
data_processing_client.DataProcessingClient,
db_flavor_client.DatabaseFlavorsClient,
db_version_client.DatabaseVersionsClient,
messaging_client.MessagingClient,
network_client.NetworkClient,
account_client.AccountClient,
container_client.ContainerClient,