Merge "Removed deprecated 'shard' methods"

This commit is contained in:
Jenkins
2015-06-05 08:37:20 +00:00
committed by Gerrit Code Review
3 changed files with 1 additions and 47 deletions

View File

@@ -14,7 +14,6 @@
# limitations under the License. # limitations under the License.
import uuid import uuid
import warnings
from zaqarclient.common import decorators from zaqarclient.common import decorators
from zaqarclient.queues.v1 import core from zaqarclient.queues.v1 import core
@@ -130,11 +129,6 @@ class Client(object):
return trans.send(req).deserialized_content return trans.send(req).deserialized_content
# ADMIN API # 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): def pool(self, ref, **kwargs):
"""Returns a pool instance """Returns a pool instance

View File

@@ -28,8 +28,6 @@ Functions present in this module assume that:
""" """
import json import json
import warnings
import zaqarclient.transport.errors as errors import zaqarclient.transport.errors as errors
@@ -414,18 +412,6 @@ def claim_delete(transport, request, queue_name, claim_id):
transport.send(request) 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): def pool_get(transport, request, pool_name, callback=None):
"""Gets pool data """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): def pool_create(transport, request, pool_name, pool_data):
"""Creates a pool called `pool_name` """Creates a pool called `pool_name`
:param transport: Transport instance to use :param transport: Transport instance to use
:type transport: `transport.base.Transport` :type transport: `transport.base.Transport`
:param request: Request instance ready to be sent. :param request: Request instance ready to be sent.

View File

@@ -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)