Browse Source

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
changes/64/706764/1
Dmitry Tantsur 1 week ago
parent
commit
974838e37e
2 changed files with 12 additions and 7 deletions
  1. +7
    -7
      ironic_ui/api/ironic.py
  2. +5
    -0
      releasenotes/notes/get-client-e30e3b05eb9901ca.yaml

+ 7
- 7
ironic_ui/api/ironic.py 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):

+ 5
- 0
releasenotes/notes/get-client-e30e3b05eb9901ca.yaml View File

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

Loading…
Cancel
Save