summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-11-02 18:48:06 +0000
committerGerrit Code Review <review@openstack.org>2018-11-02 18:48:06 +0000
commit594eeae2dec0f7a43952db22c574bd0726a9dbd5 (patch)
tree7b17a557341b453cac246ed6ac7896601f9c6c84
parent9ab8143179783753721940a8d43a808ac2e2dd06 (diff)
parentdfd37a2e6e49fc547e7a2e8f7840561ece8ff46f (diff)
downloadpython-openstackclient-594eeae2dec0f7a43952db22c574bd0726a9dbd5.tar.gz
Merge "Make use of keystoneauth service-type filtering for versions"
-rw-r--r--lower-constraints.txt2
-rw-r--r--openstackclient/common/versions.py16
-rw-r--r--requirements.txt2
3 files changed, 4 insertions, 16 deletions
diff --git a/lower-constraints.txt b/lower-constraints.txt
index db92fef3..acd11d32 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -38,7 +38,7 @@ jmespath==0.9.0
jsonpatch==1.16
jsonpointer==1.13
jsonschema==2.6.0
-keystoneauth1==3.4.0
+keystoneauth1==3.6.2
kombu==4.0.0
linecache2==1.0.0
MarkupSafe==1.0
diff --git a/openstackclient/common/versions.py b/openstackclient/common/versions.py
index 6a93d300..3c267bfe 100644
--- a/openstackclient/common/versions.py
+++ b/openstackclient/common/versions.py
@@ -14,7 +14,6 @@
"""Versions Action Implementation"""
-import os_service_types
from osc_lib.command import command
from openstackclient.i18n import _
@@ -67,7 +66,8 @@ class ShowVersions(command.Lister):
session = self.app.client_manager.session
version_data = session.get_all_version_data(
interface=interface,
- region_name=parsed_args.region_name)
+ region_name=parsed_args.region_name,
+ service_type=parsed_args.service)
columns = [
"Region Name",
@@ -83,22 +83,10 @@ class ShowVersions(command.Lister):
if status:
status = status.upper()
- service = parsed_args.service
- if service:
- # Normalize service type argument to official type
- service_type_manager = os_service_types.ServiceTypes()
- service = service_type_manager.get_service_type(service)
-
versions = []
for region_name, interfaces in version_data.items():
for interface, services in interfaces.items():
for service_type, service_versions in services.items():
- if service and service != service_type:
- # TODO(mordred) Once there is a version of
- # keystoneauth that can do this filtering
- # before making all the discovery calls, switch
- # to that.
- continue
for data in service_versions:
if status and status != data['status']:
continue
diff --git a/requirements.txt b/requirements.txt
index 205d4e64..78c10b44 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -6,7 +6,7 @@ six>=1.10.0 # MIT
Babel!=2.4.0,>=2.3.4 # BSD
cliff!=2.9.0,>=2.8.0 # Apache-2.0
-keystoneauth1>=3.4.0 # Apache-2.0
+keystoneauth1>=3.6.2 # Apache-2.0
openstacksdk>=0.17.0 # Apache-2.0
osc-lib>=1.10.0 # Apache-2.0
oslo.i18n>=3.15.3 # Apache-2.0