summaryrefslogtreecommitdiff
path: root/nova/policies
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2020-08-07 17:18:27 +0000
committerGerrit Code Review <review@openstack.org>2020-08-07 17:18:27 +0000
commitedae8889c9d08d8b4f2a9d0bb291e0c0472b62ca (patch)
treefec497bff092ac4ab4e7f162659aaf767aac14c4 /nova/policies
parent7b9cf5974c7d939f59eca10dfa657ff760e596b5 (diff)
parent864a32bc37416d45eadabc58c0819ee78afd4f0f (diff)
downloadnova-edae8889c9d08d8b4f2a9d0bb291e0c0472b62ca.tar.gz
Merge "Introduce scope_types in hosts policy"
Diffstat (limited to 'nova/policies')
-rw-r--r--nova/policies/hosts.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/nova/policies/hosts.py b/nova/policies/hosts.py
index 53467dadef..191d0c0882 100644
--- a/nova/policies/hosts.py
+++ b/nova/policies/hosts.py
@@ -23,12 +23,12 @@ BASE_POLICY_NAME = 'os_compute_api:os-hosts'
hosts_policies = [
policy.DocumentedRuleDefault(
- BASE_POLICY_NAME,
- base.RULE_ADMIN_API,
- """List, show and manage physical hosts.
+ name=BASE_POLICY_NAME,
+ check_str=base.RULE_ADMIN_API,
+ description="""List, show and manage physical hosts.
These APIs are all deprecated in favor of os-hypervisors and os-services.""",
- [
+ operations=[
{
'method': 'GET',
'path': '/os-hosts'
@@ -53,7 +53,8 @@ These APIs are all deprecated in favor of os-hypervisors and os-services.""",
'method': 'GET',
'path': '/os-hosts/{host_name}/startup'
}
- ]),
+ ],
+ scope_types=['system']),
]