Skip to content

Commit

Permalink
Merge "Add description to policies in simple_tenant_usage.py"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Mar 28, 2017
2 parents 19fdbb1 + a36253b commit da039c3
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions nova/policies/simple_tenant_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,26 @@


simple_tenant_usage_policies = [
policy.RuleDefault(
name=POLICY_ROOT % 'show',
check_str=base.RULE_ADMIN_OR_OWNER),
policy.RuleDefault(
name=POLICY_ROOT % 'list',
check_str=base.RULE_ADMIN_API),
base.create_rule_default(
POLICY_ROOT % 'show',
base.RULE_ADMIN_OR_OWNER,
"Show usage statistics for a specific tenant.",
[
{
'method': 'GET',
'path': '/os-simple-tenant-usage/{tenant_id}'
}
]),
base.create_rule_default(
POLICY_ROOT % 'list',
base.RULE_ADMIN_API,
"List per tenant usage statistics for all tenants.",
[
{
'method': 'GET',
'path': '/os-simple-tenant-usage'
}
]),
policy.RuleDefault(
name=POLICY_ROOT % 'discoverable',
check_str=base.RULE_ANY),
Expand Down

0 comments on commit da039c3

Please sign in to comment.