Skip to content

Commit 9acbae3

Browse files
committed
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
1 parent 136fc7a commit 9acbae3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

nova/policies/volumes.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323

2424
volumes_policies = [
2525
policy.DocumentedRuleDefault(
26-
BASE_POLICY_NAME,
27-
base.RULE_ADMIN_OR_OWNER,
28-
"""Manage volumes for use with the Compute API.
26+
name=BASE_POLICY_NAME,
27+
check_str=base.RULE_ADMIN_OR_OWNER,
28+
description="""Manage volumes for use with the Compute API.
2929
3030
Lists, shows details, creates, and deletes volumes and
3131
snapshots. These APIs are proxy calls to the Volume service.
3232
These are all deprecated.
3333
""",
34-
[
34+
operations=[
3535
{
3636
'method': 'GET',
3737
'path': '/os-volumes'
@@ -72,7 +72,8 @@
7272
'method': 'DELETE',
7373
'path': '/os-snapshots/{snapshot_id}'
7474
}
75-
]),
75+
],
76+
scope_types=['system', 'project']),
7677
]
7778

7879

0 commit comments

Comments
 (0)