Make inventory fail if Heat engine is down
This change ensures that the inventory script will fail, and not hang, if the Heat engine is not running. Change-Id: Ib22a926aca736819cbfbe53fd3c5d53640e462b8
This commit is contained in:
parent
0fde2645cd
commit
a02ca6e6f6
|
@ -126,7 +126,8 @@ def main():
|
|||
'project_name': configs.project_name,
|
||||
'os_auth_token': configs.auth_token,
|
||||
'password': configs.password,
|
||||
'cacert': configs.cacert
|
||||
'cacert': configs.cacert,
|
||||
'timeout': 30
|
||||
}
|
||||
|
||||
inventory = TripleoInventory(
|
||||
|
|
|
@ -36,6 +36,7 @@ def get_auth_session(auth_variables):
|
|||
auth_token = auth_variables.get('os_auth_token')
|
||||
password = auth_variables.get('password')
|
||||
cacert = auth_variables.get('cacert')
|
||||
timeout = auth_variables.get('timeout')
|
||||
|
||||
if auth_token:
|
||||
auth = ks_id.Token(auth_url=auth_url,
|
||||
|
@ -49,7 +50,7 @@ def get_auth_session(auth_variables):
|
|||
project_name=project_name,
|
||||
user_domain_id='default',
|
||||
project_domain_id='default')
|
||||
return ks_session.Session(auth=auth, verify=cacert)
|
||||
return ks_session.Session(auth=auth, verify=cacert, timeout=timeout)
|
||||
|
||||
|
||||
def get_swift_client(auth_variables):
|
||||
|
|
Loading…
Reference in New Issue