Various small fixes to bigip modules (#48769)

This commit is contained in:
Tim Rupp 2018-11-15 19:48:22 -08:00 committed by GitHub
commit 0e71f62a95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 31 additions and 21 deletions

View file

@ -330,7 +330,7 @@ class ModuleManager(object):
raise F5ModuleError(resp.content)
return response
def upload_to_device(self,):
def upload_to_device(self):
url = 'https://{0}:{1}/mgmt/shared/file-transfer/uploads'.format(
self.client.provider['server'],
self.client.provider['server_port']

View file

@ -279,10 +279,10 @@ allowed_divergence_value:
type: int
sample: 25
description:
description: The description of the monitor.
returned: changed
type: str
sample: Important Monitor
description: The description of the monitor.
returned: changed
type: str
sample: Important Monitor
adaptive_limit:
description: Absolute number of milliseconds that may not be exceeded by a monitor probe.
returned: changed

View file

@ -553,7 +553,7 @@ class Parameters(AnsibleF5Parameters):
]
returnables = [
'client_timeout'
'client_timeout',
'description',
'explicit_flow_migration',
'idle_timeout',

View file

@ -540,8 +540,9 @@ def main():
supports_check_mode=spec.supports_check_mode,
)
client = F5RestClient(**module.params)
try:
client = F5RestClient(**module.params)
mm = ModuleManager(module=module, client=client)
results = mm.exec_module()
cleanup_tokens(client)

View file

@ -467,8 +467,9 @@ def main():
supports_check_mode=spec.supports_check_mode
)
client = F5RestClient(**module.params)
try:
client = F5RestClient(**module.params)
mm = ModuleManager(module=module, client=client)
results = mm.exec_module()
cleanup_tokens(client)

View file

@ -491,8 +491,9 @@ def main():
supports_check_mode=spec.supports_check_mode,
)
client = F5RestClient(**module.params)
try:
client = F5RestClient(**module.params)
mm = ModuleManager(module=module, client=client)
results = mm.exec_module()
cleanup_tokens(client)

View file

@ -564,6 +564,7 @@ def main():
argument_spec=spec.argument_spec,
supports_check_mode=spec.supports_check_mode
)
client = F5RestClient(**module.params)
try:

View file

@ -750,8 +750,9 @@ def main():
required_together=spec.required_together,
)
client = F5RestClient(**module.params)
try:
client = F5RestClient(**module.params)
mm = ModuleManager(module=module, client=client)
results = mm.exec_module()
cleanup_tokens(client)

View file

@ -686,8 +686,9 @@ def main():
mutually_exclusive=spec.mutually_exclusive,
)
client = F5RestClient(**module.params)
try:
client = F5RestClient(**module.params)
mm = ModuleManager(module=module, client=client)
results = mm.exec_module()
cleanup_tokens(client)

View file

@ -599,8 +599,9 @@ def main():
supports_check_mode=spec.supports_check_mode,
)
client = F5RestClient(**module.params)
try:
client = F5RestClient(**module.params)
mm = ModuleManager(module=module, client=client)
results = mm.exec_module()
cleanup_tokens(client)

View file

@ -206,6 +206,9 @@ class ModuleManager(object):
self._wait_for_module_provisioning()
break
except Exception as ex:
if 'Failed to validate the SSL' in str(ex):
raise F5ModuleError(str(ex))
# The types of exception's we're handling here are "REST API is not
# ready" exceptions.
#
@ -331,8 +334,9 @@ def main():
supports_check_mode=spec.supports_check_mode
)
client = F5RestClient(**module.params)
try:
client = F5RestClient(**module.params)
mm = ModuleManager(module=module, client=client)
results = mm.exec_module()
exit_json(module, results, client)