Introduce scope_types in volumes policy

Appropriate scope_type for nova case:
- https://specs.openstack.org/openstack/nova-specs/specs/ussuri/approved/policy-defaults-refresh.html#scope

This commit introduce scope_type for volumes policies
as 'system' and 'project'.

Partial implement blueprint policy-defaults-refresh-deprecated-apis

Change-Id: I644afd7691e805e3ee086024c6b9c82b0a4b7bbb
This commit is contained in:
Ghanshyam Mann 2020-07-23 20:20:13 -05:00
parent 136fc7a936
commit 9acbae3619
1 changed files with 6 additions and 5 deletions

View File

@ -23,15 +23,15 @@ BASE_POLICY_NAME = 'os_compute_api:os-volumes'
volumes_policies = [
policy.DocumentedRuleDefault(
BASE_POLICY_NAME,
base.RULE_ADMIN_OR_OWNER,
"""Manage volumes for use with the Compute API.
name=BASE_POLICY_NAME,
check_str=base.RULE_ADMIN_OR_OWNER,
description="""Manage volumes for use with the Compute API.
Lists, shows details, creates, and deletes volumes and
snapshots. These APIs are proxy calls to the Volume service.
These are all deprecated.
""",
[
operations=[
{
'method': 'GET',
'path': '/os-volumes'
@ -72,7 +72,8 @@ These are all deprecated.
'method': 'DELETE',
'path': '/os-snapshots/{snapshot_id}'
}
]),
],
scope_types=['system', 'project']),
]