# Path: magnumclient/common/cliutils.py
# DEPRECATION_BASE = ('%sThe --%s parameter is deprecated and '
#                     'will be removed in a future release. Use the '
#                     '<%s> positional parameter %s.')
# NAME_DEPRECATION_HELP = DEPRECATION_BASE % ('', 'name', 'name', 'instead')
# NAME_DEPRECATION_WARNING = DEPRECATION_BASE % (
#     'WARNING: ', 'name', 'name', 'to avoid seeing this message')
# CLUSTER_DEPRECATION_HELP = DEPRECATION_BASE % ('', 'cluster', 'cluster',
#                                                'instead')
# CLUSTER_DEPRECATION_WARNING = DEPRECATION_BASE % (
#     'WARNING: ', 'cluster', 'cluster', 'to avoid seeing this message')
# MAGNUM_CLIENT_DEPRECATION_WARNING = (
#     'WARNING: The magnum client is deprecated and will be removed in a future '
#     'release.\nUse the OpenStack client to avoid seeing this message.')
# def deprecation_message(preamble, new_name):
#     def __init__(self, missing):
#     def __init__(self, param, dupes):
# def validate_args(fn, *args, **kwargs):
#     def isbound(method):
# def validate_name_args(positional_name, optional_name):
# def validate_cluster_args(positional_cluster, optional_cluster):
# def deprecated(message):
#     def wrapper(func, *args, **kwargs):
# def deprecation_map(dep_map):
#     def _decorator(func):
# def arg(*args, **kwargs):
#     def _decorator(func):
# def env(*args, **kwargs):
# def add_arg(func, *args, **kwargs):
# def unauthenticated(func):
# def isunauthenticated(func):
# def print_list(objs, fields, formatters=None, sortby_index=0,
#                mixed_case_fields=None, field_labels=None):
# def keys_and_vals_to_strs(dictionary):
#     def to_str(k_or_v):
# def print_dict(dct, dict_property="Property", wrap=0):
# def get_password(max_password_prompts=3):
# def service_type(stype):
#     def inner(f):
# def get_service_type(f):
# def pretty_choice_list(lst):
# def exit(msg=''):
# def _format_field_name(attr):
# def make_field_formatter(attr, filters=None):
#     def get_field(obj):
# def _get_list_table_columns_and_formatters(fields, objs, exclude_fields=(),
#                                            filters=None):
# class MissingArgs(Exception):
# class DuplicateArgs(Exception):
# 
# Path: magnumclient/common/utils.py
# def common_filters(marker=None, limit=None, sort_key=None, sort_dir=None):
# def split_and_deserialize(string):
# def args_array_to_patch(op, attributes):
# def handle_labels(labels):
# def format_labels(lbls, parse_comma=True):
# def print_list_field(field):
# def handle_json_from_file(json_arg):
# def config_cluster(cluster, cluster_template, cfg_dir, force=False,
#                    certs=None, use_keystone=False):
# def _config_cluster_kubernetes(cluster, cluster_template, cfg_dir,
#                                force=False, certs=None, use_keystone=False):
# def _config_cluster_swarm(cluster, cluster_template, cfg_dir,
#                           force=False, certs=None):
# def generate_csr_and_key():
# 
# Path: magnumclient/exceptions.py
# class InvalidAttribute(exceptions.ClientException):
#     pass
# 
# Path: magnumclient/i18n.py

# 
# Path: magnumclient/v1/basemodels.py
# CREATION_ATTRIBUTES = ['name', 'image_id', 'flavor_id', 'master_flavor_id',
#                        'keypair_id', 'external_network_id', 'fixed_network',
#                        'fixed_subnet', 'dns_nameserver', 'docker_volume_size',
#                        'labels', 'coe', 'http_proxy', 'https_proxy',
#                        'no_proxy', 'network_driver', 'tls_disabled', 'public',
#                        'registry_enabled', 'volume_driver', 'server_type',
#                        'docker_storage_driver', 'master_lb_enabled',
#                        'floating_ip_enabled', 'hidden', 'tags']
# OUTPUT_ATTRIBUTES = CREATION_ATTRIBUTES + ['apiserver_port', 'created_at',
#                                            'insecure_registry', 'links',
#                                            'updated_at', 'cluster_distro',
#                                            'uuid']
# class BaseModel(base.Resource):
# class BaseModelManager(base.Manager):
#     def __repr__(self):
#     def _path(cls, id=None):
#     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):


from magnumclient.common import cliutils as utils
from magnumclient.common import utils as magnum_utils
from magnumclient.exceptions import InvalidAttribute
from magnumclient.i18n import _
from magnumclient.v1 import basemodels
           help=_('Show detailed information about the baymodels.')
           )
@utils.deprecated(DEPRECATION_MESSAGE)
def do_baymodel_list(cs, args):
    """Print a list of baymodels.

    (Deprecated in favor of cluster-template-list.)
    """
    nodes = cs.baymodels.list(limit=args.limit,
                              sort_key=args.sort_key,
                              sort_dir=args.sort_dir,
                              detail=args.detail)
    if args.detail:
        columns = basemodels.OUTPUT_ATTRIBUTES
    else:
        columns = ['uuid', 'name']
    columns += utils._get_list_table_columns_and_formatters(
        args.fields, nodes,
        exclude_fields=(c.lower() for c in columns))[0]
    utils.print_list(nodes, columns,
                     {'versions': magnum_utils.print_list_field('versions')},
                     sortby_index=None)


@utils.arg('baymodel', metavar='<baymodel>',
           help=_("UUID or name of baymodel"))
