summaryrefslogtreecommitdiff
path: root/openstackclient/volume/v3/volume_attachment.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_attachment.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_attachment.py')
-rw-r--r--openstackclient/volume/v3/volume_attachment.py34
1 files changed, 18 insertions, 16 deletions
diff --git a/openstackclient/volume/v3/volume_attachment.py b/openstackclient/volume/v3/volume_attachment.py
index 57a6da73..652fdf63 100644
--- a/openstackclient/volume/v3/volume_attachment.py
+++ b/openstackclient/volume/v3/volume_attachment.py
@@ -199,15 +199,17 @@ class CreateVolumeAttachment(command.ShowOne):
'mountpoint': parsed_args.mountpoint,
}
else:
- if any({
- parsed_args.initiator,
- parsed_args.ip,
- parsed_args.platform,
- parsed_args.host,
- parsed_args.host,
- parsed_args.multipath,
- parsed_args.mountpoint,
- }):
+ if any(
+ {
+ parsed_args.initiator,
+ parsed_args.ip,
+ parsed_args.platform,
+ parsed_args.host,
+ parsed_args.host,
+ parsed_args.multipath,
+ parsed_args.mountpoint,
+ }
+ ):
msg = _(
'You must specify the --connect option for any of the '
'connection-specific options such as --initiator to be '
@@ -225,7 +227,8 @@ class CreateVolumeAttachment(command.ShowOne):
)
attachment = volume_client.attachments.create(
- volume.id, connector, server.id, parsed_args.mode)
+ volume.id, connector, server.id, parsed_args.mode
+ )
return _format_attachment(attachment)
@@ -346,7 +349,8 @@ class SetVolumeAttachment(command.ShowOne):
}
attachment = volume_client.attachments.update(
- parsed_args.attachment, connector)
+ parsed_args.attachment, connector
+ )
return _format_attachment(attachment)
@@ -469,7 +473,8 @@ class ListVolumeAttachment(command.Lister):
attachments = volume_client.attachments.list(
search_opts=search_opts,
marker=parsed_args.marker,
- limit=parsed_args.limit)
+ limit=parsed_args.limit,
+ )
column_headers = (
'ID',
@@ -486,10 +491,7 @@ class ListVolumeAttachment(command.Lister):
return (
column_headers,
- (
- utils.get_item_properties(a, columns)
- for a in attachments
- ),
+ (utils.get_item_properties(a, columns) for a in attachments),
)