# Path: magnumclient/exceptions.py
# class InvalidAttribute(exceptions.ClientException):
#     pass
# 
# Path: magnumclient/osc/v1/cluster_templates.py
# CLUSTER_TEMPLATE_ATTRIBUTES = [
#     'insecure_registry',
#     'labels',
#     'updated_at',
#     'floating_ip_enabled',
#     'fixed_subnet',
#     'master_flavor_id',
#     'uuid',
#     'no_proxy',
#     'https_proxy',
#     'tls_disabled',
#     'keypair_id',
#     'public',
#     'http_proxy',
#     'docker_volume_size',
#     'server_type',
#     'external_network_id',
#     'cluster_distro',
#     'image_id',
#     'volume_driver',
#     'registry_enabled',
#     'docker_storage_driver',
#     'apiserver_port',
#     'name',
#     'created_at',
#     'network_driver',
#     'fixed_network',
#     'coe',
#     'flavor_id',
#     'master_lb_enabled',
#     'dns_nameserver',
#     'hidden',
#     'tags',
# ]
# def _show_cluster_template(cluster_template):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
# class CreateClusterTemplate(command.ShowOne):
# class DeleteClusterTemplate(command.Command):
# class ListTemplateCluster(command.Lister):
# class ShowClusterTemplate(command.ShowOne):
# class UpdateClusterTemplate(command.ShowOne):
# 
# Path: magnumclient/tests/osc/unit/v1/fakes.py
# class FakeBaseModel(object):
# class FakeBaseModelManager(object):
# class FakeStatsModelManager(object):
# class FakeQuotasModelManager(object):
# class FakeNodeGroupManager(object):
# class FakeCertificatesModelManager(FakeBaseModelManager):
# class MagnumFakeContainerInfra(object):
# class MagnumFakeClientManager(osc_fakes.FakeClientManager):
# class MagnumParseException(Exception):
# class TestMagnumClientOSCV1(osc_utils.TestCase):
# class FakeClusterTemplate(object):
# class FakeCluster(object):
# class FakeCert(object):
# class FakeQuota(object):
# class FakeNodeGroup(object):
#     def __repr__(self):
#     def list(self, limit=None, marker=None, sort_key=None,
#              sort_dir=None, detail=False):
#     def get(self, id):
#     def create(self, **kwargs):
#     def delete(self, id):
#     def update(self, id, patch):
#     def rotate_ca(self, **kwargs):
#     def list(self, **kwargs):
#     def get(self, id, resource):
#     def create(self, **kwargs):
#     def delete(self, id):
#     def list(self, cluster_id, limit=None, marker=None, sort_key=None,
#              sort_dir=None, detail=False):
#     def get(self, cluster_id, id):
#     def create(self, cluster_id, **kwargs):
#     def delete(self, cluster_id, id):
#     def update(self, cluster_id, id, patch):
#     def get(self, cluster_uuid):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self, message=None, details=None):
#     def __str__(self):
#     def setUp(self):
#     def check_parser(self, cmd, args, verify_args):
#     def create_one_cluster_template(attrs=None):
#     def create_cluster_templates(attrs=None, count=2):
#     def create_one_cluster(attrs=None):
#     def __init__(self, pem):
#     def create_one_quota(attrs=None):
#     def create_one_nodegroup(attrs=None):


import copy
from unittest import mock
from unittest.mock import call
from magnumclient.exceptions import InvalidAttribute
from magnumclient.osc.v1 import cluster_templates as osc_ct
from magnumclient.tests.osc.unit.v1 import fakes as magnum_fakes
from osc_lib import exceptions as osc_exceptions
            ('coe', self.new_ct.coe),
            ('external_network', self.new_ct.external_network_id),
            ('image', self.new_ct.image_id),
            ('name', self.new_ct.name)
        ]
        parsed_args = self.check_parser(self.cmd, arglist, verifylist)
        self.cmd.take_action(parsed_args)
        self.cluster_templates_mock.create.assert_called_with(
            **self.default_create_args)

    def test_cluster_template_create_missing_required_arg(self):
        """Verifies missing required arguments."""

        arglist = [
            '--external-network', self.new_ct.external_network_id,
            '--image', self.new_ct.image_id
        ]
        verifylist = [
            ('external_network', self.new_ct.external_network_id),
            ('image', self.new_ct.image_id)
        ]
        self.assertRaises(magnum_fakes.MagnumParseException,
                          self.check_parser, self.cmd, arglist, verifylist)
        # Verify all required args are checked and not just coe
        arglist.append('--coe')
        arglist.append(self.new_ct.coe)
        verifylist.append(('coe', self.new_ct.coe))
        arglist.remove('--image')
        arglist.remove(self.new_ct.image_id)
        verifylist.remove(('image', self.new_ct.image_id))

