Replace "tenant_id" with "project_id" in address scope
This is part of the remaining technical debt of the specs https://specs.openstack.org/openstack/neutron-specs/specs/newton/moving-to-keystone-v3.html Blueprint: https://blueprints.launchpad.net/neutron/+spec/keystone-v3 Change-Id: I5a581f7ace6c25ea40a19c23868e591ae97fce1a
This commit is contained in:
parent
47d4ec4e99
commit
363c690529
|
@ -58,7 +58,7 @@ class AddressScopeDbMixin(ext_address_scope.AddressScopePluginBase):
|
|||
"""
|
||||
address_scope = self._get_address_scope(context, id)
|
||||
return context.is_admin or (
|
||||
address_scope.tenant_id == context.tenant_id)
|
||||
address_scope.project_id == context.project_id)
|
||||
|
||||
def get_ip_version_for_address_scope(self, context, id):
|
||||
address_scope = self._get_address_scope(context, id)
|
||||
|
@ -68,7 +68,10 @@ class AddressScopeDbMixin(ext_address_scope.AddressScopePluginBase):
|
|||
"""Create an address scope."""
|
||||
a_s = address_scope['address_scope']
|
||||
address_scope_id = a_s.get('id') or uuidutils.generate_uuid()
|
||||
pool_args = {'project_id': a_s['tenant_id'],
|
||||
# TODO(ralonsoh): remove tenant_id reference once bp/keystone-v3
|
||||
# migration finishes.
|
||||
project_id = a_s.get('project_id') or a_s['tenant_id']
|
||||
pool_args = {'project_id': project_id,
|
||||
'id': address_scope_id,
|
||||
'name': a_s['name'],
|
||||
'shared': a_s['shared'],
|
||||
|
|
Loading…
Reference in New Issue