1414
1515"""Versions Action Implementation"""
1616
17- import os_service_types
1817from osc_lib .command import command
1918
2019from openstackclient .i18n import _
@@ -67,7 +66,8 @@ def take_action(self, parsed_args):
6766 session = self .app .client_manager .session
6867 version_data = session .get_all_version_data (
6968 interface = interface ,
70- region_name = parsed_args .region_name )
69+ region_name = parsed_args .region_name ,
70+ service_type = parsed_args .service )
7171
7272 columns = [
7373 "Region Name" ,
@@ -83,22 +83,10 @@ def take_action(self, parsed_args):
8383 if status :
8484 status = status .upper ()
8585
86- service = parsed_args .service
87- if service :
88- # Normalize service type argument to official type
89- service_type_manager = os_service_types .ServiceTypes ()
90- service = service_type_manager .get_service_type (service )
91-
9286 versions = []
9387 for region_name , interfaces in version_data .items ():
9488 for interface , services in interfaces .items ():
9589 for service_type , service_versions in services .items ():
96- if service and service != service_type :
97- # TODO(mordred) Once there is a version of
98- # keystoneauth that can do this filtering
99- # before making all the discovery calls, switch
100- # to that.
101- continue
10290 for data in service_versions :
10391 if status and status != data ['status' ]:
10492 continue
0 commit comments