diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-12-20 13:09:12 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-12-20 13:09:12 +0000 |
| commit | a988ca53055551b546756030489292fb709093c9 (patch) | |
| tree | b3c9f2fc73e305329f2be7d16081d52e07e9dcb0 /openstackclient/network | |
| parent | 3ab94614c29081b2872495376ee22c7c2081e3fa (diff) | |
| parent | 4a5bf8d2a58fde1d6cbbd2bb27c3eb6fabe59c3a (diff) | |
| download | python-openstackclient-a988ca53055551b546756030489292fb709093c9.tar.gz | |
Merge "Add support for clearing router gateway"
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) |
