Repair creating an ironicclient instance

Session is now required and can only be automatically created via
client.get_client. Switch to using get_client.

Change-Id: I0db7a95c4a99fe4157b3623a14135eb7b5dd69d9
(cherry picked from commit 974838e37e)
This commit is contained in:
Dmitry Tantsur 2020-02-10 10:21:06 +01:00
parent efa4927bb7
commit 1f091c9205
2 changed files with 12 additions and 7 deletions

View File

@ -42,13 +42,13 @@ def ironicclient(request):
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', DEFAULT_CACERT)
ironic_url = base.url_for(request, IRONIC_CLIENT_CLASS_NAME)
return client.Client(1,
ironic_url,
os_ironic_api_version=DEFAULT_IRONIC_API_VERSION,
project_id=request.user.project_id,
token=request.user.token.id,
insecure=insecure,
cacert=cacert)
return client.get_client(1,
endpoint=ironic_url,
os_ironic_api_version=DEFAULT_IRONIC_API_VERSION,
project_id=request.user.project_id,
token=request.user.token.id,
insecure=insecure,
cacert=cacert)
def node_list(request):

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fixed ``_construct_http_client() takes at least 1 argument`` when creating
an ironic client instance.