Policy configuration¶
Configuration¶
Warning
JSON formatted policy file is deprecated since Cloudkitty 14.0.0 (Wallaby). This oslopolicy-convert-json-to-yaml tool will migrate your existing JSON-formatted policy file to YAML in a backward-compatible way.
The following is an overview of all available policies in Cloudkitty. For a sample configuration file, refer to policy.yaml.
cloudkitty¶
context_is_admin
- Default
role:admin
(no description provided)
admin_or_owner
- Default
is_admin:True or (role:admin and is_admin_project:True) or project_id:%(project_id)s
(no description provided)
default
- Default
<empty string>
(no description provided)
collector:list_mappings
- Default
role:admin
- Operations
LIST
/v1/collector/mappings
Return the list of every services mapped to a collector.
collector:get_mapping
- Default
role:admin
- Operations
GET
/v1/collector/mappings/{service_id}
Return a service to collector mapping.
collector:manage_mapping
- Default
role:admin
- Operations
POST
/v1/collector/mappings
DELETE
/v1/collector/mappings/{service_id}
Manage a service to collector mapping.
collector:get_state
- Default
role:admin
- Operations
GET
/v1/collector/states/{collector_id}
Query the enable state of a collector.
collector:update_state
- Default
role:admin
- Operations
PUT
/v1/collector/states/{collector_id}
Set the enable state of a collector.
info:list_services_info
- Default
<empty string>
- Operations
LIST
/v1/info/services
List available services information in Cloudkitty.
info:get_service_info
- Default
<empty string>
- Operations
GET
/v1/info/services/{metric_id}
Get specified service information.
info:list_metrics_info
- Default
<empty string>
- Operations
LIST
/v1/info/metrics
List available metrics information in Cloudkitty.
info:get_metric_info
- Default
<empty string>
- Operations
GET
/v1/info/metrics/{metric_id}
Get specified metric information.
info:get_config
- Default
<empty string>
- Operations
GET
/v1/info/config
Get current configuration in Cloudkitty.
rating:list_modules
- Default
role:admin
- Operations
LIST
/v1/rating/modules
Return the list of loaded modules in Cloudkitty.
rating:get_module
- Default
role:admin
- Operations
GET
/v1/rating/modules/{module_id}
Get specified module.
rating:update_module
- Default
role:admin
- Operations
PUT
/v1/rating/modules/{module_id}
Change the state and priority of a module.
rating:quote
- Default
<empty string>
- Operations
POST
/v1/rating/quote
Get an instant quote based on multiple resource descriptions.
rating:module_config
- Default
role:admin
- Operations
GET
/v1/rating/reload_modules
Trigger a rating module list reload.
report:list_tenants
- Default
role:admin
- Operations
GET
/v1/report/tenants
Return the list of rated tenants.
report:get_summary
- Default
rule:admin_or_owner
- Operations
GET
/v1/report/summary
Return the summary to pay for a given period.
report:get_total
- Default
rule:admin_or_owner
- Operations
GET
/v1/report/total
Return the amount to pay for a given period.
storage:list_data_frames
- Default
rule:admin_or_owner
- Operations
GET
/v1/storage/dataframes
Return a list of rated resources for a time period and a tenant.
dataframes:add
- Default
role:admin
- Operations
POST
/v2/dataframes
Add one or several DataFrames
dataframes:get
- Default
rule:admin_or_owner
- Operations
GET
/v2/dataframes
Get DataFrames
v2_rating:list_modules
- Default
role:admin
- Operations
GET
/v2/rating/modules
Returns the list of loaded modules in Cloudkitty.
v2_rating:get_module
- Default
role:admin
- Operations
GET
/v2/rating/modules/{module_id}
Get specified module.
scope:get_state
- Default
role:admin
- Operations
GET
/v2/scope
Get the state of one or several scopes
scope:reset_state
- Default
role:admin
- Operations
PUT
/v2/scope
Reset the state of one or several scopes
scope:patch_state
- Default
role:admin
- Operations
PATCH
/v2/scope
Enables operators to patch a storage scope
scope:post_state
- Default
role:admin
- Operations
POST
/v2/scope
Enables operators to create a storage scope
summary:get_summary
- Default
rule:admin_or_owner
- Operations
GET
/v2/summary
Get a rating summary
schedule:task_reprocesses
- Default
role:admin
- Operations
POST
/v2/task/reprocesses
Schedule a scope for reprocessing
schedule:get_task_reprocesses
- Default
role:admin
- Operations
GET
/v2/task/reprocesses
Get reprocessing schedule tasks for scopes.