Fix os_router ignores enable_snat: no (#45921)
If enable_snat is False, this should be used to build the
request, because the default value in the OpenStack Networking
API is True.
Fixes the issue #45915.
(cherry picked from commit 452a4ab781
)
This commit is contained in:
parent
3eb5e27d6e
commit
9a2e192e8a
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- "os_router - ``enable_snat: no`` was ignored."
|
|
@ -306,7 +306,7 @@ def _build_kwargs(cloud, module, router, network):
|
|||
if network:
|
||||
kwargs['ext_gateway_net_id'] = network['id']
|
||||
# can't send enable_snat unless we have a network
|
||||
if module.params['enable_snat']:
|
||||
if module.params.get('enable_snat') is not None:
|
||||
kwargs['enable_snat'] = module.params['enable_snat']
|
||||
|
||||
if module.params['external_fixed_ips']:
|
||||
|
|
Loading…
Reference in a new issue