diff options
author | Stephen Finucane <sfinucan@redhat.com> | 2023-05-08 10:54:22 +0100 |
---|---|---|
committer | Stephen Finucane <sfinucan@redhat.com> | 2023-05-10 10:51:30 +0100 |
commit | 35ba1d8f1304d3255b96b704d524666ec5b6fea2 (patch) | |
tree | 6d4ab560d4086e8b1a1f935b8531d7e85550cc36 /openstackclient/volume/v3/block_storage_cleanup.py | |
parent | 28ffa2bf9f017212da5eb84b0cf74df62e2f5eb9 (diff) | |
download | python-openstackclient-35ba1d8f1304d3255b96b704d524666ec5b6fea2.tar.gz |
Blacken openstackclient.volume
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: Ic318617c67ab7ce6527f9016b759a1d4b0b80802
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'openstackclient/volume/v3/block_storage_cleanup.py')
-rw-r--r-- | openstackclient/volume/v3/block_storage_cleanup.py | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/openstackclient/volume/v3/block_storage_cleanup.py b/openstackclient/volume/v3/block_storage_cleanup.py index f99b8217..361440c9 100644 --- a/openstackclient/volume/v3/block_storage_cleanup.py +++ b/openstackclient/volume/v3/block_storage_cleanup.py @@ -31,8 +31,13 @@ def _format_cleanup_response(cleaning, unavailable): combined_data.append(details) for obj in unavailable: - details = (obj.id, obj.cluster_name, obj.host, obj.binary, - 'Unavailable') + details = ( + obj.id, + obj.cluster_name, + obj.host, + obj.binary, + 'Unavailable', + ) combined_data.append(details) return (column_headers, combined_data) @@ -49,20 +54,22 @@ class BlockStorageCleanup(command.Lister): parser.add_argument( '--cluster', metavar='<cluster>', - help=_('Name of block storage cluster in which cleanup needs ' - 'to be performed (name only)') + help=_( + 'Name of block storage cluster in which cleanup needs ' + 'to be performed (name only)' + ), ) parser.add_argument( "--host", metavar="<host>", default=None, - help=_("Host where the service resides. (name only)") + help=_("Host where the service resides. (name only)"), ) parser.add_argument( '--binary', metavar='<binary>', default=None, - help=_("Name of the service binary.") + help=_("Name of the service binary."), ) service_up_parser = parser.add_mutually_exclusive_group() service_up_parser.add_argument( @@ -72,7 +79,7 @@ class BlockStorageCleanup(command.Lister): default=None, help=_( 'Filter by up status. If this is set, services need to be up.' - ) + ), ) service_up_parser.add_argument( '--down', @@ -81,7 +88,7 @@ class BlockStorageCleanup(command.Lister): help=_( 'Filter by down status. If this is set, services need to be ' 'down.' - ) + ), ) service_disabled_parser = parser.add_mutually_exclusive_group() service_disabled_parser.add_argument( @@ -89,25 +96,25 @@ class BlockStorageCleanup(command.Lister): dest='disabled', action='store_true', default=None, - help=_('Filter by disabled status.') + help=_('Filter by disabled status.'), ) service_disabled_parser.add_argument( '--enabled', dest='disabled', action='store_false', - help=_('Filter by enabled status.') + help=_('Filter by enabled status.'), ) parser.add_argument( '--resource-id', metavar='<resource-id>', default=None, - help=_('UUID of a resource to cleanup.') + help=_('UUID of a resource to cleanup.'), ) parser.add_argument( '--resource-type', metavar='<Volume|Snapshot>', choices=('Volume', 'Snapshot'), - help=_('Type of resource to cleanup.') + help=_('Type of resource to cleanup.'), ) parser.add_argument( '--service-id', @@ -116,7 +123,7 @@ class BlockStorageCleanup(command.Lister): help=_( 'The service ID field from the DB, not the UUID of the ' 'service.' - ) + ), ) return parser @@ -138,7 +145,7 @@ class BlockStorageCleanup(command.Lister): 'disabled': parsed_args.disabled, 'resource_id': parsed_args.resource_id, 'resource_type': parsed_args.resource_type, - 'service_id': parsed_args.service_id + 'service_id': parsed_args.service_id, } filters = {k: v for k, v in filters.items() if v is not None} |