From c11bf0fdb9b8b7c6a1c26f7ad2fcb551e22dd5f9 Mon Sep 17 00:00:00 2001 From: Dongcan Ye Date: Thu, 30 Jan 2020 07:54:37 +0000 Subject: [PATCH] Using policy constants from neutron-lib Commit 59c60b68fb459bea9c5832b29323eca7366f8a80 defines some policy constants, we can use it. Change-Id: I77022e05773689ecb99bdce698710222d737e903 --- neutron_vpnaas/policies/base.py | 17 ----------------- neutron_vpnaas/policies/endpoint_group.py | 2 +- neutron_vpnaas/policies/ike_policy.py | 2 +- neutron_vpnaas/policies/ipsec_policy.py | 2 +- .../policies/ipsec_site_connection.py | 2 +- neutron_vpnaas/policies/vpnservice.py | 2 +- 6 files changed, 5 insertions(+), 22 deletions(-) delete mode 100644 neutron_vpnaas/policies/base.py diff --git a/neutron_vpnaas/policies/base.py b/neutron_vpnaas/policies/base.py deleted file mode 100644 index 463ec829b..000000000 --- a/neutron_vpnaas/policies/base.py +++ /dev/null @@ -1,17 +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. - - -# TODO(amotoki): Define these in neutron or neutron-lib -RULE_ADMIN_OR_OWNER = 'rule:admin_or_owner' -RULE_ADMIN_ONLY = 'rule:admin_only' -RULE_ANY = 'rule:regular_user' diff --git a/neutron_vpnaas/policies/endpoint_group.py b/neutron_vpnaas/policies/endpoint_group.py index bbee69275..7f96668fc 100644 --- a/neutron_vpnaas/policies/endpoint_group.py +++ b/neutron_vpnaas/policies/endpoint_group.py @@ -12,7 +12,7 @@ from oslo_policy import policy -from neutron_vpnaas.policies import base +from neutron_lib import policy as base rules = [ diff --git a/neutron_vpnaas/policies/ike_policy.py b/neutron_vpnaas/policies/ike_policy.py index 34a7b07e3..54552c781 100644 --- a/neutron_vpnaas/policies/ike_policy.py +++ b/neutron_vpnaas/policies/ike_policy.py @@ -12,7 +12,7 @@ from oslo_policy import policy -from neutron_vpnaas.policies import base +from neutron_lib import policy as base rules = [ diff --git a/neutron_vpnaas/policies/ipsec_policy.py b/neutron_vpnaas/policies/ipsec_policy.py index 8a9b29605..118f28732 100644 --- a/neutron_vpnaas/policies/ipsec_policy.py +++ b/neutron_vpnaas/policies/ipsec_policy.py @@ -12,7 +12,7 @@ from oslo_policy import policy -from neutron_vpnaas.policies import base +from neutron_lib import policy as base rules = [ diff --git a/neutron_vpnaas/policies/ipsec_site_connection.py b/neutron_vpnaas/policies/ipsec_site_connection.py index 8935a87b5..b05d56ed3 100644 --- a/neutron_vpnaas/policies/ipsec_site_connection.py +++ b/neutron_vpnaas/policies/ipsec_site_connection.py @@ -12,7 +12,7 @@ from oslo_policy import policy -from neutron_vpnaas.policies import base +from neutron_lib import policy as base rules = [ diff --git a/neutron_vpnaas/policies/vpnservice.py b/neutron_vpnaas/policies/vpnservice.py index a4d3578c1..a9a42f0a7 100644 --- a/neutron_vpnaas/policies/vpnservice.py +++ b/neutron_vpnaas/policies/vpnservice.py @@ -12,7 +12,7 @@ from oslo_policy import policy -from neutron_vpnaas.policies import base +from neutron_lib import policy as base rules = [