summaryrefslogtreecommitdiff
path: root/nova/policies
diff options
context:
space:
mode:
authorGhanshyam Mann <gmann@ghanshyammann.com>2020-07-18 13:47:55 -0500
committerGhanshyam Mann <gmann@ghanshyammann.com>2020-08-14 02:22:08 +0000
commit09b2dce4c33a08122ac22033206703d85d74b1c7 (patch)
tree66fe5033dbb06bfc057ada806fac958c2b348ef3 /nova/policies
parent8d7b7f55d834e063bfc946d926a16dddf33d07c3 (diff)
downloadnova-09b2dce4c33a08122ac22033206703d85d74b1c7.tar.gz
Introduce scope_types in FIP 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 FIP policies as 'system' and 'project' Partial implement blueprint policy-defaults-refresh-deprecated-apis Change-Id: I1dc11c4857466a6edb7baa9ccee3dde97a54afa0
Diffstat (limited to 'nova/policies')
-rw-r--r--nova/policies/floating_ips.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/nova/policies/floating_ips.py b/nova/policies/floating_ips.py
index f652f44438..f046dfa7cb 100644
--- a/nova/policies/floating_ips.py
+++ b/nova/policies/floating_ips.py
@@ -23,10 +23,11 @@ BASE_POLICY_NAME = 'os_compute_api:os-floating-ips'
floating_ips_policies = [
policy.DocumentedRuleDefault(
- BASE_POLICY_NAME,
- base.RULE_ADMIN_OR_OWNER,
- "Manage a project's floating IPs. These APIs are all deprecated.",
- [
+ name=BASE_POLICY_NAME,
+ check_str=base.RULE_ADMIN_OR_OWNER,
+ description="Manage a project's floating IPs. "
+ "These APIs are all deprecated.",
+ operations=[
{
'method': 'POST',
'path': '/servers/{server_id}/action (addFloatingIp)'
@@ -51,7 +52,8 @@ floating_ips_policies = [
'method': 'DELETE',
'path': '/os-floating-ips/{floating_ip_id}'
},
- ]),
+ ],
+ scope_types=['system', 'project']),
]