def do_container_list(cs, args):
    """Print a list of available containers."""
    opts = {}
    opts['bay_ident'] = args.bay
    containers = cs.containers.list(**opts)
    columns = ('uuid', 'name', 'status', 'bay_uuid')
    utils.print_list(containers, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
def do_service_list(cs, args):
    """Print a list of magnum services."""
    mservices = cs.mservices.list()
    columns = ('id', 'host', 'binary', 'state', 'disabled',
               'disabled_reason', 'created_at', 'updated_at')

    utils.print_list(mservices, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
예제 #3
0
def do_bay_list(cs, args):
    """Print a list of available bays."""
    bays = cs.bays.list(marker=args.marker, limit=args.limit,
                        sort_key=args.sort_key,
                        sort_dir=args.sort_dir)
    columns = ('uuid', 'name', 'node_count', 'master_count', 'status')
    utils.print_list(bays, columns,
                     {'versions': magnum_utils.print_list_field('versions')},
                     sortby_index=None)
예제 #4
0
def do_baymodel_list(cs, args):
    """Print a list of bay models."""
    nodes = cs.baymodels.list(limit=args.limit,
                              sort_key=args.sort_key,
                              sort_dir=args.sort_dir)
    columns = ('uuid', 'name')
    utils.print_list(nodes, columns,
                     {'versions': magnum_utils.print_list_field('versions')},
                     sortby_index=None)
예제 #5
0
def do_bay_list(cs, args):
    """Print a list of available bays."""
    bays = cs.bays.list(marker=args.marker,
                        limit=args.limit,
                        sort_key=args.sort_key,
                        sort_dir=args.sort_dir)
    columns = ('uuid', 'name', 'node_count', 'master_count', 'status')
    utils.print_list(bays,
                     columns,
                     {'versions': magnum_utils.print_list_field('versions')},
                     sortby_index=None)
def do_baymodel_list(cs, args):
    """Print a list of baymodels."""
    nodes = cs.baymodels.list(limit=args.limit,
                              sort_key=args.sort_key,
                              sort_dir=args.sort_dir)
    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)
예제 #7
0
def do_bay_list(cs, args):
    """Print a list of available bays."""
    bays = cs.bays.list(marker=args.marker, limit=args.limit,
                        sort_key=args.sort_key,
                        sort_dir=args.sort_dir)
    columns = ['uuid', 'name', 'node_count', 'master_count', 'status']
    columns += utils._get_list_table_columns_and_formatters(
        args.fields, bays,
        exclude_fields=(c.lower() for c in columns))[0]
    utils.print_list(bays, columns,
                     {'versions': magnum_utils.print_list_field('versions')},
                     sortby_index=None)
예제 #8
0
def do_pod_list(cs, args):
    """Print a list of registered pods."""
    bay = cs.bays.get(args.bay)
    if bay.status not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']:
        raise exceptions.InvalidAttribute(
            'Bay status for %s is: %s. We can not list pods in there until'
            ' the status is CREATE_COMPLETE or UPDATE_COMPLETE.' %
            (bay.uuid, bay.status))
    pods = cs.pods.list(args.bay)
    columns = ('uuid', 'name')
    utils.print_list(pods, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
예제 #9
0
def do_pod_list(cs, args):
    """Print a list of registered pods."""
    bay = cs.bays.get(args.bay)
    if bay.status not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']:
        raise exceptions.InvalidAttribute(
            'Bay status for %s is: %s. We can not list pods in there until'
            ' the status is CREATE_COMPLETE or UPDATE_COMPLETE.' %
            (bay.uuid, bay.status))
    pods = cs.pods.list(args.bay)
    columns = ('uuid', 'name')
    utils.print_list(pods, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
예제 #10
0
def do_container_list(cs, args):
    """Print a list of available containers."""
    opts = {}
    opts['bay_ident'] = args.bay
    opts['marker'] = args.marker
    opts['limit'] = args.limit
    opts['sort_key'] = args.sort_key
    opts['sort_dir'] = args.sort_dir
    containers = cs.containers.list(**opts)
    columns = ('uuid', 'name', 'status', 'bay_uuid')
    utils.print_list(containers, columns,
                     {'versions': magnum_utils.print_list_field('versions')},
                     sortby_index=None)
def do_rc_list(cs, args):
    """Print a list of registered replication controllers."""
    bay = cs.bays.get(args.bay)
    if bay.status not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']:
        raise exceptions.InvalidAttribute(
            'Bay status for %s is: %s. We cannot list '
            'replication controllers in bay until the bay status '
            'is CREATE_COMPLETE or UPDATE_COMPLETE.' % (args.bay, bay.status))

    rcs = cs.rcs.list(args.bay)
    columns = ('uuid', 'name', 'bay_uuid')
    utils.print_list(rcs, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
def do_rc_list(cs, args):
    """Print a list of registered replication controllers."""
    bay = cs.bays.get(args.bay)
    if bay.status not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']:
        raise exceptions.InvalidAttribute(
            'Bay status for %s is: %s. We cannot list '
            'replication controllers in bay until the bay status '
            'is CREATE_COMPLETE or UPDATE_COMPLETE.' %
            (args.bay, bay.status))

    rcs = cs.rcs.list(args.bay)
    columns = ('uuid', 'name', 'bay_uuid')
    utils.print_list(rcs, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
예제 #13
0
    def take_action(self, parsed_args):
        self.log.debug("take_action(%s)", parsed_args)

        mag_client = self.app.client_manager.container_infra

        quotas = mag_client.quotas.list(marker=parsed_args.marker,
                                        limit=parsed_args.limit,
                                        sort_key=parsed_args.sort_key,
                                        sort_dir=parsed_args.sort_dir,
                                        all_tenants=parsed_args.all_tenants)
        columns = ['project_id', 'resource', 'hard_limit']
        utils.print_list(
            quotas,
            columns, {'versions': magnum_utils.print_list_field('versions')},
            sortby_index=None)
예제 #14
0
    def take_action(self, parsed_args):
        self.log.debug("take_action(%s)", parsed_args)

        mag_client = self.app.client_manager.container_infra

        quotas = mag_client.quotas.list(marker=parsed_args.marker,
                                        limit=parsed_args.limit,
                                        sort_key=parsed_args.sort_key,
                                        sort_dir=parsed_args.sort_dir,
                                        all_tenants=parsed_args.all_tenants)
        columns = ['project_id', 'resource', 'hard_limit']
        utils.print_list(quotas, columns,
                         {'versions':
                          magnum_utils.print_list_field('versions')},
                         sortby_index=None)
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)
def do_bay_list(cs, args):
    """Print a list of available bays."""
    bays = cs.bays.list()
    columns = ('uuid', 'name', 'node_count', 'master_count', 'status')
    utils.print_list(bays, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
def do_rc_list(cs, args):
    """Print a list of registered replication controllers."""
    rcs = cs.rcs.list(args.bay)
    columns = ('uuid', 'name')
    utils.print_list(rcs, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
def do_baymodel_list(cs, args):
    """Print a list of bay models."""
    nodes = cs.baymodels.list()
    columns = ('uuid', 'name')
    utils.print_list(nodes, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
def do_container_list(cs, args):
    """Print a list of available containers."""
    containers = cs.containers.list()
    columns = ('uuid', 'name', 'status')
    utils.print_list(containers, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
def do_coe_service_list(cs, args):
    """Print a list of coe services."""
    services = cs.services.list(args.bay)
    columns = ("uuid", "name", "bay_uuid")
    utils.print_list(services, columns, {"versions": magnum_utils.print_list_field("versions")})
예제 #21
0
def do_bay_list(cs, args):
    """Print a list of available bays."""
    bays = cs.bays.list()
    columns = ("uuid", "name", "node_count", "master_count", "status")
    utils.print_list(bays, columns, {"versions": magnum_utils.print_list_field("versions")})
def do_pod_list(cs, args):
    """Print a list of registered pods."""
    pods = cs.pods.list(args.bay)
    columns = ('uuid', 'name')
    utils.print_list(pods, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
def do_coe_service_list(cs, args):
    """Print a list of coe services."""
    services = cs.services.list(args.bay)
    columns = ('uuid', 'name', 'bay_uuid')
    utils.print_list(services, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
def do_node_list(cs, args):
    """Print a list of configured nodes."""
    nodes = cs.nodes.list()
    columns = ('uuid', 'type', 'image_id')
    utils.print_list(nodes, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
def do_container_list(cs, args):
    """Print a list of available containers."""
    containers = cs.containers.list()
    columns = ('uuid', 'name', 'status')
    utils.print_list(containers, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
def do_pod_list(cs, args):
    """Print a list of registered pods."""
    pods = cs.pods.list(args.bay)
    columns = ('uuid', 'name')
    utils.print_list(pods, columns,
                     {'versions': magnum_utils.print_list_field('versions')})
def do_rc_list(cs, args):
    """Print a list of registered replication controllers."""
    rcs = cs.rcs.list(args.bay)
    columns = ('uuid', 'name')
    utils.print_list(rcs, columns,
                     {'versions': magnum_utils.print_list_field('versions')})