Fix baremetal introspection client creation
We were using deprecated arguments to create the client, which have been removed in I9df8296ddc1b41cde22ff8b0f26d73c4408741ce. Also make explicit the keystoneauth1 requirement - the library is already used in other parts of the code but wasn't explicitly referenced. Change-Id: I2314020a6414f90d964f7be474668658913e61b9 Closes-Bug: #1747057
This commit is contained in:
parent
0ec4793c7e
commit
4625b93066
|
@ -25,3 +25,4 @@ paramiko>=2.0.0 # LGPLv2.1+
|
|||
netaddr>=0.7.18 # BSD
|
||||
python-zaqarclient>=1.0.0 # Apache-2.0
|
||||
python-keystoneclient>=3.8.0 # Apache-2.0
|
||||
keystoneauth1>=3.3.0 # Apache-2.0
|
||||
|
|
|
@ -19,6 +19,8 @@ from glanceclient.v2 import client as glanceclient
|
|||
from heatclient.v1 import client as heatclient
|
||||
import ironic_inspector_client
|
||||
from ironicclient.v1 import client as ironicclient
|
||||
from keystoneauth1 import session as ks_session
|
||||
from keystoneauth1.token_endpoint import Token
|
||||
from mistral_lib import actions
|
||||
from mistralclient.api import client as mistral_client
|
||||
from novaclient.client import Client as nova_client
|
||||
|
@ -86,11 +88,12 @@ class TripleOAction(actions.Action):
|
|||
bmi_endpoint = keystone_utils.get_endpoint_for_project(
|
||||
context, 'ironic-inspector')
|
||||
|
||||
auth = Token(endpoint=bmi_endpoint.url, token=context.auth_token)
|
||||
|
||||
return ironic_inspector_client.ClientV1(
|
||||
api_version='1.2',
|
||||
inspector_url=bmi_endpoint.url,
|
||||
region_name=bmi_endpoint.region,
|
||||
auth_token=context.auth_token
|
||||
session=ks_session.Session(auth)
|
||||
)
|
||||
|
||||
def get_image_client(self, context):
|
||||
|
|
Loading…
Reference in New Issue