From 51266a5ed2b06754a4f92ba585fcff9cf16b0bdc Mon Sep 17 00:00:00 2001 From: Masayuki Igawa Date: Mon, 4 Feb 2019 17:13:56 +0900 Subject: [PATCH] Enable tempest run -l without credential setting This commit moves the admin credential code to the initialization phase of Manager class. This change enables to run `tempest run -l` without credential settings. We shouldn't require like that settings to just list tests. Change-Id: Ib202880e7039113a58dc1596de54be4167c5307d --- ironic_tempest_plugin/services/introspection_client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ironic_tempest_plugin/services/introspection_client.py b/ironic_tempest_plugin/services/introspection_client.py index 3b1a75bd..f82aed6a 100644 --- a/ironic_tempest_plugin/services/introspection_client.py +++ b/ironic_tempest_plugin/services/introspection_client.py @@ -17,13 +17,14 @@ from tempest import config CONF = config.CONF -ADMIN_CREDS = common_creds.get_configured_admin_credentials() class Manager(clients.Manager): def __init__(self, - credentials=ADMIN_CREDS, + credentials=None, api_microversions=None): + if not credentials: + credentials = common_creds.get_configured_admin_credentials() super(Manager, self).__init__(credentials) self.introspection_client = BaremetalIntrospectionClient( self.auth_provider,