neutron/neutron/conf/policies/floatingip_pools.py
Slawek Kaplonski ca2091d5a9 Change wrong "admin" scope in floatingip_pools to correct "system"
Scope "admin" was added there probably by mistake during the migration
to the new RBAC policies. It should be "system" instead and this patch
fixes it.

Partially-Implements blueprint: secure-rbac-roles

Change-Id: Ied35389ce7ab3dda9ff99046ea19a18406e0e2ce
2021-04-23 12:50:56 +02:00

44 lines
1.4 KiB
Python

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_log import versionutils
from oslo_policy import policy
from neutron.conf.policies import base
DEPRECATED_REASON = (
"The Floating IP Pool API now supports system scope and default roles.")
rules = [
policy.DocumentedRuleDefault(
name='get_floatingip_pool',
check_str=base.SYSTEM_OR_PROJECT_READER,
description='Get floating IP pools',
operations=[
{
'method': 'GET',
'path': '/floatingip_pools',
},
],
scope_types=['system', 'project'],
deprecated_rule=policy.DeprecatedRule(
name='get_floatingip_pool',
check_str=base.RULE_ANY,
deprecated_reason=DEPRECATED_REASON,
deprecated_since=versionutils.deprecated.WALLABY)
),
]
def list_rules():
return rules