Don't set a default for docker_volume_size

When creating clusters, we should only pass the docker_volume_size
parameter to the magnum API if it was specified by the user. If not,
omitting it allows the API to set a default based on the cluster
template.

Change-Id: I510ff10d708a237be0cb88d3ff7094d7c81f5875
Closes-Bug: #1702314
Related-Bug: #1635244
This commit is contained in:
Mark Goddard 2017-07-04 16:32:19 +01:00
parent babbdb7083
commit 899e6c2303
2 changed files with 4 additions and 3 deletions

View File

@ -67,7 +67,8 @@ class ShellTest(shell_test_base.TestCommandLineArgument):
expected_args['create_timeout'] = create_timeout
expected_args['discovery_url'] = discovery_url
expected_args['keypair'] = keypair
expected_args['docker_volume_size'] = docker_volume_size
if docker_volume_size is not None:
expected_args['docker_volume_size'] = docker_volume_size
return expected_args

View File

@ -112,7 +112,6 @@ def do_cluster_list(cs, args):
@utils.arg('--docker-volume-size',
metavar='<docker-volume-size>',
type=int,
default=None,
help=_('The size in GB for the docker volume to use'))
@utils.arg('--node-count',
metavar='<node-count>',
@ -144,7 +143,8 @@ def do_cluster_create(cs, args):
opts['name'] = args.positional_name or args.name
opts['cluster_template_id'] = cluster_template.uuid
opts['keypair'] = args.keypair
opts['docker_volume_size'] = args.docker_volume_size
if args.docker_volume_size is not None:
opts['docker_volume_size'] = args.docker_volume_size
opts['node_count'] = args.node_count
opts['master_count'] = args.master_count
opts['discovery_url'] = args.discovery_url