Exemplo n.º 1
0
 def _unify_user(user):
     # When user has default_project_id that is None user.default_project_id
     # will raise AttributeError
     project_id = getattr(user, "project_id",
                          getattr(user, "default_project_id", None))
     return identity.User(id=user.id,
                          name=user.name,
                          project_id=project_id,
                          domain_id=user.domain_id)
Exemplo n.º 2
0
 def _unify_user(user):
     return identity.User(id=user.id,
                          name=user.name,
                          project_id=getattr(user, "tenantId", None),
                          domain_id="default")