Introduce scope_types in networks 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 networks policies
as 'system' and 'project'.

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

Change-Id: I3835f3cc03611fe44d178c6643345ae3dfcc1995
This commit is contained in:
Ghanshyam Mann 2020-07-22 19:10:48 -05:00
parent ff9d31b333
commit 2e1c10e269
1 changed files with 6 additions and 5 deletions

View File

@ -23,13 +23,13 @@ POLICY_ROOT = 'os_compute_api:os-networks:%s'
networks_policies = [
policy.DocumentedRuleDefault(
POLICY_ROOT % 'view',
base.RULE_ADMIN_OR_OWNER,
"""List networks for the project and show details for a network.
name=POLICY_ROOT % 'view',
check_str=base.RULE_ADMIN_OR_OWNER,
description="""List networks for the project and show network details.
These APIs are proxy calls to the Network service. These are all
deprecated.""",
[
operations=[
{
'method': 'GET',
'path': '/os-networks'
@ -38,7 +38,8 @@ deprecated.""",
'method': 'GET',
'path': '/os-networks/{network_id}'
}
]),
],
scope_types=['system', 'project']),
]