summaryrefslogtreecommitdiff
path: root/neutron/db/l3_db.py
diff options
context:
space:
mode:
authorSahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>2023-05-05 15:59:13 +0200
committerSahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>2023-05-05 16:08:20 +0200
commit256297fc7ffe74102142f6aa64e7ecc02f0614e3 (patch)
treecc26dba978672008b5e7296986bd88b49183b5f3 /neutron/db/l3_db.py
parent232a67f44414059e20bf5277aadc43ef0fae6931 (diff)
downloadneutron-256297fc7ffe74102142f6aa64e7ecc02f0614e3.tar.gz
rbacs: clean-up to use defined constants ACCESS_*
Some files are using strings access_as_shared or access_as_external instead of using defined constants ACCESS_SHARED and ACCESS_EXTERNAL. This commit is doing the cleaning it does not bring any functional change. Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com> Change-Id: Ib75326c762776c5259740cb2f0abc1163842f95d
Diffstat (limited to 'neutron/db/l3_db.py')
-rw-r--r--neutron/db/l3_db.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/neutron/db/l3_db.py b/neutron/db/l3_db.py
index 081881f005..dd1e8ee28b 100644
--- a/neutron/db/l3_db.py
+++ b/neutron/db/l3_db.py
@@ -53,6 +53,7 @@ from neutron.db import l3_attrs_db
from neutron.db.models import l3 as l3_models
from neutron.db.models import l3_attrs as l3_attrs_models
from neutron.db import models_v2
+from neutron.db import rbac_db_models
from neutron.db import standardattrdescription_db as st_attr
from neutron.extensions import l3
from neutron.extensions import segment as segment_ext
@@ -884,7 +885,7 @@ class L3_NAT_dbonly_mixin(l3.RouterPluginBase,
with db_api.CONTEXT_READER.using(elevated):
rbac_allowed_projects = network_obj.NetworkRBAC.get_projects(
elevated, object_id=subnet['network_id'],
- action='access_as_shared',
+ action=rbac_db_models.ACCESS_SHARED,
target_project=context.project_id)
# Fail if the current project_id is NOT in the allowed