Fix the inconsistent command format in openstackclient

Change zaqarclient command to keep the same format,
the consistent command format is 'openstack messaging XXX'.

DocImpact

Change-Id: I87302d016915fd7c861b0a7a542a23ae3685443e
Closes-Bug: #1691637
This commit is contained in:
wanghao 2017-06-02 16:32:20 +08:00
parent c94bdafee8
commit fa88a03b3b
4 changed files with 606 additions and 24 deletions

View File

@ -0,0 +1,5 @@
---
fixes:
- Change zaqarclient command to keep the same format like other project does.
the consistent command format is 'openstack messaging XXX'. Marks those
old commands as deprecated and will remove them after Queen release.

View File

@ -73,38 +73,69 @@ openstack.messaging.v1 =
claim_release = zaqarclient.queues.v1.cli:ReleaseClaim claim_release = zaqarclient.queues.v1.cli:ReleaseClaim
openstack.messaging.v2 = openstack.messaging.v2 =
queue_list = zaqarclient.queues.v2.cli:ListQueues queue_list = zaqarclient.queues.v2.cli:OldListQueues
queue_create = zaqarclient.queues.v2.cli:CreateQueue queue_create = zaqarclient.queues.v2.cli:OldCreateQueue
queue_delete = zaqarclient.queues.v2.cli:DeleteQueue queue_delete = zaqarclient.queues.v2.cli:OldDeleteQueue
queue_stats = zaqarclient.queues.v2.cli:GetQueueStats queue_stats = zaqarclient.queues.v2.cli:OldGetQueueStats
queue_set_metadata = zaqarclient.queues.v2.cli:SetQueueMetadata queue_set_metadata = zaqarclient.queues.v2.cli:OldSetQueueMetadata
queue_get_metadata = zaqarclient.queues.v2.cli:GetQueueMetadata queue_get_metadata = zaqarclient.queues.v2.cli:OldGetQueueMetadata
queue_purge = zaqarclient.queues.v2.cli:PurgeQueue queue_purge = zaqarclient.queues.v2.cli:OldPurgeQueue
pool_create = zaqarclient.queues.v2.cli:CreatePool pool_create = zaqarclient.queues.v2.cli:OldCreatePool
pool_show = zaqarclient.queues.v2.cli:ShowPool pool_show = zaqarclient.queues.v2.cli:OldShowPool
pool_update = zaqarclient.queues.v2.cli:UpdatePool pool_update = zaqarclient.queues.v2.cli:OldUpdatePool
pool_delete = zaqarclient.queues.v2.cli:DeletePool pool_delete = zaqarclient.queues.v2.cli:OldDeletePool
pool_list = zaqarclient.queues.v2.cli:ListPools pool_list = zaqarclient.queues.v2.cli:OldListPools
messaging_queue_list = zaqarclient.queues.v2.cli:ListQueues
messaging_queue_create = zaqarclient.queues.v2.cli:CreateQueue
messaging_queue_delete = zaqarclient.queues.v2.cli:DeleteQueue
messaging_queue_stats = zaqarclient.queues.v2.cli:GetQueueStats
messaging_queue_set_metadata = zaqarclient.queues.v2.cli:SetQueueMetadata
messaging_queue_get_metadata = zaqarclient.queues.v2.cli:GetQueueMetadata
messaging_queue_purge = zaqarclient.queues.v2.cli:PurgeQueue
messaging_pool_create = zaqarclient.queues.v2.cli:CreatePool
messaging_pool_show = zaqarclient.queues.v2.cli:ShowPool
messaging_pool_update = zaqarclient.queues.v2.cli:UpdatePool
messaging_pool_delete = zaqarclient.queues.v2.cli:DeletePool
messaging_pool_list = zaqarclient.queues.v2.cli:ListPools
messaging_flavor_list = zaqarclient.queues.v2.cli:ListFlavors messaging_flavor_list = zaqarclient.queues.v2.cli:ListFlavors
messaging_flavor_delete = zaqarclient.queues.v2.cli:DeleteFlavor messaging_flavor_delete = zaqarclient.queues.v2.cli:DeleteFlavor
messaging_flavor_update = zaqarclient.queues.v2.cli:UpdateFlavor messaging_flavor_update = zaqarclient.queues.v2.cli:UpdateFlavor
messaging_flavor_show = zaqarclient.queues.v2.cli:ShowFlavor messaging_flavor_show = zaqarclient.queues.v2.cli:ShowFlavor
messaging_flavor_create = zaqarclient.queues.v2.cli:CreateFlavor messaging_flavor_create = zaqarclient.queues.v2.cli:CreateFlavor
claim_create = zaqarclient.queues.v2.cli:CreateClaim
claim_query = zaqarclient.queues.v2.cli:QueryClaim claim_create = zaqarclient.queues.v2.cli:OldCreateClaim
claim_renew = zaqarclient.queues.v2.cli:RenewClaim claim_query = zaqarclient.queues.v2.cli:OldQueryClaim
claim_release = zaqarclient.queues.v2.cli:ReleaseClaim claim_renew = zaqarclient.queues.v2.cli:OldRenewClaim
subscription_create = zaqarclient.queues.v2.cli:CreateSubscription claim_release = zaqarclient.queues.v2.cli:OldReleaseClaim
subscription_update = zaqarclient.queues.v2.cli:UpdateSubscription subscription_create = zaqarclient.queues.v2.cli:OldCreateSubscription
subscription_delete = zaqarclient.queues.v2.cli:DeleteSubscription subscription_update = zaqarclient.queues.v2.cli:OldUpdateSubscription
subscription_show = zaqarclient.queues.v2.cli:ShowSubscription subscription_delete = zaqarclient.queues.v2.cli:OldDeleteSubscription
subscription_list = zaqarclient.queues.v2.cli:ListSubscriptions subscription_show = zaqarclient.queues.v2.cli:OldShowSubscription
queue_signed_url = zaqarclient.queues.v2.cli:CreateSignedUrl subscription_list = zaqarclient.queues.v2.cli:OldListSubscriptions
queue_signed_url = zaqarclient.queues.v2.cli:OldCreateSignedUrl
messaging_claim_create = zaqarclient.queues.v2.cli:CreateClaim
messaging_claim_query = zaqarclient.queues.v2.cli:QueryClaim
messaging_claim_renew = zaqarclient.queues.v2.cli:RenewClaim
messaging_claim_release = zaqarclient.queues.v2.cli:ReleaseClaim
messaging_subscription_create = zaqarclient.queues.v2.cli:CreateSubscription
messaging_subscription_update = zaqarclient.queues.v2.cli:UpdateSubscription
messaging_subscription_delete = zaqarclient.queues.v2.cli:DeleteSubscription
messaging_subscription_show = zaqarclient.queues.v2.cli:ShowSubscription
messaging_subscription_list = zaqarclient.queues.v2.cli:ListSubscriptions
messaging_queue_signed_url = zaqarclient.queues.v2.cli:CreateSignedUrl
messaging_ping = zaqarclient.queues.v2.cli:Ping messaging_ping = zaqarclient.queues.v2.cli:Ping
messaging_health = zaqarclient.queues.v2.cli:Health messaging_health = zaqarclient.queues.v2.cli:Health
messaging_homedoc = zaqarclient.queues.v2.cli:HomeDoc messaging_homedoc = zaqarclient.queues.v2.cli:HomeDoc
message_post = zaqarclient.queues.v2.cli:PostMessages
message_list = zaqarclient.queues.v2.cli:ListMessages message_post = zaqarclient.queues.v2.cli:OldPostMessages
message_list = zaqarclient.queues.v2.cli:OldListMessages
messaging_message_post = zaqarclient.queues.v2.cli:PostMessages
messaging_message_list = zaqarclient.queues.v2.cli:ListMessages
openstack.cli.extension = openstack.cli.extension =
messaging = zaqarclient.queues.cli messaging = zaqarclient.queues.cli

