Apply changes according to the review
This commit is contained in:
parent
6cdfe07518
commit
be9058201f
1 changed files with 20 additions and 20 deletions
|
@ -237,10 +237,10 @@ def set_snat(api,name,snat):
|
||||||
current_state=get_snat_type(api,name)
|
current_state=get_snat_type(api,name)
|
||||||
if snat is None:
|
if snat is None:
|
||||||
return updated
|
return updated
|
||||||
if snat == 'None' and current_state != 'SRC_TRANS_NONE':
|
elif snat == 'None' and current_state != 'SRC_TRANS_NONE':
|
||||||
api.LocalLB.VirtualServer.set_source_address_translation_none(virtual_servers = [name])
|
api.LocalLB.VirtualServer.set_source_address_translation_none(virtual_servers = [name])
|
||||||
updated = True
|
updated = True
|
||||||
if snat == 'Automap' and current_state != 'SRC_TRANS_AUTOMAP':
|
elif snat == 'Automap' and current_state != 'SRC_TRANS_AUTOMAP':
|
||||||
api.LocalLB.VirtualServer.set_source_address_translation_automap(virtual_servers = [name])
|
api.LocalLB.VirtualServer.set_source_address_translation_automap(virtual_servers = [name])
|
||||||
updated = True
|
updated = True
|
||||||
return updated
|
return updated
|
||||||
|
@ -393,8 +393,8 @@ def main():
|
||||||
module.fail_json(msg="both destination and port must be supplied to create a VS")
|
module.fail_json(msg="both destination and port must be supplied to create a VS")
|
||||||
if not module.check_mode:
|
if not module.check_mode:
|
||||||
# a bit of a hack to handle concurrent runs of this module.
|
# a bit of a hack to handle concurrent runs of this module.
|
||||||
# even though we've checked the pool doesn't exist,
|
# even though we've checked the virtual_server doesn't exist,
|
||||||
# it may exist by the time we run create_pool().
|
# it may exist by the time we run virtual_server().
|
||||||
# this catches the exception and does something smart
|
# this catches the exception and does something smart
|
||||||
# about it!
|
# about it!
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue