diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-11-04 10:38:22 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-11-04 10:38:22 +0000 |
commit | 1919f56c9f8dc26b84dec08eeb76214fddbc07a9 (patch) | |
tree | 0731e8cea0a41308fbcf023e8cda3a67881ecc1a /saharaclient/osc/v1 | |
parent | f01832e4223b3f25c242ee05fccfbbf1c0d93d43 (diff) | |
parent | 30d7d7d79e41fae268e49e4e9aa1bdd78cee6ef6 (diff) | |
download | python-saharaclient-1919f56c9f8dc26b84dec08eeb76214fddbc07a9.tar.gz |
Merge "Fixing updates for CLI"
Diffstat (limited to 'saharaclient/osc/v1')
-rw-r--r-- | saharaclient/osc/v1/clusters.py | 1 | ||||
-rw-r--r-- | saharaclient/osc/v1/job_templates.py | 1 | ||||
-rw-r--r-- | saharaclient/osc/v1/node_group_templates.py | 18 |
3 files changed, 11 insertions, 9 deletions
diff --git a/saharaclient/osc/v1/clusters.py b/saharaclient/osc/v1/clusters.py index 5f819c1..76250a4 100644 --- a/saharaclient/osc/v1/clusters.py +++ b/saharaclient/osc/v1/clusters.py @@ -399,6 +399,7 @@ class UpdateCluster(show.ShowOne): help='Make the cluster unprotected', dest='is_protected' ) + parser.set_defaults(is_public=None, is_protected=None) return parser diff --git a/saharaclient/osc/v1/job_templates.py b/saharaclient/osc/v1/job_templates.py index 27eaec1..2ab21d6 100644 --- a/saharaclient/osc/v1/job_templates.py +++ b/saharaclient/osc/v1/job_templates.py @@ -298,6 +298,7 @@ class UpdateJobTemplate(show.ShowOne): help='Make the job template unprotected', dest='is_protected' ) + parser.set_defaults(is_public=None, is_protected=None) return parser diff --git a/saharaclient/osc/v1/node_group_templates.py b/saharaclient/osc/v1/node_group_templates.py index 0d8c85d..bf8fa7e 100644 --- a/saharaclient/osc/v1/node_group_templates.py +++ b/saharaclient/osc/v1/node_group_templates.py @@ -76,6 +76,11 @@ class CreateNodeGroupTemplate(show.ShowOne): "instance [REQUIRED if JSON is not provided]" ) parser.add_argument( + '--flavor', + metavar="<flavor-id>", + help="ID of the flavor [REQUIRED if JSON is not provided]" + ) + parser.add_argument( '--security-groups', metavar="<security-groups>", nargs="+", @@ -96,11 +101,6 @@ class CreateNodeGroupTemplate(show.ShowOne): "will be created" ) parser.add_argument( - '--flavor', - metavar="<flavor-id>", - help="ID of the flavor" - ) - parser.add_argument( '--floating-ip-pool', metavar="<floating-ip-pool>", help="ID of the floating IP pool" @@ -214,12 +214,12 @@ class CreateNodeGroupTemplate(show.ShowOne): data = client.node_group_templates.create(**template).to_dict() else: if (not parsed_args.name or not parsed_args.plugin or - not parsed_args.version or not parsed_args or + not parsed_args.version or not parsed_args.flavor or not parsed_args.processes): raise exceptions.CommandError( - 'At least --name, --plugin, --version, --processes ' - 'arguments should be specified or json template should ' - 'be provided with --json argument') + 'At least --name, --plugin, --version, --processes, ' + '--flavor arguments should be specified or json template ' + 'should be provided with --json argument') configs = None if parsed_args.configs: |