View File

@ -49,6 +49,24 @@ class CreateQueue(command.ShowOne):
return columns, utils.get_item_properties(data, columns) return columns, utils.get_item_properties(data, columns)
class OldCreateQueue(CreateQueue):
"""Create a queue"""
_description = _("Create a queue")
# TODO(wanghao): Remove this class and ``queue create`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging queue create" instead.'))
return super(OldCreateQueue, self).take_action(parsed_args)
class DeleteQueue(command.Command): class DeleteQueue(command.Command):
"""Delete a queue""" """Delete a queue"""
@ -69,6 +87,24 @@ class DeleteQueue(command.Command):
client.queue(queue_name).delete() client.queue(queue_name).delete()
class OldDeleteQueue(DeleteQueue):
"""Delete a queue"""
_description = _("Delete a queue")
# TODO(wanghao): Remove this class and ``queue delete`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging queue delete" instead.'))
return super(OldDeleteQueue, self).take_action(parsed_args)
class ListQueues(command.Lister): class ListQueues(command.Lister):
"""List available queues""" """List available queues"""
@ -109,6 +145,24 @@ class ListQueues(command.Lister):
return (columns, (utils.get_item_properties(s, columns) for s in data)) return (columns, (utils.get_item_properties(s, columns) for s in data))
class OldListQueues(ListQueues):
"""List available queues"""
_description = _("List available queues")
# TODO(wanghao): Remove this class and ``queue list`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging queue list" instead.'))
return super(OldListQueues, self).take_action(parsed_args)
class CheckQueueExistence(command.ShowOne): class CheckQueueExistence(command.ShowOne):
"""Check queue existence""" """Check queue existence"""
@ -133,6 +187,24 @@ class CheckQueueExistence(command.ShowOne):
return columns, utils.get_dict_properties(data, columns) return columns, utils.get_dict_properties(data, columns)
class OldQueueExistence(CheckQueueExistence):
"""Check queue existence"""
_description = _("Check queue existence")
# TODO(wanghao): Remove this class and ``queue exists`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging queue exists" instead.'))
return super(OldQueueExistence, self).take_action(parsed_args)
class SetQueueMetadata(command.Command): class SetQueueMetadata(command.Command):
"""Set queue metadata""" """Set queue metadata"""
@ -169,6 +241,25 @@ class SetQueueMetadata(command.Command):
metadata(new_meta=valid_metadata) metadata(new_meta=valid_metadata)
class OldSetQueueMetadata(SetQueueMetadata):
"""Set queue metadata"""
_description = _("Set queue metadata")
# TODO(wanghao): Remove this class and ``queue set metadata`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging queue set metadata" '
'instead.'))
return super(OldSetQueueMetadata, self).take_action(parsed_args)
class GetQueueMetadata(command.ShowOne): class GetQueueMetadata(command.ShowOne):
"""Get queue metadata""" """Get queue metadata"""
@ -196,6 +287,25 @@ class GetQueueMetadata(command.ShowOne):
return columns, utils.get_dict_properties(data, columns) return columns, utils.get_dict_properties(data, columns)
class OldGetQueueMetadata(GetQueueMetadata):
"""Get queue metadata"""
_description = _("Get queue metadata")
# TODO(wanghao): Remove this class and ``queue get metadata`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging queue get metadata" '
'instead.'))
return super(OldGetQueueMetadata, self).take_action(parsed_args)
class GetQueueStats(command.ShowOne): class GetQueueStats(command.ShowOne):
"""Get queue stats""" """Get queue stats"""
@ -225,6 +335,25 @@ class GetQueueStats(command.ShowOne):
return columns, utils.get_dict_properties(data, columns) return columns, utils.get_dict_properties(data, columns)
class OldGetQueueStats(GetQueueStats):
"""Get queue stats"""
_description = _("Get queue stats")
# TODO(wanghao): Remove this class and ``queue stats`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging queue stats" '
'instead.'))
return super(OldGetQueueStats, self).take_action(parsed_args)
class CreatePool(command.ShowOne): class CreatePool(command.ShowOne):
"""Create a pool""" """Create a pool"""
@ -281,6 +410,25 @@ class CreatePool(command.ShowOne):
return columns, utils.get_item_properties(data, columns) return columns, utils.get_item_properties(data, columns)
class OldCreatePool(CreatePool):
"""Create a pool"""
_description = _("Create a pool")
# TODO(wanghao): Remove this class and ``pool create`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging pool create" '
'instead.'))
return super(OldCreatePool, self).take_action(parsed_args)
class ShowPool(command.ShowOne): class ShowPool(command.ShowOne):
"""Display pool details""" """Display pool details"""
@ -305,6 +453,25 @@ class ShowPool(command.ShowOne):
return columns, utils.get_dict_properties(pool_data, columns) return columns, utils.get_dict_properties(pool_data, columns)
class OldShowPool(ShowPool):
"""Display pool details"""
_description = _("Display pool details")
# TODO(wanghao): Remove this class and ``pool show`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging pool show" '
'instead.'))
return super(OldShowPool, self).take_action(parsed_args)
class UpdatePool(command.ShowOne): class UpdatePool(command.ShowOne):
"""Update a pool attribute""" """Update a pool attribute"""
@ -358,6 +525,25 @@ class UpdatePool(command.ShowOne):
return columns, utils.get_dict_properties(pool_data, columns) return columns, utils.get_dict_properties(pool_data, columns)
class OldUpdatePool(UpdatePool):
"""Update a pool attribute"""
_description = _("Update a pool attribute")
# TODO(wanghao): Remove this class and ``pool update`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging pool update" '
'instead.'))
return super(OldUpdatePool, self).take_action(parsed_args)
class DeletePool(command.Command): class DeletePool(command.Command):
"""Delete a pool""" """Delete a pool"""
@ -378,6 +564,25 @@ class DeletePool(command.Command):
client.pool(pool_name, auto_create=False).delete() client.pool(pool_name, auto_create=False).delete()
class OldDeletePool(DeletePool):
"""Delete a pool"""
_description = _("Delete a pool")
# TODO(wanghao): Remove this class and ``pool delete`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging pool delete" '
'instead.'))
return super(OldDeletePool, self).take_action(parsed_args)
class ListPools(command.Lister): class ListPools(command.Lister):
"""List available Pools""" """List available Pools"""
@ -420,6 +625,25 @@ class ListPools(command.Lister):
(utils.get_item_properties(s, columns) for s in data)) (utils.get_item_properties(s, columns) for s in data))
class OldListPools(ListPools):
"""List available Pools"""
_description = _("List available Pools")
# TODO(wanghao): Remove this class and ``pool list`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging pool list" '
'instead.'))
return super(OldListPools, self).take_action(parsed_args)
class UpdateFlavor(command.ShowOne): class UpdateFlavor(command.ShowOne):
"""Update a flavor's attributes""" """Update a flavor's attributes"""
@ -635,6 +859,25 @@ class CreateClaim(command.Lister):
(utils.get_item_properties(s, keys) for s in data)) (utils.get_item_properties(s, keys) for s in data))
class OldCreateClaim(CreateClaim):
"""Create claim and return a list of claimed messages"""
_description = _("Create claim and return a list of claimed messages")
# TODO(wanghao): Remove this class and ``claim create`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging claim create" '
'instead.'))
return super(OldCreateClaim, self).take_action(parsed_args)
class QueryClaim(command.Lister): class QueryClaim(command.Lister):
"""Display claim details""" """Display claim details"""
@ -666,6 +909,25 @@ class QueryClaim(command.Lister):
(utils.get_item_properties(s, keys) for s in data)) (utils.get_item_properties(s, keys) for s in data))
class OldQueryClaim(QueryClaim):
"""Display claim details"""
_description = _("Display claim details")
# TODO(wanghao): Remove this class and ``claim query`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging claim query" '
'instead.'))
return super(OldQueryClaim, self).take_action(parsed_args)
class RenewClaim(command.Lister): class RenewClaim(command.Lister):
"""Renew a claim""" """Renew a claim"""
@ -715,6 +977,25 @@ class RenewClaim(command.Lister):
(utils.get_item_properties(s, keys) for s in data)) (utils.get_item_properties(s, keys) for s in data))
class OldRenewClaim(RenewClaim):
"""Renew a claim"""
_description = _("Renew a claim")
# TODO(wanghao): Remove this class and ``claim renew`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging claim renew" '
'instead.'))
return super(OldRenewClaim, self).take_action(parsed_args)
class ReleaseClaim(command.Command): class ReleaseClaim(command.Command):
"""Delete a claim""" """Delete a claim"""
@ -739,3 +1020,22 @@ class ReleaseClaim(command.Command):
queue = client.queue(parsed_args.queue_name, auto_create=False) queue = client.queue(parsed_args.queue_name, auto_create=False)
queue.claim(id=parsed_args.claim_id).delete() queue.claim(id=parsed_args.claim_id).delete()
class OldReleaseClaim(ReleaseClaim):
"""Delete a claim"""
_description = _("Delete a claim")
# TODO(wanghao): Remove this class and ``claim release`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging claim release" '
'instead.'))
return super(OldReleaseClaim, self).take_action(parsed_args)

