summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2015-03-19 11:46:05 -0500
committerDean Troyer <dtroyer@gmail.com>2015-04-22 18:37:31 -0500
commit11c39530f5f97a14d534c8d5b7160a1e74f6cdf8 (patch)
tree8936ca64e1c7909c6c5619963f5e0dd1c1fc9b8e /openstackclient/compute/v2
parent856f641582a1e04a4780f654904ca09faa4b8981 (diff)
downloadpython-openstackclient-11c39530f5f97a14d534c8d5b7160a1e74f6cdf8.tar.gz
Fix security group create description bug
--description is optional in our CLI but the server requires it to be non-empty. Set a default value of the given name. Closes-Bug: #1434172 Change-Id: I81507a77ad8d815000ff411784ae71e229c77f78
Diffstat (limited to 'openstackclient/compute/v2')
-rw-r--r--openstackclient/compute/v2/security_group.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/openstackclient/compute/v2/security_group.py b/openstackclient/compute/v2/security_group.py
index d4643438..21519add 100644
--- a/openstackclient/compute/v2/security_group.py
+++ b/openstackclient/compute/v2/security_group.py
@@ -81,9 +81,11 @@ class CreateSecurityGroup(show.ShowOne):
compute_client = self.app.client_manager.compute
+ description = parsed_args.description or parsed_args.name
+
data = compute_client.security_groups.create(
parsed_args.name,
- parsed_args.description,
+ description,
)
info = {}