Rating service command-line client

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.5.0.

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-project-domain-id <project-domain-id>]
                  [--os-project-domain-name <project-domain-name>]
                  [--os-user-id <user-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
Create collector mapping.
collector-mapping-delete
Delete collector mapping.
collector-mapping-get
Show collector mapping detail.
collector-mapping-list
List collector mapping.
collector-state-disable
Disable collector state.
collector-state-enable
Enable collector state.
collector-state-get
Show collector state.
report-tenant-list
List tenant report.
total-get
Get total reports.
storage-dataframe-list
List dataframes.
hashmap-field-create
Create a field.
hashmap-field-delete
Delete a field.
hashmap-field-list
List fields.
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.
pyscripts-script-create
Create a script.
pyscripts-script-delete
Delete a script.
pyscripts-script-get
Get script.
pyscripts-script-get-data
Get script data.
pyscripts-script-list
List scripts.
pyscripts-script-update
Update a mapping.
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-project-domain-id <project-domain-id>
Defaults to env[OS_PROJECT_DOMAIN_ID].
--os-project-domain-name <project-domain-name>
Defaults to env[OS_PROJECT_DOMAIN_NAME].
--os-user-id <user-id>
Defaults to env[OS_USER_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

Create collector mapping.

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

Delete collector mapping.

Optional arguments:

--service SERVICE
Filter on this service. required.

cloudkitty collector-mapping-get

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

Show collector mapping detail.

Optional arguments:

--service SERVICE
Which service to get the mapping for. required.

cloudkitty collector-mapping-list

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

List collector mapping.

Optional arguments:

--collector COLLECTOR
Collector name to filter on. Defaults to None.

cloudkitty collector-state-disable

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

Disable collector state.

Optional arguments:

--name NAME
Name of the collector. required.

cloudkitty collector-state-enable

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

Enable collector state.

Optional arguments:

--name NAME
Name of the collector. required.

cloudkitty collector-state-get

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

Show collector state.

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

List fields.

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 [-s SERVICE_ID] [-f FIELD_ID] -c COST
                                         [-v VALUE] [-t TYPE] [-g GROUP_ID]

Create a mapping.

Optional arguments:

-s SERVICE_ID, --service-id SERVICE_ID
Service id.
-f FIELD_ID, --field-id FIELD_ID
Field id.
-c COST, --cost COST
Mapping cost required.
-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-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 [-s SERVICE_ID] [-f FIELD_ID] -l
                                           LEVEL -c COST [-m MAP_TYPE]
                                           [-g GROUP_ID]

Create a mapping.

Optional arguments:

-s SERVICE_ID, --service-id SERVICE_ID
Service id.
-f FIELD_ID, --field-id FIELD_ID
Field id.
-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).
-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 pyscripts-script-create

usage: cloudkitty pyscripts-script-create -n NAME [-f FILE]

Create a script.

Optional arguments:

-n NAME, --name NAME
Script name required.
-f FILE, --file FILE
Script file.

cloudkitty pyscripts-script-delete

usage: cloudkitty pyscripts-script-delete -s SCRIPT_ID

Delete a script.

Optional arguments:

-s SCRIPT_ID, --script-id SCRIPT_ID
Script uuid required.

cloudkitty pyscripts-script-get

usage: cloudkitty pyscripts-script-get -s SCRIPT_ID

Get script.

Optional arguments:

-s SCRIPT_ID, --script-id SCRIPT_ID
Script uuid required.

cloudkitty pyscripts-script-get-data

usage: cloudkitty pyscripts-script-get-data -s SCRIPT_ID

Get script data.

Optional arguments:

-s SCRIPT_ID, --script-id SCRIPT_ID
Script uuid required.

cloudkitty pyscripts-script-list

usage: cloudkitty pyscripts-script-list [-d SHOW_DATA]

List scripts.

Optional arguments:

-d SHOW_DATA, --show-data SHOW_DATA
Show data in the listing Defaults to False.

cloudkitty pyscripts-script-update

usage: cloudkitty pyscripts-script-update -s SCRIPT_ID -f FILE

Update a mapping.

Optional arguments:

-s SCRIPT_ID, --script-id SCRIPT_ID
Script uuid required.
-f FILE, --file FILE
Script file required.

cloudkitty report-tenant-list

usage: cloudkitty report-tenant-list

List tenant report.

cloudkitty storage-dataframe-list

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

List dataframes.

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]
                            [-s SERVICE]

Get total reports.

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.
-s SERVICE, --service SERVICE
Service Type.
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

Contents