The gnocchiclient.v1.metric_cli Module

class gnocchiclient.v1.metric_cli.CliMeasuresAdd(app, app_args, cmd_name=None)

Bases: CliMeasuresAddBase

Add measurements to a metric.

get_parser(prog_name)

Return an argparse.ArgumentParser.

measure(measure)
take_action(parsed_args)

Override to do something useful.

The returned value will be returned by the program.

class gnocchiclient.v1.metric_cli.CliMeasuresAddBase(app, app_args, cmd_name=None)

Bases: CliMetricWithResourceID

get_parser(prog_name)

Return an argparse.ArgumentParser.

class gnocchiclient.v1.metric_cli.CliMeasuresAggregation(app, app_args, cmd_name=None)

Bases: CliMeasuresReturn

Get measurements of aggregated metrics.

COLS = ('timestamp', 'granularity', 'value')
get_parser(prog_name)

Return an argparse.ArgumentParser.

take_action(parsed_args)

Run command.

Return a tuple containing the column names and an iterable containing the data to be listed.

class gnocchiclient.v1.metric_cli.CliMeasuresBatch(app, app_args, cmd_name=None)

Bases: Command

get_parser(prog_name)

Return an argparse.ArgumentParser.

stdin_or_file(value)
class gnocchiclient.v1.metric_cli.CliMeasuresReturn(app, app_args, cmd_name=None)

Bases: Lister

static format_measures_with_tz(parsed_args, measures)
get_parser(prog_name)

Return an argparse.ArgumentParser.

class gnocchiclient.v1.metric_cli.CliMeasuresShow(app, app_args, cmd_name=None)

Bases: CliMetricWithResourceID, CliMeasuresReturn, Lister

Get measurements of a metric.

COLS = ('timestamp', 'granularity', 'value')
get_parser(prog_name)

Return an argparse.ArgumentParser.

take_action(parsed_args)

Override to do something useful.

The returned value will be returned by the program.

class gnocchiclient.v1.metric_cli.CliMetricCreate(app, app_args, cmd_name=None)

Bases: CliMetricCreateBase

Create a metric.

get_parser(prog_name)

Return an argparse.ArgumentParser.

take_action(parsed_args)

Return a two-part tuple with a tuple of column names and a tuple of values.

class gnocchiclient.v1.metric_cli.CliMetricCreateBase(app, app_args, cmd_name=None)

Bases: ShowOne, CliMetricWithResourceID

get_parser(prog_name)

Return an argparse.ArgumentParser.

class gnocchiclient.v1.metric_cli.CliMetricDelete(app, app_args, cmd_name=None)

Bases: CliMetricWithResourceID

Delete a metric.

get_parser(prog_name)

Return an argparse.ArgumentParser.

take_action(parsed_args)

Override to do something useful.

The returned value will be returned by the program.

class gnocchiclient.v1.metric_cli.CliMetricList(app, app_args, cmd_name=None)

Bases: Lister

List metrics.

COLS = ('id', 'archive_policy/name', 'name', 'unit', 'resource_id')
get_parser(prog_name)

Return an argparse.ArgumentParser.

take_action(parsed_args)

Run command.

Return a tuple containing the column names and an iterable containing the data to be listed.

class gnocchiclient.v1.metric_cli.CliMetricShow(app, app_args, cmd_name=None)

Bases: CliMetricWithResourceID, ShowOne

Show a metric.

get_parser(prog_name)

Return an argparse.ArgumentParser.

take_action(parsed_args)

Override to do something useful.

The returned value will be returned by the program.

class gnocchiclient.v1.metric_cli.CliMetricWithResourceID(app, app_args, cmd_name=None)

Bases: Command

get_parser(prog_name)

Return an argparse.ArgumentParser.

class gnocchiclient.v1.metric_cli.CliMetricsMeasuresBatch(app, app_args, cmd_name=None)

Bases: CliMeasuresBatch

take_action(parsed_args)

Override to do something useful.

The returned value will be returned by the program.

class gnocchiclient.v1.metric_cli.CliResourcesMetricsMeasuresBatch(app, app_args, cmd_name=None)

Bases: CliMeasuresBatch

get_parser(prog_name)

Return an argparse.ArgumentParser.

take_action(parsed_args)

Override to do something useful.

The returned value will be returned by the program.