# Path: magnumclient/exceptions.py
# class InvalidAttribute(exceptions.ClientException):
#     pass
# 
# Path: magnumclient/osc/v1/cluster_templates.py
# CLUSTER_TEMPLATE_ATTRIBUTES = [
#     'insecure_registry',
#     'labels',
#     'updated_at',
#     'floating_ip_enabled',
#     'fixed_subnet',
#     'master_flavor_id',
#     'uuid',
#     'no_proxy',
#     'https_proxy',
#     'tls_disabled',
#     'keypair_id',
#     'public',
#     'http_proxy',
#     'docker_volume_size',
#     'server_type',
#     'external_network_id',
#     'cluster_distro',
#     'image_id',
#     'volume_driver',
#     'registry_enabled',
#     'docker_storage_driver',
#     'apiserver_port',
#     'name',
#     'created_at',
#     'network_driver',
#     'fixed_network',
#     'coe',
#     'flavor_id',
#     'master_lb_enabled',
#     'dns_nameserver',
#     'hidden',
#     'tags',
# ]
# def _show_cluster_template(cluster_template):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
# class CreateClusterTemplate(command.ShowOne):
# class DeleteClusterTemplate(command.Command):
# class ListTemplateCluster(command.Lister):
# class ShowClusterTemplate(command.ShowOne):
# class UpdateClusterTemplate(command.ShowOne):
# 
# Path: magnumclient/tests/osc/unit/v1/fakes.py
# class FakeBaseModel(object):
# class FakeBaseModelManager(object):
# class FakeStatsModelManager(object):
# class FakeQuotasModelManager(object):
# class FakeNodeGroupManager(object):
# class FakeCertificatesModelManager(FakeBaseModelManager):
# class MagnumFakeContainerInfra(object):
# class MagnumFakeClientManager(osc_fakes.FakeClientManager):
# class MagnumParseException(Exception):
# class TestMagnumClientOSCV1(osc_utils.TestCase):
# class FakeClusterTemplate(object):
# class FakeCluster(object):
# class FakeCert(object):
# class FakeQuota(object):
# class FakeNodeGroup(object):
#     def __repr__(self):
#     def list(self, limit=None, marker=None, sort_key=None,
#              sort_dir=None, detail=False):
#     def get(self, id):
#     def create(self, **kwargs):
#     def delete(self, id):
#     def update(self, id, patch):
#     def rotate_ca(self, **kwargs):
#     def list(self, **kwargs):
#     def get(self, id, resource):
#     def create(self, **kwargs):
#     def delete(self, id):
#     def list(self, cluster_id, limit=None, marker=None, sort_key=None,
#              sort_dir=None, detail=False):
#     def get(self, cluster_id, id):
#     def create(self, cluster_id, **kwargs):
#     def delete(self, cluster_id, id):
#     def update(self, cluster_id, id, patch):
#     def get(self, cluster_uuid):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self, message=None, details=None):
#     def __str__(self):
#     def setUp(self):
#     def check_parser(self, cmd, args, verify_args):
#     def create_one_cluster_template(attrs=None):
#     def create_cluster_templates(attrs=None, count=2):
#     def create_one_cluster(attrs=None):
#     def __init__(self, pem):
#     def create_one_quota(attrs=None):
#     def create_one_nodegroup(attrs=None):


# Path: magnumclient/tests/osc/unit/v1/test_cluster_templates.py
import copy
from unittest import mock
from unittest.mock import call
from magnumclient.exceptions import InvalidAttribute
from magnumclient.osc.v1 import cluster_templates as osc_ct
from magnumclient.tests.osc.unit.v1 import fakes as magnum_fakes
from osc_lib import exceptions as osc_exceptions

            ('coe', self.new_ct.coe),
            ('external_network', self.new_ct.external_network_id),
            ('image', self.new_ct.image_id),
            ('name', self.new_ct.name)
        ]
        parsed_args = self.check_parser(self.cmd, arglist, verifylist)
        self.cmd.take_action(parsed_args)
        self.cluster_templates_mock.create.assert_called_with(
            **self.default_create_args)

    def test_cluster_template_create_missing_required_arg(self):
        """Verifies missing required arguments."""

        arglist = [
            '--external-network', self.new_ct.external_network_id,
            '--image', self.new_ct.image_id
        ]
        verifylist = [
            ('external_network', self.new_ct.external_network_id),
            ('image', self.new_ct.image_id)
        ]
        self.assertRaises(magnum_fakes.MagnumParseException,
                          self.check_parser, self.cmd, arglist, verifylist)
        # Verify all required args are checked and not just coe
        arglist.append('--coe')
        arglist.append(self.new_ct.coe)
        verifylist.append(('coe', self.new_ct.coe))
        arglist.remove('--image')
        arglist.remove(self.new_ct.image_id)
        verifylist.remove(('image', self.new_ct.image_id))

        self.assertRaises(magnum_fakes.MagnumParseException,