Netscaler various fixes (#34800)

* Add default lb vserver option in netscaler_cs_vserver
Add documentation for ssl_certkey option in netscaler_cs_vserver

* Add options for gracefully disabling netscaler_server

* Add "state" suboption for netscaler_servicegroup servicemembers
Fix servicemember modification algorithm in netscaler_servicegroup
Fix monitorbindings modification algorithm in netscaler_servicegroup
This commit is contained in:
George Nikolopoulos 2018-02-06 21:11:44 +02:00 committed by John R Barker
parent 3df2561405
commit b1a8f3b3d3
6 changed files with 245 additions and 33 deletions

View file

@ -87,6 +87,21 @@ options:
- "Minimum value = C(0)"
- "Maximum value = C(4094)"
graceful:
description:
- >-
Shut down gracefully, without accepting any new connections, and disabling each service when all of
its connections are closed.
- This option is meaningful only when setting the I(disabled) option to C(true)
type: bool
version_added: "2.5"
delay:
description:
- Time, in seconds, after which all the services configured on the server are disabled.
- This option is meaningful only when setting the I(disabled) option to C(true)
version_added: "2.5"
disabled:
description:
- When set to C(true) the server state will be set to C(disabled).
@ -160,8 +175,15 @@ def server_identical(client, module, server_proxy):
log('Checking if configured server is identical')
if server.count_filtered(client, 'name:%s' % module.params['name']) == 0:
return False
server_list = server.get_filtered(client, 'name:%s' % module.params['name'])
if server_proxy.has_equal_attributes(server_list[0]):
diff = diff_list(client, module, server_proxy)
# Remove options that are not present in nitro server object
# These are special options relevant to the disabled action
for option in ['graceful', 'delay']:
if option in diff:
del diff[option]
if diff == {}:
return True
else:
return False
@ -197,6 +219,8 @@ def main():
),
comment=dict(type='str'),
td=dict(type='float'),
graceful=dict(type='bool'),
delay=dict(type='float')
)
hand_inserted_arguments = dict(
@ -251,6 +275,8 @@ def main():
'translationmask',
'domainresolveretry',
'ipv6address',
'graceful',
'delay',
'comment',
'td',
]
@ -289,6 +315,7 @@ def main():
]
transforms = {
'graceful': ['bool_yes_no'],
'ipv6address': ['bool_yes_no'],
}