Fix creating freezer client with keystone auth session

Change-Id: I66e360ed36616a79bac24aca7ea364a0ed5aabe8
Closes-Bug: #1709608
This commit is contained in:
Pengju Jiao
2017-08-09 19:53:01 +08:00
parent c862559531
commit 85c5496e1d
2 changed files with 2 additions and 2 deletions

View File

@@ -191,5 +191,5 @@ class Client(object):
"""Validate that the client objects gets created correctly.
:return: bool
"""
if self.opts.os_auth_url is None:
if not self._session and self.opts.os_auth_url is None:
raise Exception('OS_AUTH_URL should be provided.')

View File

@@ -193,5 +193,5 @@ class Client(object):
"""Validate that the client objects gets created correctly.
:return: bool
"""
if self.opts.os_auth_url is None:
if not self._session and self.opts.os_auth_url is None:
raise Exception('OS_AUTH_URL should be provided.')