openstack-manuals/doc/cli-reference/source/cloudkitty.rst
KATO Tomoyuki 06be0d440d Publish RST Command-Line Interface Reference
Change-Id: I40d746c330fdcc0dc4ccf81096e26ef4c287586f
Implements: blueprint cli-ref-rst
2016-01-15 00:03:26 +09:00

17 KiB

Rating service command-line client

The cloudkitty client is the command-line interface (CLI) for the Rating service API and its extensions.

This chapter documents cloudkitty version 0.4.1.

For help on a specific cloudkitty command, enter:

$ cloudkitty help COMMAND

cloudkitty usage

usage: cloudkitty [--version] [-d] [-v] [--timeout TIMEOUT]
                  [--cloudkitty-url <CLOUDKITTY_URL>]
                  [--cloudkitty-api-version CLOUDKITTY_API_VERSION]
                  [--os-tenant-id <tenant-id>]
                  [--os-region-name <region-name>]
                  [--os-auth-token <auth-token>]
                  [--os-service-type <service-type>]
                  [--os-endpoint-type <endpoint-type>] [--os-cacert <cacert>]
                  [--os-insecure <insecure>] [--os-cert-file <cert-file>]
                  [--os-key-file <key-file>] [--os-cert <cert>]
                  [--os-key <key>] [--os-project-name <project-name>]
                  [--os-project-id <project-id>]
                  [--os-user-domain-id <user-domain-id>]
                  [--os-user-domain-name <user-domain-name>]
                  [--os-endpoint <endpoint>] [--os-auth-system <auth-system>]
                  [--os-username <username>] [--os-password <password>]
                  [--os-tenant-name <tenant-name>] [--os-token <token>]
                  [--os-auth-url <auth-url>]
                  <subcommand> ...

Subcommands

module-disable

Disable a module.

module-enable

Enable a module.

module-list

List the samples for this meters.

collector-mapping-create

collector-mapping-delete

collector-mapping-get

collector-mapping-list

collector-state-disable

collector-state-enable

collector-state-get

report-tenant-list

total-get

storage-dataframe-list

hashmap-field-create

Create a field.

hashmap-field-delete

Delete a field.

hashmap-field-list

Create a field.

hashmap-group-create

Create a group.

hashmap-group-delete

Delete a group.

hashmap-group-list

List groups.

hashmap-mapping-create

Create a mapping.

hashmap-mapping-delete

Delete a mapping.

hashmap-mapping-list

List mappings.

hashmap-mapping-update

Update a mapping.

hashmap-service-create

Create a service.

hashmap-service-delete

Delete a service.

hashmap-service-list

List services.

hashmap-threshold-create

Create a mapping.

hashmap-threshold-delete

Delete a threshold.

hashmap-threshold-get

Get a threshold.

hashmap-threshold-group

Get a threshold group.

hashmap-threshold-list

List thresholds.

hashmap-threshold-update

Update a threshold.

bash-completion

Prints all of the commands and options to stdout.

help

Display help about this program or one of its subcommands.

cloudkitty optional arguments

--version

show program's version number and exit

-d, --debug

Defaults to env[CLOUDKITTYCLIENT_DEBUG].

-v, --verbose

Print more verbose output.

--timeout TIMEOUT

Number of seconds to wait for a response.

--cloudkitty-url <CLOUDKITTY_URL>

DEPRECATED, use --os-endpoint instead. Defaults to env[CLOUDKITTY_URL].

--cloudkitty-api-version CLOUDKITTY_API_VERSION

Defaults to env[CLOUDKITTY_API_VERSION] or 1.

--os-tenant-id <tenant-id>

Defaults to env[OS_TENANT_ID].

--os-region-name <region-name>

Defaults to env[OS_REGION_NAME].

--os-auth-token <auth-token>

Defaults to env[OS_AUTH_TOKEN].

--os-service-type <service-type>

Defaults to env[OS_SERVICE_TYPE].

--os-endpoint-type <endpoint-type>

Defaults to env[OS_ENDPOINT_TYPE].

--os-cacert <cacert>

Defaults to env[OS_CACERT].

--os-insecure <insecure>

Defaults to env[OS_INSECURE].

--os-cert-file <cert-file>

Defaults to env[OS_CERT_FILE].

--os-key-file <key-file>

Defaults to env[OS_KEY_FILE].

--os-cert <cert>

Defaults to env[OS_CERT].

--os-key <key>

Defaults to env[OS_KEY].

--os-project-name <project-name>

Defaults to env[OS_PROJECT_NAME].

--os-project-id <project-id>

Defaults to env[OS_PROJECT_ID].

--os-user-domain-id <user-domain-id>

Defaults to env[OS_USER_DOMAIN_ID].

--os-user-domain-name <user-domain-name>

Defaults to env[OS_USER_DOMAIN_NAME].

