Add flavor
support for v2
This patch is targeting for the library layer, the cli support will be tracked by another patch. Change-Id: I284db15b66360f4bae317239a90743b4965bd016
This commit is contained in:
parent
808ea8b71a
commit
1ef4a95ed6
26
tests/functional/queues/v2/test_flavor.py
Normal file
26
tests/functional/queues/v2/test_flavor.py
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Copyright (c) 2014 Red Hat, 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 zaqarclient.tests.queues import flavor
|
||||||
|
from zaqarclient.transport import http
|
||||||
|
|
||||||
|
|
||||||
|
class QueuesV2FlavorHttpFunctionalTest(flavor.QueuesV2FlavorFunctionalTest):
|
||||||
|
|
||||||
|
is_functional = True
|
||||||
|
transport_cls = http.HttpTransport
|
||||||
|
url = 'http://127.0.0.1:8888'
|
||||||
|
version = 2
|
25
tests/unit/queues/v2/test_flavor.py
Normal file
25
tests/unit/queues/v2/test_flavor.py
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Copyright (c) 2014 Red Hat, 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 zaqarclient.tests.queues import flavor
|
||||||
|
from zaqarclient.transport import http
|
||||||
|
|
||||||
|
|
||||||
|
class QueuesV2FlavorHttpUnitTest(flavor.QueuesV2FlavorUnitTest):
|
||||||
|
|
||||||
|
transport_cls = http.HttpTransport
|
||||||
|
url = 'http://127.0.0.1:8888/v2'
|
||||||
|
version = 2
|
@ -46,6 +46,11 @@ message_list = core.message_list
|
|||||||
message_post = core.message_post
|
message_post = core.message_post
|
||||||
message_delete = core.message_delete
|
message_delete = core.message_delete
|
||||||
message_delete_many = core.message_delete_many
|
message_delete_many = core.message_delete_many
|
||||||
|
flavor_get = core.flavor_get
|
||||||
|
flavor_create = core.flavor_create
|
||||||
|
flavor_delete = core.flavor_delete
|
||||||
|
flavor_update = core.flavor_update
|
||||||
|
flavor_list = core.flavor_list
|
||||||
|
|
||||||
|
|
||||||
def signed_url_create(transport, request, queue_name, paths=None,
|
def signed_url_create(transport, request, queue_name, paths=None,
|
||||||
|
20
zaqarclient/queues/v2/flavor.py
Normal file
20
zaqarclient/queues/v2/flavor.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Copyright (c) 2015 Catalyst IT Ltd.
|
||||||
|
#
|
||||||
|
# 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 zaqarclient.queues.v1 import flavor
|
||||||
|
|
||||||
|
|
||||||
|
class Flavor(flavor.Flavor):
|
||||||
|
pass
|
@ -191,3 +191,11 @@ class QueuesV1_1FlavorFunctionalTest(base.QueuesTestBase):
|
|||||||
flavor_data = {'pool': 'us'}
|
flavor_data = {'pool': 'us'}
|
||||||
flavor = self.client.flavor('tasty', **flavor_data)
|
flavor = self.client.flavor('tasty', **flavor_data)
|
||||||
flavor.delete()
|
flavor.delete()
|
||||||
|
|
||||||
|
|
||||||
|
class QueuesV2FlavorUnitTest(QueuesV1_1FlavorUnitTest):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class QueuesV2FlavorFunctionalTest(QueuesV1_1FlavorFunctionalTest):
|
||||||
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user