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)
|
||||
if snat is None:
|
||||
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])
|
||||
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])
|
||||
updated = True
|
||||
return updated
|
||||
|
@ -393,8 +393,8 @@ def main():
|
|||
module.fail_json(msg="both destination and port must be supplied to create a VS")
|
||||
if not module.check_mode:
|
||||
# a bit of a hack to handle concurrent runs of this module.
|
||||
# even though we've checked the pool doesn't exist,
|
||||
# it may exist by the time we run create_pool().
|
||||
# even though we've checked the virtual_server doesn't exist,
|
||||
# it may exist by the time we run virtual_server().
|
||||
# this catches the exception and does something smart
|
||||
# about it!
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue