diff options
| author | Jenkins <jenkins@review.openstack.org> | 2017-04-05 17:00:49 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2017-04-05 17:00:49 +0000 |
| commit | 27f96a3a7a5515ff621300a917872b5ec62f41de (patch) | |
| tree | 51cd6f8e740f2495ddc2899a230a475c8d28e02f /openstackclient/network | |
| parent | 65b61d3a9c08a43cc0746ac17fec00682a720913 (diff) | |
| parent | 53ba05325ad5e580e62addb7f4b405b96ad01d80 (diff) | |
| download | python-openstackclient-27f96a3a7a5515ff621300a917872b5ec62f41de.tar.gz | |
Merge "Enable to create legacy router"
Diffstat (limited to 'openstackclient/network')
| -rw-r--r-- | openstackclient/network/v2/router.py | 12 |
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) |
