summaryrefslogtreecommitdiff
path: root/openstackclient/volume/v3/volume.py
diff options
context:
space:
mode:
authorStephen Finucane <sfinucan@redhat.com>2023-05-08 10:54:22 +0100
committerStephen Finucane <sfinucan@redhat.com>2023-05-10 10:51:30 +0100
commit35ba1d8f1304d3255b96b704d524666ec5b6fea2 (patch)
tree6d4ab560d4086e8b1a1f935b8531d7e85550cc36 /openstackclient/volume/v3/volume.py
parent28ffa2bf9f017212da5eb84b0cf74df62e2f5eb9 (diff)
downloadpython-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/volume.py')
-rw-r--r--openstackclient/volume/v3/volume.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/openstackclient/volume/v3/volume.py b/openstackclient/volume/v3/volume.py
index 4b159688..f02053f0 100644
--- a/openstackclient/volume/v3/volume.py
+++ b/openstackclient/volume/v3/volume.py
@@ -42,7 +42,6 @@ class VolumeSummary(command.ShowOne):
return parser
def take_action(self, parsed_args):
-
volume_client = self.app.client_manager.volume
if volume_client.api_version < api_versions.APIVersion('3.12'):
@@ -89,13 +88,14 @@ class VolumeRevertToSnapshot(command.Command):
parser.add_argument(
'snapshot',
metavar="<snapshot>",
- help=_('Name or ID of the snapshot to restore. The snapshot must '
- 'be the most recent one known to cinder.'),
+ help=_(
+ 'Name or ID of the snapshot to restore. The snapshot must '
+ 'be the most recent one known to cinder.'
+ ),
)
return parser
def take_action(self, parsed_args):
-
volume_client = self.app.client_manager.volume
if volume_client.api_version < api_versions.APIVersion('3.40'):
@@ -106,9 +106,10 @@ class VolumeRevertToSnapshot(command.Command):
raise exceptions.CommandError(msg)
snapshot = utils.find_resource(
- volume_client.volume_snapshots, parsed_args.snapshot)
- volume = utils.find_resource(
- volume_client.volumes, snapshot.volume_id)
+ volume_client.volume_snapshots, parsed_args.snapshot
+ )
+ volume = utils.find_resource(volume_client.volumes, snapshot.volume_id)
volume_client.volumes.revert_to_snapshot(
- volume=volume, snapshot=snapshot)
+ volume=volume, snapshot=snapshot
+ )