# 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/i18n.py



from magnumclient.common import utils as magnum_utils
from magnumclient.i18n import _
from osc_lib.command import command
from osc_lib import utils
            help=_('The name or UUID of the base image to customize for the '
                   'NodeGroup.'))
        parser.add_argument(
            '--flavor',
            metavar='<flavor>',
            help=_('The nova flavor name or UUID to use when launching the '
                   'nodes in this NodeGroup.'))
        parser.add_argument(
            '--merge-labels',
            dest='merge_labels',
            action='store_true',
            default=False,
            help=_('The labels provided will be merged with the labels '
                   'configured in the specified cluster.'))

        return parser

    def take_action(self, parsed_args):
        self.log.debug("take_action(%s)", parsed_args)

        mag_client = self.app.client_manager.container_infra
        args = {
            'name': parsed_args.name,
            'node_count': parsed_args.node_count,
            'max_node_count': parsed_args.max_node_count,
            'min_node_count': parsed_args.min_node_count,
            'role': parsed_args.role,
        }

        if parsed_args.labels is not None:

# 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/i18n.py



# Path: magnumclient/osc/v1/nodegroups.py
from magnumclient.common import utils as magnum_utils
from magnumclient.i18n import _
from osc_lib.command import command
from osc_lib import utils

            help=_('The name or UUID of the base image to customize for the '
                   'NodeGroup.'))
        parser.add_argument(
            '--flavor',
            metavar='<flavor>',
            help=_('The nova flavor name or UUID to use when launching the '
                   'nodes in this NodeGroup.'))
        parser.add_argument(
            '--merge-labels',
            dest='merge_labels',
            action='store_true',
            default=False,
            help=_('The labels provided will be merged with the labels '
                   'configured in the specified cluster.'))

        return parser

    def take_action(self, parsed_args):
        self.log.debug("take_action(%s)", parsed_args)

        mag_client = self.app.client_manager.container_infra
        args = {
            'name': parsed_args.name,
            'node_count': parsed_args.node_count,
            'max_node_count': parsed_args.max_node_count,
            'min_node_count': parsed_args.min_node_count,
            'role': parsed_args.role,
        }

        if parsed_args.labels is not None:

            args['labels'] = magnum_utils.handle_labels(parsed_args.labels)