Merge "Removed deprecated 'shard' methods"
This commit is contained in:
commit
09de9ee381
@ -14,7 +14,6 @@
|
||||
# limitations under the License.
|
||||
|
||||
import uuid
|
||||
import warnings
|
||||
|
||||
from zaqarclient.common import decorators
|
||||
from zaqarclient.queues.v1 import core
|
||||
@ -130,11 +129,6 @@ class Client(object):
|
||||
return trans.send(req).deserialized_content
|
||||
|
||||
# ADMIN API
|
||||
def shard(self, ref, **kwargs):
|
||||
warnings.warn(_('`shard_create`\'s been renamed to `pool_create` '),
|
||||
DeprecationWarning, stacklevel=2)
|
||||
return self.pool(ref, **kwargs)
|
||||
|
||||
def pool(self, ref, **kwargs):
|
||||
"""Returns a pool instance
|
||||
|
||||
|
@ -28,8 +28,6 @@ Functions present in this module assume that:
|
||||
"""
|
||||
|
||||
import json
|
||||
import warnings
|
||||
|
||||
import zaqarclient.transport.errors as errors
|
||||
|
||||
|
||||
@ -414,18 +412,6 @@ def claim_delete(transport, request, queue_name, claim_id):
|
||||
transport.send(request)
|
||||
|
||||
|
||||
def shard_create(transport, request, pool_name, pool_data):
|
||||
warnings.warn(_('`shard_create`\'s been renamed to `pool_create` '),
|
||||
DeprecationWarning, stacklevel=2)
|
||||
return pool_create(transport, request, pool_name, pool_data)
|
||||
|
||||
|
||||
def shard_delete(transport, request, pool_name):
|
||||
warnings.warn(_('`shard_delete`\'s been renamed to `pool_delete` '),
|
||||
DeprecationWarning, stacklevel=2)
|
||||
return pool_delete(transport, request, pool_name)
|
||||
|
||||
|
||||
def pool_get(transport, request, pool_name, callback=None):
|
||||
"""Gets pool data
|
||||
|
||||
@ -448,6 +434,7 @@ def pool_get(transport, request, pool_name, callback=None):
|
||||
def pool_create(transport, request, pool_name, pool_data):
|
||||
"""Creates a pool called `pool_name`
|
||||
|
||||
|
||||
:param transport: Transport instance to use
|
||||
:type transport: `transport.base.Transport`
|
||||
:param request: Request instance ready to be sent.
|
||||
|
@ -1,27 +0,0 @@
|
||||
# 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.
|
||||
|
||||
import warnings
|
||||
|
||||
from zaqarclient.queues.v1 import pool
|
||||
|
||||
|
||||
class Shard(pool.Pool):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
warnings.warn(_('Shard\'s been renamed to `Pool` '
|
||||
'please use `zaqarclient.queues.v1.pool.Pool` '
|
||||
' instead'), DeprecationWarning, stacklevel=2)
|
||||
super(Shard, self).__init__(*args, **kwargs)
|
Loading…
x
Reference in New Issue
Block a user