summaryrefslogtreecommitdiff
path: root/openstackclient/network
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/network')
-rw-r--r--openstackclient/network/v2/router.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/openstackclient/network/v2/router.py b/openstackclient/network/v2/router.py
index f46c8696..f322d5d1 100644
--- a/openstackclient/network/v2/router.py
+++ b/openstackclient/network/v2/router.py
@@ -183,11 +183,17 @@ class CreateRouter(command.ShowOne):
default=False,
help=_("Create a distributed router")
)
- parser.add_argument(
+ ha_group = parser.add_mutually_exclusive_group()
+ ha_group.add_argument(
'--ha',
action='store_true',
help=_("Create a highly available router")
)
+ ha_group.add_argument(
+ '--no-ha',
+ action='store_true',
+ help=_("Create a legacy router")
+ )
parser.add_argument(
'--description',
metavar='<description>',
@@ -216,7 +222,9 @@ class CreateRouter(command.ShowOne):
attrs = _get_attrs(self.app.client_manager, parsed_args)
if parsed_args.ha:
- attrs['ha'] = parsed_args.ha
+ attrs['ha'] = True
+ if parsed_args.no_ha:
+ attrs['ha'] = False
obj = client.create_router(**attrs)
display_columns, columns = _get_columns(obj)