From 94bb20fb6595187d46a48f7673e31ce7eb3cefb7 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Thu, 16 Apr 2020 16:53:45 +0000 Subject: [PATCH] Remove redundant implementation of "get_projects" in NetworkRBAC This method is implemented in the parent class RBACBaseObject. Trivial-Fix Change-Id: I95ed46e2bfa83984f4121e62d6d2c33c8a553fa3 --- neutron/objects/network.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/neutron/objects/network.py b/neutron/objects/network.py index 93d572a280a..0c5c9fcc257 100644 --- a/neutron/objects/network.py +++ b/neutron/objects/network.py @@ -19,7 +19,6 @@ from neutron_lib.objects import common_types from oslo_utils import versionutils from oslo_versionedobjects import exception from oslo_versionedobjects import fields as obj_fields -import sqlalchemy as sa from neutron.db.models import dns as dns_models from neutron.db.models import external_net as ext_net_model @@ -54,22 +53,6 @@ class NetworkRBAC(rbac.RBACBaseObject): for f in standard_fields: primitive.pop(f, None) - @classmethod - def get_projects(cls, context, object_id=None, action=None, - target_tenant=None): - clauses = [] - if object_id: - clauses.append(rbac_db_models.NetworkRBAC.object_id == object_id) - if action: - clauses.append(rbac_db_models.NetworkRBAC.action == action) - if target_tenant: - clauses.append(rbac_db_models.NetworkRBAC.target_tenant == - target_tenant) - query = context.session.query(rbac_db_models.NetworkRBAC.target_tenant) - if clauses: - query = query.filter(sa.and_(*clauses)) - return [data[0] for data in query] - @base.NeutronObjectRegistry.register class NetworkDhcpAgentBinding(base.NeutronDbObject):