Improve AddressScope.get_bound_tenant_ids method
Retrieve only "project_id" from "AddressScope" objects. Trivial-Fix Change-Id: Icf74685cbe2cb3ccaea05bc31cacf37c98d5fc04
This commit is contained in:
parent
51cccd4b1a
commit
960f3694f4
@ -71,6 +71,5 @@ class AddressScope(rbac_db.NeutronRbacObject):
|
||||
@classmethod
|
||||
def get_bound_tenant_ids(cls, context, obj_id):
|
||||
snp_objs = subnetpool.SubnetPool.get_objects(
|
||||
context, address_scope_id=obj_id
|
||||
)
|
||||
return {snp.project_id for snp in snp_objs}
|
||||
context, address_scope_id=obj_id, fields=['project_id'])
|
||||
return {snp['project_id'] for snp in snp_objs}
|
||||
|
Loading…
x
Reference in New Issue
Block a user