Removed deprecated 'shard' methods

Old shard methods were deprecated and a deprecation warning was being
raised in the current released version. I removed the deprecated shard
methods as well as the shard module.

Change-Id: I51dd839b566f5cbea03df9ab8500d9558282a59c
Closes-bug: #1395788
This commit is contained in:
dynarro 2014-11-25 09:46:34 +01:00 committed by Flavio Percoco
parent f0de7d6039
commit f46979b4d5
3 changed files with 1 additions and 47 deletions

View File

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

View File

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

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)