--os-endpoint <endpoint>

Defaults to env[OS_ENDPOINT].

--os-auth-system <auth-system>

Defaults to env[OS_AUTH_SYSTEM].

--os-username <username>

Defaults to env[OS_USERNAME].

--os-password <password>

Defaults to env[OS_PASSWORD].

--os-tenant-name <tenant-name>

Defaults to env[OS_TENANT_NAME].

--os-token <token>

Defaults to env[OS_TOKEN].

--os-auth-url <auth-url>

Defaults to env[OS_AUTH_URL].

cloudkitty collector-mapping-create

usage: cloudkitty collector-mapping-create --collector COLLECTOR --service
                                           SERVICE

Optional arguments

--collector COLLECTOR

Map a service to this collector. Required.

--service SERVICE

Map a collector to this service. Required.

cloudkitty collector-mapping-delete

usage: cloudkitty collector-mapping-delete --service SERVICE

Optional arguments

--service SERVICE

Filter on this service. Required.

cloudkitty collector-mapping-get

usage: cloudkitty collector-mapping-get --service SERVICE

Optional arguments

--service SERVICE

Which service to get the mapping for. Required.

cloudkitty collector-mapping-list

usage: cloudkitty collector-mapping-list [--collector COLLECTOR]

Optional arguments

--collector COLLECTOR

Collector name to filter on. Defaults to None.

cloudkitty collector-state-disable

usage: cloudkitty collector-state-disable --name NAME

Optional arguments

--name NAME

Name of the collector. Required.

cloudkitty collector-state-enable

usage: cloudkitty collector-state-enable --name NAME

Optional arguments

--name NAME

Name of the collector. Required.

cloudkitty collector-state-get

usage: cloudkitty collector-state-get --name NAME

Optional arguments

--name NAME

Name of the collector. Required.

cloudkitty hashmap-field-create

usage: cloudkitty hashmap-field-create -n NAME -s SERVICE_ID

Create a field.

Optional arguments

-n NAME, --name NAME

Field name Required.

-s SERVICE_ID, --service-id SERVICE_ID

Service id Required.

cloudkitty hashmap-field-delete

usage: cloudkitty hashmap-field-delete -f FIELD_ID

Delete a field.

Optional arguments

-f FIELD_ID, --field-id FIELD_ID

Field uuid Required.

cloudkitty hashmap-field-list

usage: cloudkitty hashmap-field-list -s SERVICE_ID

Create a field.

Optional arguments

-s SERVICE_ID, --service-id SERVICE_ID

Service id Required.

cloudkitty hashmap-group-create

usage: cloudkitty hashmap-group-create -n NAME

Create a group.

Optional arguments

-n NAME, --name NAME

Group name Required.

cloudkitty hashmap-group-delete

usage: cloudkitty hashmap-group-delete -g GROUP_ID [-r RECURSIVE]

Delete a group.

Optional arguments

-g GROUP_ID, --group-id GROUP_ID

Group uuid Required.

-r RECURSIVE, --recursive RECURSIVE

Delete the group's mappings Defaults to False.

cloudkitty hashmap-group-list

usage: cloudkitty hashmap-group-list

List groups.

cloudkitty hashmap-mapping-create

usage: cloudkitty hashmap-mapping-create -c COST [-v VALUE] [-t TYPE]
                                         [-s SERVICE_ID] [-f FIELD_ID]
                                         [-g GROUP_ID]

Create a mapping.

Optional arguments

-c COST, --cost COST

Mapping cost Required.

-v VALUE, --value VALUE

Mapping value

-t TYPE, --type TYPE

Mapping type (flat, rate)

-s SERVICE_ID, --service-id SERVICE_ID

Service id

-f FIELD_ID, --field-id FIELD_ID

Field id

-g GROUP_ID, --group-id GROUP_ID

Group id

cloudkitty hashmap-mapping-delete

usage: cloudkitty hashmap-mapping-delete -m MAPPING_ID

Delete a mapping.

Optional arguments

-m MAPPING_ID, --mapping-id MAPPING_ID

Mapping uuid Required.

cloudkitty hashmap-mapping-list

usage: cloudkitty hashmap-mapping-list [-s SERVICE_ID] [-f FIELD_ID]
                                       [-g GROUP_ID]

List mappings.

Optional arguments

-s SERVICE_ID, --service-id SERVICE_ID

Service id

-f FIELD_ID, --field-id FIELD_ID

Field id

-g GROUP_ID, --group-id GROUP_ID

Group id

cloudkitty hashmap-mapping-update

usage: cloudkitty hashmap-mapping-update -m MAPPING_ID [-c COST] [-v VALUE]
                                         [-t TYPE] [-g GROUP_ID]

Update a mapping.

Optional arguments

-m MAPPING_ID, --mapping-id MAPPING_ID

