summaryrefslogtreecommitdiff
path: root/neutronclient/neutron
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-11-25 10:36:03 +0000
committerGerrit Code Review <review@openstack.org>2016-11-25 10:36:03 +0000
commitce7632eba2ce43f39d80a26bb472ba5ea10be362 (patch)
tree36a4208b73923fecde47c286acad460bcdde9db6 /neutronclient/neutron
parent36ad0b719fcea0db9c661ee6c6c3ea7718f70fa2 (diff)
parentcc1d3fdd3582b0bbc2e24b65b9c690b5f0318148 (diff)
downloadpython-neutronclient-ce7632eba2ce43f39d80a26bb472ba5ea10be362.tar.gz
Merge "Added --enable-snat option for router-gateway-set"
Diffstat (limited to 'neutronclient/neutron')
-rw-r--r--neutronclient/neutron/v2_0/router.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/neutronclient/neutron/v2_0/router.py b/neutronclient/neutron/v2_0/router.py
index b431daa..40584f2 100644
--- a/neutronclient/neutron/v2_0/router.py
+++ b/neutronclient/neutron/v2_0/router.py
@@ -235,6 +235,9 @@ class SetGatewayRouter(neutronV20.NeutronCommand):
'external_network', metavar='EXTERNAL-NETWORK',
help=_('ID or name of the external network for the gateway.'))
parser.add_argument(
+ '--enable-snat', action='store_true',
+ help=_('Enable source NAT on the router gateway.'))
+ parser.add_argument(
'--disable-snat', action='store_true',
help=_('Disable source NAT on the router gateway.'))
parser.add_argument(
@@ -256,6 +259,8 @@ class SetGatewayRouter(neutronV20.NeutronCommand):
_ext_net_id = neutronV20.find_resourceid_by_name_or_id(
neutron_client, 'network', parsed_args.external_network)
router_dict = {'network_id': _ext_net_id}
+ if parsed_args.enable_snat:
+ router_dict['enable_snat'] = True
if parsed_args.disable_snat:
router_dict['enable_snat'] = False
if parsed_args.fixed_ip: