diff --git a/magnumclient/tests/v1/test_clustertemplates_shell.py b/magnumclient/tests/v1/test_clustertemplates_shell.py index 9e769c6..eaaba06 100644 --- a/magnumclient/tests/v1/test_clustertemplates_shell.py +++ b/magnumclient/tests/v1/test_clustertemplates_shell.py @@ -57,7 +57,8 @@ class ShellTest(shell_test_base.TestCommandLineArgument): tls_disabled=False, public=False, master_lb_enabled=False, server_type='vm', floating_ip_enabled=True, - registry_enabled=False): + registry_enabled=False, + insecure_registry=None): expected_args = {} expected_args['image_id'] = image_id @@ -84,6 +85,7 @@ class ShellTest(shell_test_base.TestCommandLineArgument): expected_args['server_type'] = server_type expected_args['floating_ip_enabled'] = floating_ip_enabled expected_args['registry_enabled'] = registry_enabled + expected_args['insecure_registry'] = insecure_registry return expected_args diff --git a/magnumclient/v1/cluster_templates.py b/magnumclient/v1/cluster_templates.py index 4b2ab6e..c0e921d 100644 --- a/magnumclient/v1/cluster_templates.py +++ b/magnumclient/v1/cluster_templates.py @@ -14,6 +14,7 @@ from magnumclient.v1 import basemodels CREATION_ATTRIBUTES = basemodels.CREATION_ATTRIBUTES +CREATION_ATTRIBUTES.append('insecure_registry') class ClusterTemplate(basemodels.BaseModel): diff --git a/magnumclient/v1/cluster_templates_shell.py b/magnumclient/v1/cluster_templates_shell.py index 6793ed1..7e602ef 100644 --- a/magnumclient/v1/cluster_templates_shell.py +++ b/magnumclient/v1/cluster_templates_shell.py @@ -174,6 +174,9 @@ def _show_cluster_template(cluster_template): action='store_true', default=True, help=_('Indicates whether created Clusters should have a ' 'floating ip or not.')) +@utils.arg('--insecure-registry', + metavar='', + help='url of docker registry') def do_cluster_template_create(cs, args): """Create a cluster template.""" args.command = 'cluster-template-create' @@ -205,6 +208,7 @@ def do_cluster_template_create(cs, args): opts['server_type'] = args.server_type opts['master_lb_enabled'] = args.master_lb_enabled opts['floating_ip_enabled'] = args.floating_ip_enabled + opts['insecure_registry'] = args.insecure_registry cluster_template = cs.cluster_templates.create(**opts) _show_cluster_template(cluster_template)