summaryrefslogtreecommitdiff
path: root/openstackclient/volume/v2
diff options
context:
space:
mode:
authorHuanxuan Ao <huanxuan.ao@easystack.cn>2017-03-08 10:01:16 +0800
committerDean Troyer <dtroyer@gmail.com>2017-04-26 11:07:08 -0500
commit1c49a1f01da73b8eed701809de88b408e738dfed (patch)
treedecfdfb36d616d70d40e98b534ff93ea5390aecc /openstackclient/volume/v2
parentbf1f47c1be5bf9f6b25eab21eb06c3b0473bf34f (diff)
downloadpython-openstackclient-1c49a1f01da73b8eed701809de88b408e738dfed.tar.gz
Fix NoneType error for volume snapshot create command
In volume snapshot command, <volume> is the same as <snapshot-name> when --volume is not specified, but <volume> cannot be None, so when <snapshot-name> is not specified (<snapshot-name> is None), a NoneType error appears. So make <snapshot-name> no longer optional, it should be always present. Change-Id: I3d9f10753a8ef601e70816421c160598e2cc811f Closes-bug: #1659894
Diffstat (limited to 'openstackclient/volume/v2')
-rw-r--r--openstackclient/volume/v2/volume_snapshot.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/openstackclient/volume/v2/volume_snapshot.py b/openstackclient/volume/v2/volume_snapshot.py
index 804c8291..fe969410 100644
--- a/openstackclient/volume/v2/volume_snapshot.py
+++ b/openstackclient/volume/v2/volume_snapshot.py
@@ -38,8 +38,7 @@ class CreateVolumeSnapshot(command.ShowOne):
parser.add_argument(
"snapshot_name",
metavar="<snapshot-name>",
- nargs="?",
- help=_("Name of the new snapshot (default to None)")
+ help=_("Name of the new snapshot"),
)
parser.add_argument(
"--volume",