From 181f14319bac0917fcbe5f232cae0603c6939d10 Mon Sep 17 00:00:00 2001
From: Matt Riedemann <mriedem.os@gmail.com>
Date: Fri, 8 Jun 2018 10:13:10 -0400
Subject: [PATCH] Add note about version 2.5 when listing servers using --ip6

The --ip6 filter when listing servers as a non-admin user
only applies when also using --os-compute-api-microversion
2.5 or greater. This change simply adds a note about that in
the --ip6 option help text.

We could probably get more sophisticated by trying to determine
if the user has the admin role or not and if not, and using --ip6
without microversion >= 2.5, we could error out, but that seems
excessive at this point.

Change-Id: I665c64e0bdac04c695fa119a479df43f70b0fa62
Story: #2002184
Task: #20057
---
 openstackclient/compute/v2/server.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py
index c80b5a3c25..c414f7e18e 100644
--- a/openstackclient/compute/v2/server.py
+++ b/openstackclient/compute/v2/server.py
@@ -977,7 +977,9 @@ class ListServer(command.Lister):
         parser.add_argument(
             '--ip6',
             metavar='<ip-address-regex>',
-            help=_('Regular expression to match IPv6 addresses'),
+            help=_('Regular expression to match IPv6 addresses. Note '
+                   'that this option only applies for non-admin users '
+                   'when using ``--os-compute-api-version`` 2.5 or greater.'),
         )
         parser.add_argument(
             '--name',