Get user/project it from built-in method

Change-Id: I18f81b8deb76c4e60f6ade7b63a1cd7473bebbf4
changes/74/799474/2
Federico Ressi 1 year ago
parent 06038db65b
commit eca9da7143
  1. 4
      tobiko/openstack/keystone/_resource.py

@ -33,7 +33,7 @@ def get_project_id(
if project is not None:
return get_keystone_resource_id(project)
if session is not None:
return session.auth.auth_ref.project_id
return session.get_project_id()
raise ValueError("'project' and 'session' can't be None ata the same "
"time.")
@ -44,7 +44,7 @@ def get_user_id(
if user is not None:
return get_keystone_resource_id(user)
if session is not None:
return session.auth.auth_ref.user_id
return session.get_user_id()
raise ValueError("'project' and 'session' can't be None ata the same "
"time.")

Loading…
Cancel
Save