HewlettPackard / python-ilorest-library

Python library for interacting with devices which support a Redfish Service
Apache License 2.0
181 stars 89 forks source link

Can't set retries parameter for RedfishClient #155

Closed 0megam closed 3 months ago

0megam commented 6 months ago

Then I tried to set retries parameter to redfish.RedfishClient() as explained in https://github.com/HewlettPackard/python-ilorest-library/blob/master/docs/Advanced-Usage.rest I'm getting following error:

Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/bender/plugins/workflows/workflows.py", line 127, in testo
    ilo=iloactions('CUT', 'CUT', 'https://CUT')
  File "/some/path/to/actions.py", line 15, in __init__
    self.redfishobj = RedfishClient(base_url=base_url, username=username, password=password, timeout=timeout, retries=5)
  File "/opt/venv/lib/python3.10/site-packages/redfish/rest/v1.py", line 618, in __init__
    super(RedfishClient, self).__init__(**kwargs)
  File "/opt/venv/lib/python3.10/site-packages/redfish/rest/v1.py", line 272, in __init__
    super(RestClient, self).__init__(
  File "/opt/venv/lib/python3.10/site-packages/redfish/rest/v1.py", line 85, in __init__
    self._build_connection(**client_kwargs)
  File "/opt/venv/lib/python3.10/site-packages/redfish/rest/v1.py", line 116, in _build_connection
    self.connection = HttpConnection(base_url, self._cert_data, **conn_kwargs)
  File "/opt/venv/lib/python3.10/site-packages/redfish/rest/connections.py", line 140, in __init__
    self._init_connection()
  File "/opt/venv/lib/python3.10/site-packages/redfish/rest/connections.py", line 195, in _init_connection
    http = PoolManager(cert_reqs=cert_reqs, maxsize=50, retries=retries, **self._connection_properties)
TypeError: urllib3.poolmanager.PoolManager() got multiple values for keyword argument 'retries'
rajeevkallur commented 3 months ago

@0megam , This is fixed in version 4.9 which will be released in a week.