View File

@ -33,21 +33,41 @@ class CreateQueue(cli.CreateQueue):
pass pass
class OldCreateQueue(cli.OldCreateQueue):
"""Create a queue"""
pass
class DeleteQueue(cli.DeleteQueue): class DeleteQueue(cli.DeleteQueue):
"""Delete a queue""" """Delete a queue"""
pass pass
class OldDeleteQueue(cli.OldDeleteQueue):
"""Delete a queue"""
pass
class ListQueues(cli.ListQueues): class ListQueues(cli.ListQueues):
"""List available queues""" """List available queues"""
pass pass
class OldListQueues(cli.OldListQueues):
"""List available queues"""
pass
class GetQueueStats(cli.GetQueueStats): class GetQueueStats(cli.GetQueueStats):
"""Get queue stats""" """Get queue stats"""
pass pass
class OldGetQueueStats(cli.OldGetQueueStats):
"""Get queue stats"""
pass
class SetQueueMetadata(command.Command): class SetQueueMetadata(command.Command):
"""Set queue metadata""" """Set queue metadata"""
@ -85,11 +105,21 @@ class SetQueueMetadata(command.Command):
metadata(new_meta=valid_metadata) metadata(new_meta=valid_metadata)
class OldSetQueueMetadata(cli.OldSetQueueMetadata):
"""Set queue metadata"""
pass
class GetQueueMetadata(cli.GetQueueMetadata): class GetQueueMetadata(cli.GetQueueMetadata):
"""Get queue metadata""" """Get queue metadata"""
pass pass
class OldGetQueueMetadata(cli.OldGetQueueMetadata):
"""Get queue metadata"""
pass
class PostMessages(command.Command): class PostMessages(command.Command):
"""Post messages for a given queue""" """Post messages for a given queue"""
@ -130,6 +160,25 @@ class PostMessages(command.Command):
queue.post(parsed_args.messages) queue.post(parsed_args.messages)
class OldPostMessages(PostMessages):
"""Post messages for a given queue"""
_description = _("Post messages for a given queue")
# TODO(wanghao): Remove this class and ``message post`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging message post" '
'instead.'))
return super(OldPostMessages, self).take_action(parsed_args)
class ListMessages(command.Lister): class ListMessages(command.Lister):
"""List all messages for a given queue""" """List all messages for a given queue"""
@ -199,6 +248,25 @@ class ListMessages(command.Lister):
(utils.get_item_properties(s, columns) for s in messages)) (utils.get_item_properties(s, columns) for s in messages))
class OldListMessages(ListMessages):
"""List all messages for a given queue"""
_description = _("List all messages for a given queue")
# TODO(wanghao): Remove this class and ``message list`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging message list" '
'instead.'))
return super(OldListMessages, self).take_action(parsed_args)
class PurgeQueue(command.Command): class PurgeQueue(command.Command):
"""Purge a queue""" """Purge a queue"""
@ -226,31 +294,75 @@ class PurgeQueue(command.Command):
resource_types=parsed_args.resource_types) resource_types=parsed_args.resource_types)
class OldPurgeQueue(PurgeQueue):
"""Purge a queue"""
_description = _("Purge a queue")
# TODO(wanghao): Remove this class and ``queue purge`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging queue purge" '
'instead.'))
return super(OldPurgeQueue, self).take_action(parsed_args)
class CreatePool(cli.CreatePool): class CreatePool(cli.CreatePool):
"""Create a pool""" """Create a pool"""
pass pass
class OldCreatePool(cli.OldCreatePool):
"""Create a pool"""
pass
class ShowPool(cli.ShowPool): class ShowPool(cli.ShowPool):
"""Display pool details""" """Display pool details"""
pass pass
class OldShowPool(cli.OldShowPool):
"""Display pool details"""
pass
class UpdatePool(cli.UpdatePool): class UpdatePool(cli.UpdatePool):
"""Update a pool attribute""" """Update a pool attribute"""
pass pass
class OldUpdatePool(cli.OldUpdatePool):
"""Update a pool attribute"""
pass
class DeletePool(cli.DeletePool): class DeletePool(cli.DeletePool):
"""Delete a pool""" """Delete a pool"""
pass pass
class OldDeletePool(cli.OldDeletePool):
"""Delete a pool"""
pass
class ListPools(cli.ListPools): class ListPools(cli.ListPools):
"""List available Pools""" """List available Pools"""
pass pass
class OldListPools(cli.OldListPools):
"""List available Pools"""
pass
class DeleteFlavor(cli.DeleteFlavor): class DeleteFlavor(cli.DeleteFlavor):
"""Delete a flavor""" """Delete a flavor"""
pass pass
@ -339,6 +451,25 @@ class CreateSubscription(command.ShowOne):
return columns, utils.get_item_properties(data, columns) return columns, utils.get_item_properties(data, columns)
class OldCreateSubscription(CreateSubscription):
"""Create a subscription for queue"""
_description = _("Create a subscription for queue")
# TODO(wanghao): Remove this class and ``subscription create`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging subscription create" '
'instead.'))
return super(OldCreateSubscription, self).take_action(parsed_args)
class UpdateSubscription(command.ShowOne): class UpdateSubscription(command.ShowOne):
"""Update a subscription""" """Update a subscription"""
@ -390,6 +521,25 @@ class UpdateSubscription(command.ShowOne):
return columns, utils.get_item_properties(data, columns) return columns, utils.get_item_properties(data, columns)
class OldUpdateSubscription(UpdateSubscription):
"""Update a subscription"""
_description = _("Update a subscription")
# TODO(wanghao): Remove this class and ``subscription update`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging subscription update" '
'instead.'))
return super(OldUpdateSubscription, self).take_action(parsed_args)
class DeleteSubscription(command.Command): class DeleteSubscription(command.Command):
"""Delete a subscription""" """Delete a subscription"""
@ -416,6 +566,25 @@ class DeleteSubscription(command.Command):
auto_create=False).delete() auto_create=False).delete()
class OldDeleteSubscription(DeleteSubscription):
"""Delete a subscription"""
_description = _("Delete a subscription")
# TODO(wanghao): Remove this class and ``subscription delete`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging subscription delete" '
'instead.'))
return super(OldDeleteSubscription, self).take_action(parsed_args)
class ShowSubscription(command.ShowOne): class ShowSubscription(command.ShowOne):
"""Display subscription details""" """Display subscription details"""
@ -445,6 +614,25 @@ class ShowSubscription(command.ShowOne):
return columns, utils.get_dict_properties(pool_data.__dict__, columns) return columns, utils.get_dict_properties(pool_data.__dict__, columns)
class OldShowSubscription(ShowSubscription):
"""Display subscription details"""
_description = _("Display subscription details")
# TODO(wanghao): Remove this class and ``subscription show`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging subscription show" '
'instead.'))
return super(OldShowSubscription, self).take_action(parsed_args)
class ListSubscriptions(command.Lister): class ListSubscriptions(command.Lister):
"""List available subscriptions""" """List available subscriptions"""
@ -485,26 +673,65 @@ class ListSubscriptions(command.Lister):
(utils.get_item_properties(s, columns) for s in data)) (utils.get_item_properties(s, columns) for s in data))
class OldListSubscriptions(ListSubscriptions):
"""List available subscriptions"""
_description = _("List available subscriptions")
# TODO(wanghao): Remove this class and ``subscription list`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging subscription list" '
'instead.'))
return super(OldListSubscriptions, self).take_action(parsed_args)
class CreateClaim(cli.CreateClaim): class CreateClaim(cli.CreateClaim):
"""Create claim and return a list of claimed messages""" """Create claim and return a list of claimed messages"""
pass pass
class OldCreateClaim(cli.OldCreateClaim):
"""Create claim and return a list of claimed messages"""
pass
class QueryClaim(cli.QueryClaim): class QueryClaim(cli.QueryClaim):
"""Display claim details""" """Display claim details"""
pass pass
class OldQueryClaim(cli.OldQueryClaim):
"""Display claim details"""
pass
class RenewClaim(cli.RenewClaim): class RenewClaim(cli.RenewClaim):
"""Renew a claim""" """Renew a claim"""
pass pass
class OldRenewClaim(cli.OldRenewClaim):
"""Renew a claim"""
pass
class ReleaseClaim(cli.ReleaseClaim): class ReleaseClaim(cli.ReleaseClaim):
"""Delete a claim""" """Delete a claim"""
pass pass
class OldReleaseClaim(cli.OldReleaseClaim):
"""Delete a claim"""
pass
class CreateSignedUrl(command.ShowOne): class CreateSignedUrl(command.ShowOne):
"""Create a pre-signed url""" """Create a pre-signed url"""
@ -568,6 +795,25 @@ class CreateSignedUrl(command.ShowOne):
) )
class OldCreateSignedUrl(CreateSignedUrl):
"""Create a pre-signed url"""
_description = _("Create a pre-signed url")
# TODO(wanghao): Remove this class and ``queue signed url`` command
# after Queen.
# This notifies cliff to not display the help for this command
deprecated = True
log = logging.getLogger('deprecated')
def take_action(self, parsed_args):
self.log.warning(_('This command has been deprecated. '
'Please use "messaging queue signed url" '
'instead.'))
return super(OldCreateSignedUrl, self).take_action(parsed_args)
class Ping(command.ShowOne): class Ping(command.ShowOne):
"""Check if Zaqar server is alive or not""" """Check if Zaqar server is alive or not"""