diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2017-03-24 14:43:04 +0800 |
---|---|---|
committer | Serena Feng <feng.xiaowei@zte.com.cn> | 2017-03-24 06:45:51 +0000 |
commit | 9b44406394c56b4d162e3feae6282777a63b5ec0 (patch) | |
tree | d3490377159970205a3a309c22158590f9286d32 /deploy/post/keystoneauth.py | |
parent | bbef0fa1fb89a90a98e66ece5b19852bcf3f2332 (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.py | 6 |
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) |