@utils.arg(
    'op',
    metavar='<op>',
    choices=['add', 'replace', 'remove'],

# Path: magnumclient/common/cliutils.py
# DEPRECATION_BASE = ('%sThe --%s parameter is deprecated and '
#                     'will be removed in a future release. Use the '
#                     '<%s> positional parameter %s.')
# NAME_DEPRECATION_HELP = DEPRECATION_BASE % ('', 'name', 'name', 'instead')
# NAME_DEPRECATION_WARNING = DEPRECATION_BASE % (
#     'WARNING: ', 'name', 'name', 'to avoid seeing this message')
# CLUSTER_DEPRECATION_HELP = DEPRECATION_BASE % ('', 'cluster', 'cluster',
#                                                'instead')
# CLUSTER_DEPRECATION_WARNING = DEPRECATION_BASE % (
#     'WARNING: ', 'cluster', 'cluster', 'to avoid seeing this message')
# MAGNUM_CLIENT_DEPRECATION_WARNING = (
#     'WARNING: The magnum client is deprecated and will be removed in a future '
#     'release.\nUse the OpenStack client to avoid seeing this message.')
# def deprecation_message(preamble, new_name):
#     def __init__(self, missing):
#     def __init__(self, param, dupes):
# def validate_args(fn, *args, **kwargs):
#     def isbound(method):
# def validate_name_args(positional_name, optional_name):
# def validate_cluster_args(positional_cluster, optional_cluster):
# def deprecated(message):
#     def wrapper(func, *args, **kwargs):
# def deprecation_map(dep_map):
#     def _decorator(func):
# def arg(*args, **kwargs):
#     def _decorator(func):
# def env(*args, **kwargs):
# def add_arg(func, *args, **kwargs):
# def unauthenticated(func):
# def isunauthenticated(func):
# def print_list(objs, fields, formatters=None, sortby_index=0,
#                mixed_case_fields=None, field_labels=None):
# def keys_and_vals_to_strs(dictionary):
#     def to_str(k_or_v):
# def print_dict(dct, dict_property="Property", wrap=0):
# def get_password(max_password_prompts=3):
# def service_type(stype):
#     def inner(f):
# def get_service_type(f):
# def pretty_choice_list(lst):
# def exit(msg=''):
# def _format_field_name(attr):
# def make_field_formatter(attr, filters=None):
#     def get_field(obj):
# def _get_list_table_columns_and_formatters(fields, objs, exclude_fields=(),
#                                            filters=None):
# class MissingArgs(Exception):
# class DuplicateArgs(Exception):
# 
# Path: magnumclient/common/utils.py
# def common_filters(marker=None, limit=None, sort_key=None, sort_dir=None):
# def split_and_deserialize(string):
# def args_array_to_patch(op, attributes):
# def handle_labels(labels):
# def format_labels(lbls, parse_comma=True):
# def print_list_field(field):
# def handle_json_from_file(json_arg):
# def config_cluster(cluster, cluster_template, cfg_dir, force=False,
#                    certs=None, use_keystone=False):
# def _config_cluster_kubernetes(cluster, cluster_template, cfg_dir,
#                                force=False, certs=None, use_keystone=False):
# def _config_cluster_swarm(cluster, cluster_template, cfg_dir,
#                           force=False, certs=None):
# def generate_csr_and_key():
# 
# Path: magnumclient/exceptions.py
# class InvalidAttribute(exceptions.ClientException):
#     pass
# 
# Path: magnumclient/i18n.py

# 
# Path: magnumclient/v1/basemodels.py
# CREATION_ATTRIBUTES = ['name', 'image_id', 'flavor_id', 'master_flavor_id',
#                        'keypair_id', 'external_network_id', 'fixed_network',
#                        'fixed_subnet', 'dns_nameserver', 'docker_volume_size',
#                        'labels', 'coe', 'http_proxy', 'https_proxy',
#                        'no_proxy', 'network_driver', 'tls_disabled', 'public',
#                        'registry_enabled', 'volume_driver', 'server_type',
#                        'docker_storage_driver', 'master_lb_enabled',
#                        'floating_ip_enabled', 'hidden', 'tags']
# OUTPUT_ATTRIBUTES = CREATION_ATTRIBUTES + ['apiserver_port', 'created_at',
#                                            'insecure_registry', 'links',
#                                            'updated_at', 'cluster_distro',
#                                            'uuid']
# class BaseModel(base.Resource):
# class BaseModelManager(base.Manager):
#     def __repr__(self):
#     def _path(cls, id=None):
#     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):


# Path: magnumclient/v1/baymodels_shell.py
from magnumclient.common import cliutils as utils
from magnumclient.common import utils as magnum_utils
from magnumclient.exceptions import InvalidAttribute
from magnumclient.i18n import _
from magnumclient.v1 import basemodels

           help=_('Show detailed information about the baymodels.')
           )
@utils.deprecated(DEPRECATION_MESSAGE)
def do_baymodel_list(cs, args):
    """Print a list of baymodels.

    (Deprecated in favor of cluster-template-list.)
    """
    nodes = cs.baymodels.list(limit=args.limit,
                              sort_key=args.sort_key,
                              sort_dir=args.sort_dir,
                              detail=args.detail)
    if args.detail:
        columns = basemodels.OUTPUT_ATTRIBUTES
    else:
        columns = ['uuid', 'name']
    columns += utils._get_list_table_columns_and_formatters(
        args.fields, nodes,
        exclude_fields=(c.lower() for c in columns))[0]
    utils.print_list(nodes, columns,
                     {'versions': magnum_utils.print_list_field('versions')},
                     sortby_index=None)


@utils.arg('baymodel', metavar='<baymodel>',
           help=_("UUID or name of baymodel"))
@utils.arg(
    'op',
    metavar='<op>',
    choices=['add', 'replace', 'remove'],

    help=_("Operations: 'add', 'replace' or 'remove'"))