diff options
| author | Reedip <reedip14@gmail.com> | 2016-11-29 07:18:47 -0500 |
|---|---|---|
| committer | Reedip <reedip14@gmail.com> | 2016-12-19 17:30:19 -0500 |
| commit | 4a5bf8d2a58fde1d6cbbd2bb27c3eb6fabe59c3a (patch) | |
| tree | 267e9d4f4c91f736e3f2950f42e8e687e0c1052d /openstackclient/network | |
| parent | e51a2b3b171f3c72a715bee3ad99c0f88efa3010 (diff) | |
| download | python-openstackclient-4a5bf8d2a58fde1d6cbbd2bb27c3eb6fabe59c3a.tar.gz | |
Add support for clearing router gateway
This patch adds the support to clear the gateway information
from a router.
Change-Id: I446c556750f080a6fc21fea8f531fd71838d648a
Implements: blueprint neutron-client-advanced-router
Partially-Implements: blueprint network-commands-options
Diffstat (limited to 'openstackclient/network')
| -rw-r--r-- | openstackclient/network/v2/router.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openstackclient/network/v2/router.py b/openstackclient/network/v2/router.py index fea294da..45507b53 100644 --- a/openstackclient/network/v2/router.py +++ b/openstackclient/network/v2/router.py @@ -622,6 +622,11 @@ class UnsetRouter(command.Command): "gateway: nexthop IP address " "(repeat option to unset multiple routes)")) parser.add_argument( + '--external-gateway', + action='store_true', + default=False, + help=_("Remove external gateway information from the router")) + parser.add_argument( 'router', metavar="<router>", help=_("Router to modify (name or ID)") @@ -642,5 +647,7 @@ class UnsetRouter(command.Command): msg = (_("Router does not contain route %s") % route) raise exceptions.CommandError(msg) attrs['routes'] = tmp_routes + if parsed_args.external_gateway: + attrs['external_gateway_info'] = {} if attrs: client.update_router(obj, **attrs) |
