From a2e80db7f0915ab39d6e93777e6a3222a0ba9cce Mon Sep 17 00:00:00 2001 From: Samuel de Medeiros Queiroz Date: Thu, 18 Aug 2016 14:33:45 -0300 Subject: [PATCH] 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 --- keystoneclient/v3/auth.py | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/keystoneclient/v3/auth.py b/keystoneclient/v3/auth.py index a1bf06476..caad4acdb 100644 --- a/keystoneclient/v3/auth.py +++ b/keystoneclient/v3/auth.py @@ -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):