Misc fixes to bigip modules. (#44594)

Adding docs, formatting docs, adding validation checks and values
This commit is contained in:
Tim Rupp 2018-08-23 15:57:08 -04:00 committed by GitHub
parent 2787bda0fa
commit 05920b92d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 10 deletions

View file

@ -285,6 +285,11 @@ class ModuleManager(object):
pass
elif status == 'In Sync':
return
elif status == 'Disconnected':
raise F5ModuleError(
"One or more devices are unreachable (disconnected). "
"Resolve any communication problems before attempting to sync."
)
else:
raise F5ModuleError(status)

View file

@ -17,7 +17,7 @@ DOCUMENTATION = r'''
module: bigip_device_dns
short_description: Manage BIG-IP device DNS settings
description:
- Manage BIG-IP device DNS settings
- Manage BIG-IP device DNS settings.
version_added: 2.2
options:
cache:

View file

@ -36,7 +36,7 @@ options:
required: True
state:
description:
- When C(present), ensures that the device group member.
- When C(present), ensures that the device group member exists.
- When C(absent), ensures the device group member is removed.
default: present
choices:

View file

@ -61,18 +61,20 @@ author:
EXAMPLES = '''
- name: License BIG-IP using a key
bigip_device_license:
server: "lb.mydomain.com"
user: "admin"
password: "secret"
license_key: "XXXXX-XXXXX-XXXXX-XXXXX-XXXXXXX"
provider:
server: "lb.mydomain.com"
user: "admin"
password: "secret"
delegate_to: localhost
- name: Remove the license from the system
bigip_device_license:
server: "lb.mydomain.com"
user: "admin"
password: "secret"
state: "absent"
provider:
server: "lb.mydomain.com"
user: "admin"
password: "secret"
delegate_to: localhost
'''

View file

@ -61,6 +61,7 @@ options:
description:
- Dynamic routing protocols for the system to use in the route domain.
choices:
- none
- BFD
- BGP
- IS-IS
@ -322,7 +323,7 @@ class ModuleParameters(Parameters):
def routing_protocol(self):
if self._values['routing_protocol'] is None:
return None
if len(self._values['routing_protocol']) == 1 and self._values['routing_protocol'][0] == '':
if len(self._values['routing_protocol']) == 1 and self._values['routing_protocol'][0] in ['', 'none']:
return ''
return self._values['routing_protocol']
@ -578,7 +579,7 @@ class ArgumentSpec(object):
vlans=dict(type='list'),
routing_protocol=dict(
type='list',
choices=['BFD', 'BGP', 'IS-IS', 'OSPFv2', 'OSPFv3', 'PIM', 'RIP', 'RIPng']
choices=['BFD', 'BGP', 'IS-IS', 'OSPFv2', 'OSPFv3', 'PIM', 'RIP', 'RIPng', 'none']
),
bwc_policy=dict(),
connection_limit=dict(type='int'),