From ca5e8e6c8540e457a620cc90d321a08e7417de32 Mon Sep 17 00:00:00 2001 From: Huanxuan Ao Date: Wed, 15 Jun 2016 13:57:39 +0800 Subject: Add default IP version and fix help messages for "ip availability list" There was not a default IP version in "ip availability list" command, if we used this command without "--ip-version" option, the output was different from the outputs with the option "--ip-version 4" and "--ip-version 6" and it is not right. This patch add default IP version (default is 4) in ``ip availability list`` command and make this command work properly without ``--ip-version`` option. And also fix the help message. Change-Id: Idc08ab6eaf05946eb2ab59bfb3d4497a383d987d Closes-Bug: #1592761 --- openstackclient/network/v2/ip_availability.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'openstackclient/network') diff --git a/openstackclient/network/v2/ip_availability.py b/openstackclient/network/v2/ip_availability.py index d429e86c..1d7b2aed 100644 --- a/openstackclient/network/v2/ip_availability.py +++ b/openstackclient/network/v2/ip_availability.py @@ -41,15 +41,17 @@ class ListIPAvailability(command.Lister): parser.add_argument( '--ip-version', type=int, + default=4, choices=[4, 6], metavar='', dest='ip_version', - help=_("List IP availability of given IP version networks"), + help=_("List IP availability of given IP version " + "networks (default is 4)"), ) parser.add_argument( '--project', metavar='', - help=_("List IP availability of given project"), + help=_("List IP availability of given project (name or ID)"), ) identity_common.add_project_domain_option_to_parser(parser) return parser -- cgit v1.2.1