From e04f4a618799b632f131074c67d21cc118f7769e Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 15 Jul 2021 20:42:10 +0900 Subject: [PATCH] Compute HA: Remove workaround for Newton and older This change removes workaround in check-run-nova-compute script which was implemented for ancient versions. Change-Id: I9250953a179ba9a81b0289bc5e1239c4e0e54784 --- scripts/check-run-nova-compute | 40 +++++----------------------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/scripts/check-run-nova-compute b/scripts/check-run-nova-compute index 6227c83306..ccae3f6bb1 100755 --- a/scripts/check-run-nova-compute +++ b/scripts/check-run-nova-compute @@ -119,41 +119,11 @@ def create_nova_connection(options): region = None nova_versions = [ "2.23", "2" ] for version in nova_versions: - clientargs = inspect.getargspec(client.Client).varargs - # Some versions of Openstack prior to Ocata only - # supported positional arguments for username, - # password, and tenant. - # - # Versions since Ocata only support named arguments. - # - # So we need to use introspection to figure out how to - # create a Nova client. - # - # Happy days - # - if clientargs: - # OSP < Ocata - # ArgSpec(args=['version', 'username', 'password', 'project_id', 'auth_url'], - # varargs=None, - # keywords='kwargs', defaults=(None, None, None, None)) - nova = client.Client(version, - None, # User - None, # Password - None, # Tenant - None, # Auth URL - insecure=options["insecure"], - region_name=region, - session=keystone_session, auth=keystone_auth, - http_log_debug="verbose" in options, - endpoint_type=nova_endpoint_type) - else: - # OSP >= Ocata - # ArgSpec(args=['version'], varargs='args', keywords='kwargs', defaults=None) - nova = client.Client(version, - region_name=region, - session=keystone_session, auth=keystone_auth, - http_log_debug="verbose" in options, - endpoint_type=nova_endpoint_type) + nova = client.Client(version, + region_name=region, + session=keystone_session, auth=keystone_auth, + http_log_debug="verbose" in options, + endpoint_type=nova_endpoint_type) try: nova.hypervisors.list()