summaryrefslogtreecommitdiffstats
path: root/deploy/post/keystoneauth.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-03-24 14:43:04 +0800
committerSerena Feng <feng.xiaowei@zte.com.cn>2017-03-24 06:45:51 +0000
commit9b44406394c56b4d162e3feae6282777a63b5ec0 (patch)
treed3490377159970205a3a309c22158590f9286d32 /deploy/post/keystoneauth.py
parentbbef0fa1fb89a90a98e66ece5b19852bcf3f2332 (diff)
unify the way of getting openstack clients
Change-Id: If3a1d1a8b74e11c5861c016bd722b78f4cf9b475 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'deploy/post/keystoneauth.py')
-rw-r--r--deploy/post/keystoneauth.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/deploy/post/keystoneauth.py b/deploy/post/keystoneauth.py
index 664a794b..fb321d3f 100644
--- a/deploy/post/keystoneauth.py
+++ b/deploy/post/keystoneauth.py
@@ -64,3 +64,9 @@ class Keystoneauth(object):
return reduce(parse_credential,
[(k, v) for (k, v) in raws.iteritems() if k in maps],
defaultdict(dict))
+
+
+class ClientBase(Keystoneauth):
+ def __init__(self, klass, version, openrc):
+ super(ClientBase, self).__init__(openrc)
+ self.client = klass(version, session=self.session)