Merge "Compute HA: Remove workaround for Newton and older"

changes/18/799318/6
Zuul 1 year ago committed by Gerrit Code Review
commit 363b5791e1
  1. 40
      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()

Loading…
Cancel
Save