cloudkittyclient.v1.rating.
CliModuleDisable
(app, app_args, cmd_name=None)¶Disable a rating module.
take_action
(parsed_args)¶Return a tuple containing the column names and an iterable containing the data to be listed.
cloudkittyclient.v1.rating.
CliModuleEnable
(app, app_args, cmd_name=None)¶Enable a rating module.
take_action
(parsed_args)¶Return a tuple containing the column names and an iterable containing the data to be listed.
cloudkittyclient.v1.rating.
CliModuleGet
(app, app_args, cmd_name=None)¶Get a rating module or list loaded rating modules.
If module_id is not specified, returns a list of all loaded rating modules.
get_parser
(prog_name)¶Return an argparse.ArgumentParser
.
take_action
(parsed_args)¶Return a tuple containing the column names and an iterable containing the data to be listed.
cloudkittyclient.v1.rating.
CliModuleList
(app, app_args, cmd_name=None)¶List loaded rating modules.
take_action
(parsed_args)¶Return a tuple containing the column names and an iterable containing the data to be listed.
cloudkittyclient.v1.rating.
CliModuleSet
(app, app_args, cmd_name=None)¶get_parser
(prog_name)¶Return an argparse.ArgumentParser
.
cloudkittyclient.v1.rating.
CliModuleSetPriority
(app, app_args, cmd_name=None)¶Set the priority of a rating module.
get_parser
(prog_name)¶Return an argparse.ArgumentParser
.
take_action
(parsed_args)¶Return a tuple containing the column names and an iterable containing the data to be listed.
cloudkittyclient.v1.rating.
RatingManager
(api_client)¶Class used to handle /v1/rating endpoint
get_module
(**kwargs)¶Returns the given module.
If module_id is not specified, returns the list of loaded modules.
module_id (str) – ID of the module on which you want information.
get_quotation
(**kwargs)¶Returns a quote base on multiple resource descriptions.
res_data (list) – A list of resource descriptions.
reload_modules
(**kwargs)¶Triggers a reload of all rating modules.
update_module
(**kwargs)¶Update the given module.
module_id (str) – Id of the module to update.
enabled (bool) – Set to True to enable the module, False to disable it.
priority (int) – New priority of the module.
cloudkittyclient.v1.rating.hashmap.
HashmapManager
(api_client)¶Class used to manage the Hashmap rating module
create_field
(**kwargs)¶Creates a hashmap field.
name (str) – Field name
service_id (uuid) – ID of the service the field belongs to
create_group
(**kwargs)¶Create a hashmap group.
name (str) – Name of the group
create_mapping
(**kwargs)¶Create a hashmap mapping.
cost (decimal.Decimal) – Cost of the mapping
field_id (uuid) – ID of the field the mapping belongs to
service_id (uuid) – ID of the service the mapping belongs to
tenant_id (uuid) – ID of the tenant the mapping belongs to
group_id (uuid) – ID of the group the mapping belongs to
type (str) – Type of the mapping (flat or rate)
value (str) – Value of the mapping
create_service
(**kwargs)¶Creates a hashmap service.
name (str) – Name of the service
create_threshold
(**kwargs)¶Create a hashmap threshold.
cost (decimal.Decimal) – Cost of the threshold
field_id (uuid) – ID of the field the threshold belongs to
service_id (uuid) – ID of the service the threshold belongs to
tenant_id (uuid) – ID of the tenant the threshold belongs to
group_id (uuid) – ID of the group the threshold belongs to
type (str) – Type of the threshold (flat or rate)
level (str) – Level of the threshold
delete_field
(**kwargs)¶Deletes the given field.
field_id (uuid) – ID of the field to delete.
delete_group
(**kwargs)¶Delete a hashmap group.
group_id (uuid) – ID of the group to delete
recursive (bool) – Delete mappings recursively
delete_mapping
(**kwargs)¶Delete a hashmap mapping.
mapping_id (uuid) – ID of the mapping to delete.
delete_service
(**kwargs)¶Deletes a hashmap service
service_id (uuid) – ID of the service to delete
delete_threshold
(**kwargs)¶Delete a hashmap threshold.
threshold_id (uuid) – ID of the threshold to delete.
get_field
(**kwargs)¶Returns a hashmap field.
Either service_id or field_id must be specified. If service_id is provided, all fields of the given service are returned. If field_id is specified, only this field is returned.
service_id (str) – ID of the service of which you want fields
field_id (str) – ID of the field you want
get_group
(**kwargs)¶Get the hashmap group corresponding to the given ID.
If group_id is not specified, returns a list of all hashmap groups.
group_id (uuid) – Group ID
get_group_mappings
(**kwargs)¶Get the mappings attached to the given group.
group_id (uuid) – ID of the group
get_group_thresholds
(**kwargs)¶Get the thresholds attached to the given group.
group_id (uuid) – ID of the group
get_mapping
(**kwargs)¶Get hashmap mappings.
If mapping_id is not provided, you need to specify either service_id, field_id or group_id.
mapping_id (uuid) – ID of the mapping
service_id (uuid) – ID of the service to filter on
group_id (uuid) – ID of the group to filter on
field_id (uuid) – ID of the field to filter on
tenant_id (uuid) – ID of the tenant to filter on
filter_tenant (bool) – Explicitly filter on given tenant (allows to filter on tenant being None). Defaults to false.
no_group (bool) – Filter on orphaned mappings.
get_mapping_group
(**kwargs)¶Get the group attached to a mapping.
mapping_id (uuid) – ID of the mapping to update
get_mapping_types
(**kwargs)¶Returns a list of all available mapping types.
get_service
(**kwargs)¶Returns the service corresponding to the provided ID.
If no ID is provided, returns a list of all hashmap services.
service_id (str) – ID of the service
get_threshold
(**kwargs)¶Get hashmap thresholds.
If threshold_id is not provided, you need to specify either service_id, field_id or group_id.
threshold_id (uuid) – ID of the threshold
service_id (uuid) – ID of the service to filter on
group_id (uuid) – ID of the group to filter on
field_id (uuid) – ID of the field to filter on
tenant_id (uuid) – ID of the tenant to filter on
filter_tenant (bool) – Explicitly filter on given tenant (allows to filter on tenant being None). Defaults to false.
no_group (bool) – Filter on orphaned thresholds.
get_threshold_group
(**kwargs)¶Get the group attached to a threshold.
threshold_id (uuid) – ID of the threshold to update
update_mapping
(**kwargs)¶Update a hashmap mapping.
mapping_id (uuid) – ID of the mapping to update
cost (decimal.Decimal) – Cost of the mapping
field_id (uuid) – ID of the field the mapping belongs to
service_id (uuid) – ID of the field the mapping belongs to
tenant_id (uuid) – ID of the field the mapping belongs to
type (str) – Type of the mapping (flat or rate)
value (str) – Value of the mapping
update_threshold
(**kwargs)¶Update a hashmap threshold.
threshold_id (uuid) – ID of the threshold to update
cost (decimal.Decimal) – Cost of the threshold
field_id (uuid) – ID of the field the threshold belongs to
service_id (uuid) – ID of the field the threshold belongs to
tenant_id (uuid) – ID of the field the threshold belongs to
type (str) – Type of the threshold (flat or rate)
level (str) – Level of the threshold
cloudkittyclient.v1.rating.pyscripts.
PyscriptManager
(api_client)¶Class used to manage the Pyscript rating module
create_script
(**kwargs)¶Create a new script.
name (str) – Name of the script to create
data (str) – Content of the script
delete_script
(**kwargs)¶Delete a script.
script_id (str) – ID of the script to update
get_script
(**kwargs)¶Get the script corresponding to the given ID.
script_id (str) – ID of the script.
list_scripts
(**kwargs)¶Get a list of all pyscripts.
no_data (bool) – Set to True to remove script data from output.
update_script
(**kwargs)¶Update an existing script.
script_id (str) – ID of the script to update
name (str) – Name of the script to create
data (str) – Content of the script
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.