@utils.arg('<STR_LIT>', metavar='<STR_LIT>',<EOL>help='<STR_LIT>',<EOL>action='<STR_LIT>')<EOL>@utils.arg('<STR_LIT>', metavar='<STR_LIT>',<EOL>help='<STR_LIT>')<EOL>@utils.arg('<STR_LIT>', metavar='<STR_LIT>',<EOL>help='<STR_LIT>'<EOL>'<STR_LIT>')<EOL>@utils.arg('<STR_LIT>', metavar='<STR_LIT>',<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>")<EOL>def do_dimension_name_list(mc, args):
fields = {}<EOL>if args.metric_name:<EOL><INDENT>fields['<STR_LIT>'] = args.metric_name<EOL><DEDENT>if args.limit:<EOL><INDENT>fields['<STR_LIT>'] = args.limit<EOL><DEDENT>if args.offset:<EOL><INDENT>fields['<STR_LIT>'] = args.offset<EOL><DEDENT>if args.tenant_id:<EOL><INDENT>fields['<STR_LIT>'] = args.tenant_id<EOL><DEDENT>try:<EOL><INDENT>dimension_names = mc.metrics.list_dimension_names(**fields)<EOL><DEDENT>except (osc_exc.ClientException, k_exc.HttpError) as he:<EOL><INDENT>raise osc_exc.CommandError('<STR_LIT>' % (he.message, he.details))<EOL><DEDENT>if args.json:<EOL><INDENT>print(utils.json_formatter(dimension_names))<EOL>return<EOL><DEDENT>if isinstance(dimension_names, list):<EOL><INDENT>utils.print_list(dimension_names, ['<STR_LIT>'], formatters={<EOL>'<STR_LIT>': lambda x: x['<STR_LIT>']})<EOL><DEDENT>
List names of metric dimensions.