mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
cloudstack: add timeout to utils
This commit is contained in:
parent
fc807e29c8
commit
caf3cf6930
2 changed files with 4 additions and 0 deletions
|
@ -64,12 +64,14 @@ class AnsibleCloudStack:
|
||||||
api_secret = self.module.params.get('secret_key')
|
api_secret = self.module.params.get('secret_key')
|
||||||
api_url = self.module.params.get('api_url')
|
api_url = self.module.params.get('api_url')
|
||||||
api_http_method = self.module.params.get('api_http_method')
|
api_http_method = self.module.params.get('api_http_method')
|
||||||
|
api_timeout = self.module.params.get('api_timeout')
|
||||||
|
|
||||||
if api_key and api_secret and api_url:
|
if api_key and api_secret and api_url:
|
||||||
self.cs = CloudStack(
|
self.cs = CloudStack(
|
||||||
endpoint=api_url,
|
endpoint=api_url,
|
||||||
key=api_key,
|
key=api_key,
|
||||||
secret=api_secret,
|
secret=api_secret,
|
||||||
|
timeout=api_timeout,
|
||||||
method=api_http_method
|
method=api_http_method
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -64,12 +64,14 @@ class AnsibleCloudStack:
|
||||||
api_secret = self.module.params.get('secret_key')
|
api_secret = self.module.params.get('secret_key')
|
||||||
api_url = self.module.params.get('api_url')
|
api_url = self.module.params.get('api_url')
|
||||||
api_http_method = self.module.params.get('api_http_method')
|
api_http_method = self.module.params.get('api_http_method')
|
||||||
|
api_timeout = self.module.params.get('api_timeout')
|
||||||
|
|
||||||
if api_key and api_secret and api_url:
|
if api_key and api_secret and api_url:
|
||||||
self.cs = CloudStack(
|
self.cs = CloudStack(
|
||||||
endpoint=api_url,
|
endpoint=api_url,
|
||||||
key=api_key,
|
key=api_key,
|
||||||
secret=api_secret,
|
secret=api_secret,
|
||||||
|
timeout=api_timeout,
|
||||||
method=api_http_method
|
method=api_http_method
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue