Skip to content

Commit 9c129cc

Browse files
author
Ghanshyam Mann
committed
Introduce scope_types in multinic 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 multinic policies as 'system' and 'project'. Partial implement blueprint policy-defaults-refresh-deprecated-apis Change-Id: I0ddd4a06413c2e069175a357e9baa2f3c61003cd
1 parent d9954df commit 9c129cc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

nova/policies/multinic.py

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

2424
multinic_policies = [
2525
policy.DocumentedRuleDefault(
26-
BASE_POLICY_NAME,
27-
base.RULE_ADMIN_OR_OWNER,
28-
"""Add or remove a fixed IP address from a server.
26+
name=BASE_POLICY_NAME,
27+
check_str=base.RULE_ADMIN_OR_OWNER,
28+
description="""Add or remove a fixed IP address from a server.
2929
3030
These APIs are proxy calls to the Network service. These are all
3131
deprecated.""",
32-
[
32+
operations=[
3333
{
3434
'method': 'POST',
3535
'path': '/servers/{server_id}/action (addFixedIp)'
@@ -38,7 +38,8 @@
3838
'method': 'POST',
3939
'path': '/servers/{server_id}/action (removeFixedIp)'
4040
}
41-
]),
41+
],
42+
scope_types=['system', 'project']),
4243
]
4344

4445

0 commit comments

Comments
 (0)