Merge "Drop 3rd-party plugin specific policies"
This commit is contained in:
@@ -20,7 +20,6 @@ from neutron.conf.policies import agent
|
||||
from neutron.conf.policies import auto_allocated_topology
|
||||
from neutron.conf.policies import availability_zone
|
||||
from neutron.conf.policies import base
|
||||
from neutron.conf.policies import cisco_plugin
|
||||
from neutron.conf.policies import flavor
|
||||
from neutron.conf.policies import floatingip
|
||||
from neutron.conf.policies import floatingip_pools
|
||||
@@ -39,7 +38,6 @@ from neutron.conf.policies import service_type
|
||||
from neutron.conf.policies import subnet
|
||||
from neutron.conf.policies import subnetpool
|
||||
from neutron.conf.policies import trunk
|
||||
from neutron.conf.policies import vmware_plugin
|
||||
|
||||
|
||||
def list_rules():
|
||||
@@ -49,7 +47,6 @@ def list_rules():
|
||||
agent.list_rules(),
|
||||
auto_allocated_topology.list_rules(),
|
||||
availability_zone.list_rules(),
|
||||
cisco_plugin.list_rules(),
|
||||
flavor.list_rules(),
|
||||
floatingip.list_rules(),
|
||||
floatingip_pools.list_rules(),
|
||||
@@ -68,7 +65,6 @@ def list_rules():
|
||||
subnet.list_rules(),
|
||||
subnetpool.list_rules(),
|
||||
trunk.list_rules(),
|
||||
vmware_plugin.list_rules(),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
# 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_policy import policy
|
||||
|
||||
|
||||
# TODO(amotoki): Move Cisco related policy rules to networking-cisco
|
||||
rules = [
|
||||
policy.RuleDefault('create_network_profile',
|
||||
'rule:admin_only',
|
||||
description='Access rule for creating network profile'),
|
||||
policy.RuleDefault('get_network_profiles',
|
||||
'',
|
||||
description='Access rule for listing network profiles'),
|
||||
policy.RuleDefault('get_network_profile',
|
||||
'',
|
||||
description='Access rule for getting network profile'),
|
||||
policy.RuleDefault('update_network_profile',
|
||||
'rule:admin_only',
|
||||
description='Access rule for updating network profile'),
|
||||
policy.RuleDefault('delete_network_profile',
|
||||
'rule:admin_only',
|
||||
description='Access rule for deleting network profile'),
|
||||
policy.RuleDefault('get_policy_profiles',
|
||||
'',
|
||||
description='Access rule for listing policy profile'),
|
||||
policy.RuleDefault('get_policy_profile',
|
||||
'',
|
||||
description='Access rule for getting policy prodile'),
|
||||
policy.RuleDefault('update_policy_profiles',
|
||||
'rule:admin_only',
|
||||
description='Access rule for updating policy profile'),
|
||||
]
|
||||
|
||||
|
||||
def list_rules():
|
||||
return rules
|
||||
@@ -83,11 +83,6 @@ rules = [
|
||||
'rule:admin_only',
|
||||
description=('Access rule for getting provider '
|
||||
'segmentation_id of network')),
|
||||
# TODO(amotoki): Move queue_id to vmware-nsx plugin
|
||||
policy.RuleDefault(
|
||||
'get_network:queue_id',
|
||||
'rule:admin_only',
|
||||
description='Access rule for getting queue_id of network'),
|
||||
|
||||
policy.RuleDefault(
|
||||
'update_network',
|
||||
|
||||
@@ -69,12 +69,6 @@ rules = [
|
||||
description=('Access rule for creating '
|
||||
'port with binding profile')),
|
||||
# TODO(amotoki): Add create_port:binding:vnic_type
|
||||
# TODO(amotoki): Move mac_learning_enabled to vmware-nsx plugin
|
||||
policy.RuleDefault(
|
||||
'create_port:mac_learning_enabled',
|
||||
'rule:context_is_advsvc or rule:admin_or_network_owner',
|
||||
description=('Access rule for creating port '
|
||||
'with mac_learning_enabled attribute')),
|
||||
policy.RuleDefault(
|
||||
'create_port:allowed_address_pairs',
|
||||
'rule:admin_or_network_owner',
|
||||
@@ -85,11 +79,6 @@ rules = [
|
||||
'get_port',
|
||||
'rule:context_is_advsvc or rule:admin_owner_or_network_owner',
|
||||
description='Access rule for getting port'),
|
||||
# TODO(amotoki): Move queue_id to vmware-nsx plugin
|
||||
policy.RuleDefault(
|
||||
'get_port:queue_id',
|
||||
'rule:admin_only',
|
||||
description='Access rule for getting queue_id of port'),
|
||||
policy.RuleDefault(
|
||||
'get_port:binding:vif_type',
|
||||
'rule:admin_only',
|
||||
@@ -150,11 +139,6 @@ rules = [
|
||||
'update_port:binding:profile',
|
||||
'rule:admin_only',
|
||||
description='Access rule for updating binding profile of port'),
|
||||
# TODO(amotoki): Move mac_learning_enabled to vmware-nsx plugin
|
||||
policy.RuleDefault(
|
||||
'update_port:mac_learning_enabled',
|
||||
'rule:context_is_advsvc or rule:admin_or_network_owner',
|
||||
description='Access rule for updating mac_learning_enabled of port'),
|
||||
# TODO(amotoki): Add update_port:binding:vnic_type
|
||||
policy.RuleDefault(
|
||||
'update_port:allowed_address_pairs',
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
# 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_policy import policy
|
||||
|
||||
|
||||
# TODO(amotoki): Move VMware related policy rules to vmware-nsx
|
||||
rules = [
|
||||
policy.RuleDefault('create_lsn',
|
||||
'rule:admin_only',
|
||||
description='Access rule for creating lsn'),
|
||||
policy.RuleDefault('get_lsn',
|
||||
'rule:admin_only',
|
||||
description='Access rule for getting lsn'),
|
||||
|
||||
policy.RuleDefault('create_qos_queue',
|
||||
'rule:admin_only',
|
||||
description='Access rule for creating qos queue'),
|
||||
policy.RuleDefault('get_qos_queue',
|
||||
'rule:admin_only',
|
||||
description='Access rule for getting qos queue'),
|
||||
]
|
||||
|
||||
|
||||
def list_rules():
|
||||
return rules
|
||||
Reference in New Issue
Block a user