Add pool
support for v2
This patch is targeting for the library layer, the cli support will be tracked by another patch. Change-Id: Ic0a44a5d3e0990cf065c4f959e4ef76712ce1882
This commit is contained in:
parent
1ef4a95ed6
commit
b0d412ed2c
26
tests/functional/queues/v2/test_pool.py
Normal file
26
tests/functional/queues/v2/test_pool.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 pool
|
||||
from zaqarclient.transport import http
|
||||
|
||||
|
||||
class QueuesV2PoolHttpFunctionalTest(pool.QueuesV2PoolFunctionalTest):
|
||||
|
||||
is_functional = True
|
||||
transport_cls = http.HttpTransport
|
||||
url = 'http://127.0.0.1:8888'
|
||||
version = 2
|
25
tests/unit/queues/v2/test_pool.py
Normal file
25
tests/unit/queues/v2/test_pool.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 pool
|
||||
from zaqarclient.transport import http
|
||||
|
||||
|
||||
class QueuesV2PoolHttpUnitTest(pool.QueuesV2PoolUnitTest):
|
||||
|
||||
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_delete = core.message_delete
|
||||
message_delete_many = core.message_delete_many
|
||||
pool_get = core.pool_get
|
||||
pool_create = core.pool_create
|
||||
pool_delete = core.pool_delete
|
||||
pool_update = core.pool_update
|
||||
pool_list = core.pool_list
|
||||
flavor_get = core.flavor_get
|
||||
flavor_create = core.flavor_create
|
||||
flavor_delete = core.flavor_delete
|
||||
|
20
zaqarclient/queues/v2/pool.py
Normal file
20
zaqarclient/queues/v2/pool.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 pool
|
||||
|
||||
|
||||
class Pool(pool.Pool):
|
||||
pass
|
@ -175,3 +175,11 @@ class QueuesV1_1PoolFunctionalTest(base.QueuesTestBase):
|
||||
|
||||
pool = self.client.pool('test', **pool_data)
|
||||
pool.delete()
|
||||
|
||||
|
||||
class QueuesV2PoolUnitTest(QueuesV1PoolUnitTest):
|
||||
pass
|
||||
|
||||
|
||||
class QueuesV2PoolFunctionalTest(QueuesV1_1PoolFunctionalTest):
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user