Mapping id Required.

-c COST, --cost COST

Mapping cost

-v VALUE, --value VALUE

Mapping value

-t TYPE, --type TYPE

Mapping type (flat, rate)

-g GROUP_ID, --group-id GROUP_ID

Group id

cloudkitty hashmap-service-create

usage: cloudkitty hashmap-service-create -n NAME

Create a service.

Optional arguments

-n NAME, --name NAME

Service name Required.

cloudkitty hashmap-service-delete

usage: cloudkitty hashmap-service-delete -s SERVICE_ID

Delete a service.

Optional arguments

-s SERVICE_ID, --service-id SERVICE_ID

Service uuid Required.

cloudkitty hashmap-service-list

usage: cloudkitty hashmap-service-list

List services.

cloudkitty hashmap-threshold-create

usage: cloudkitty hashmap-threshold-create -l LEVEL -c COST [-m MAP_TYPE]
                                           [-s SERVICE_ID] [-f FIELD_ID]
                                           [-g GROUP_ID]

Create a mapping.

Optional arguments

-l LEVEL, --level LEVEL

Threshold level Required.

-c COST, --cost COST

Threshold cost Required.

-m MAP_TYPE, --map-type MAP_TYPE

Threshold type (flat, rate)

-s SERVICE_ID, --service-id SERVICE_ID

Service id

-f FIELD_ID, --field-id FIELD_ID

Field id

-g GROUP_ID, --group-id GROUP_ID

Group id

cloudkitty hashmap-threshold-delete

usage: cloudkitty hashmap-threshold-delete -t THRESHOLD_ID

Delete a threshold.

Optional arguments

-t THRESHOLD_ID, --threshold-id THRESHOLD_ID

Threshold uuid Required.

cloudkitty hashmap-threshold-get

usage: cloudkitty hashmap-threshold-get -t THRESHOLD_ID

Get a threshold.

Optional arguments

-t THRESHOLD_ID, --threshold-id THRESHOLD_ID

Threshold uuid Required.

cloudkitty hashmap-threshold-group

usage: cloudkitty hashmap-threshold-group -t THRESHOLD_ID

Get a threshold group.

Optional arguments

-t THRESHOLD_ID, --threshold-id THRESHOLD_ID

Threshold uuid Required.

cloudkitty hashmap-threshold-list

usage: cloudkitty hashmap-threshold-list [-s SERVICE_ID] [-f FIELD_ID]
                                         [-g GROUP_ID]
                                         [--no-group {True,False}]

List thresholds.

Optional arguments

-s SERVICE_ID, --service-id SERVICE_ID

Service id

-f FIELD_ID, --field-id FIELD_ID

Field id

-g GROUP_ID, --group-id GROUP_ID

Group id

--no-group {True,False}

If True, list only orhpaned thresholds

cloudkitty hashmap-threshold-update

usage: cloudkitty hashmap-threshold-update -t THRESHOLD_ID [-l LEVEL]
                                           [-c COST] [-m MAP_TYPE]
                                           [-g GROUP_ID]

Update a threshold.

Optional arguments

-t THRESHOLD_ID, --threshold-id THRESHOLD_ID

Threshold id Required.

-l LEVEL, --level LEVEL

Threshold level

-c COST, --cost COST

Threshold cost

-m MAP_TYPE, --map-type MAP_TYPE

Threshold type (flat, rate)

-g GROUP_ID, --group-id GROUP_ID

Group id

cloudkitty module-disable

usage: cloudkitty module-disable -n NAME

Disable a module.

Optional arguments

-n NAME, --name NAME

Module name Required.

cloudkitty module-enable

usage: cloudkitty module-enable -n NAME

Enable a module.

Optional arguments

-n NAME, --name NAME

Module name Required.

cloudkitty module-list

usage: cloudkitty module-list

List the samples for this meters.

cloudkitty report-tenant-list

usage: cloudkitty report-tenant-list

cloudkitty storage-dataframe-list

usage: cloudkitty storage-dataframe-list --begin BEGIN --end END
                                         [--tenant TENANT]
                                         [--resource-type RESOURCE_TYPE]

Optional arguments

--begin BEGIN

Starting date/time (YYYY-MM-ddThh:mm:ss) Required.

--end END

Ending date/time (YYYY-MM-ddThh:mm:ss) Required.

--tenant TENANT

Tenant ID Defaults to None.

--resource-type RESOURCE_TYPE

Resource type (compute, image, ...) Defaults to None.

cloudkitty total-get

usage: cloudkitty total-get [-t TOTAL_TENANT_ID] [-b BEGIN] [-e END]

Optional arguments

-t TOTAL_TENANT_ID, --tenant-id TOTAL_TENANT_ID

Tenant id

-b BEGIN, --begin BEGIN

Begin timestamp

-e END, --end END

End timestamp