From 11c39530f5f97a14d534c8d5b7160a1e74f6cdf8 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Thu, 19 Mar 2015 11:46:05 -0500 Subject: 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 --- openstackclient/compute/v2/security_group.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'openstackclient/compute') 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 = {} -- cgit v1.2.1