Reuse Domain and Project resouce definitions

The Domain and Project resources are defined in v3/domains.py and
v3/projects.py, respectively.

The v3/auth.py module has some functions that returns projects and
domains. However, it is redifining those resources.

This change makes the auth module re-use of the existing definitions.

Change-Id: Id7bd527a4b972a4259a66e36c684f74533e57f79
This commit is contained in:
Samuel de Medeiros Queiroz
2016-08-18 14:33:45 -03:00
parent 12ccd0e52a
commit a2e80db7f0

View File

@@ -13,38 +13,12 @@
from keystoneclient import auth
from keystoneclient import base
from keystoneclient import exceptions
from keystoneclient.v3 import domains
from keystoneclient.v3 import projects
class Project(base.Resource):
"""Represents an Identity project.
Attributes:
* id: a uuid that identifies the project
* name: the name of the project
* description: a description of the project
* enabled: determines whether the project is enabled
* parent_id: a uuid that identifies the specified project's parent
in hierarchy
* parents: a list or a structured dict containing the parents of the
specified project in the hierarchy
* subtree: a list or a structured dict containing the subtree of the
specified project in the hierarchy
"""
class Domain(base.Resource):
"""Represents an Identity domain.
Attributes:
* id: a uuid that identifies the domain
* name: the name of the domain
* description: a description of the domain
* enabled: determines whether the domain is enabled
"""
pass
Domain = domains.Domain
Project = projects.Project
class AuthManager(base.Manager):