summaryrefslogtreecommitdiff
path: root/openstackclient/network/v2/router.py
diff options
context:
space:
mode:
authorSean McGinnis <sean.mcginnis@gmail.com>2018-10-26 11:50:32 -0500
committerDean Troyer <dtroyer@gmail.com>2019-05-19 18:22:26 -0500
commit5a0fc68a87d1c9733c1dd5bb6f68b2e518fe2105 (patch)
treeee31c8f9779ce7db312cde423d67c7cbc29ad548 /openstackclient/network/v2/router.py
parent67dadda746759d8cf47822e6f426c473e46acc27 (diff)
downloadpython-openstackclient-5a0fc68a87d1c9733c1dd5bb6f68b2e518fe2105.tar.gz
Remove deprecated network options
The following were deprecated for several releases and can now be removed: * Remove ``port create|set`` options ``--device-id`` and ``--port-id`` * Remove ``router set`` option ``--clear-routes`` * Remove ``security group rule create`` options ``--src-group`` and ``--src-ip`` These are backwards incompatible changes and will require a major version bump after they are merged. Change-Id: Ieae74c14f6b3e263721a3146cf76f94a9ab792f6 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com> Signed-off-by: Dean Troyer <dtroyer@gmail.com>
Diffstat (limited to 'openstackclient/network/v2/router.py')
-rw-r--r--openstackclient/network/v2/router.py19
1 files changed, 3 insertions, 16 deletions
diff --git a/openstackclient/network/v2/router.py b/openstackclient/network/v2/router.py
index 2ec3e2f0..13de66aa 100644
--- a/openstackclient/network/v2/router.py
+++ b/openstackclient/network/v2/router.py
@@ -13,7 +13,6 @@
"""Router action implementations"""
-import argparse
import copy
import json
import logging
@@ -528,8 +527,6 @@ class SetRouter(command.Command):
action='store_true',
help=_("Set router to centralized mode (disabled router only)")
)
- routes_group = parser.add_mutually_exclusive_group()
- # ToDo(Reedip):Remove mutual exclusiveness once clear-routes is removed
parser.add_argument(
'--route',
metavar='destination=<subnet>,gateway=<ip-address>',
@@ -542,18 +539,13 @@ class SetRouter(command.Command):
"gateway: nexthop IP address "
"(repeat option to set multiple routes)")
)
- routes_group.add_argument(
+ parser.add_argument(
'--no-route',
action='store_true',
help=_("Clear routes associated with the router. "
"Specify both --route and --no-route to overwrite "
"current value of route.")
)
- routes_group.add_argument(
- '--clear-routes',
- action='store_true',
- help=argparse.SUPPRESS,
- )
routes_ha = parser.add_mutually_exclusive_group()
routes_ha.add_argument(
'--ha',
@@ -619,21 +611,16 @@ class SetRouter(command.Command):
attrs['ha'] = True
elif parsed_args.no_ha:
attrs['ha'] = False
- if parsed_args.clear_routes:
- LOG.warning(_(
- 'The --clear-routes option is deprecated, '
- 'please use --no-route instead.'
- ))
if parsed_args.routes is not None:
for route in parsed_args.routes:
route['nexthop'] = route.pop('gateway')
attrs['routes'] = parsed_args.routes
- if not (parsed_args.no_route or parsed_args.clear_routes):
+ if not parsed_args.no_route:
# Map the route keys and append to the current routes.
# The REST API will handle route validation and duplicates.
attrs['routes'] += obj.routes
- elif parsed_args.no_route or parsed_args.clear_routes:
+ elif parsed_args.no_route:
attrs['routes'] = []
if (parsed_args.disable_snat or parsed_args.enable_snat or
parsed_args.fixed_ip) and not parsed_args.external_gateway: