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

v3.2.2 can not create redfish client #117

Closed nathanlin24 closed 2 years ago

nathanlin24 commented 2 years ago

Hello,

It's observed on the released version 3.2.2, I'm not able to create a redfish client object from the class. Please see snippet below for the exception. It seems to be failing for auth and cert, Can you please take a look and let me know input I'm missing?

# pip list
Package                Version
---------------------- ---------
certifi                2021.5.30
charset-normalizer     2.0.4
decorator              5.0.9
idna                   3.2
ipaddress              1.0.23
jsonpatch              1.32
jsonpath-rw            1.4.0
jsonpointer            2.1
pip                    21.2.4
ply                    3.11
python-ilorest-library 3.2.2
requests               2.26.0
setuptools             56.0.0
six                    1.16.0
tabulate               0.8.9
urllib3                1.26.6

# python
Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from redfish import RedfishClient
>>> REDFISHOBJ = RedfishClient(base_url="https://100.100.100.100, username="administrator", password='password')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\linna\git\EL8000t_firmware_downgrade\Firmware_update_batch\fw_env\lib\site-packages\redfish\rest\v1.py", line 481, in __init__
    super(RedfishClient, self).__init__(default_prefix='/redfish/v1/', is_redfish=True,
  File "C:\Users\linna\git\EL8000t_firmware_downgrade\Firmware_update_batch\fw_env\lib\site-packages\redfish\rest\v1.py", line 211, in __init__
    self.auth_type = self._get_auth_type(auth, ca_cert_data=ca_cert_data, **client_kwargs)
  File "C:\Users\linna\git\EL8000t_firmware_downgrade\Firmware_update_batch\fw_env\lib\site-packages\redfish\rest\v1.py", line 232, in _get_auth_type
    if 'cert_file' in ca_cert_data and ca_cert_data['cert_file']:
TypeError: argument of type 'NoneType' is not iterable
>>>

I also tried with release v3.2.1 did not observe this issue on v3.2.1. See below snippet. Thanks.

# pip list
Package                Version
---------------------- ---------
certifi                2021.5.30
charset-normalizer     2.0.4
decorator              5.0.9
idna                   3.2
ipaddress              1.0.23
jsonpatch              1.32
jsonpath-rw            1.4.0
jsonpointer            2.1
pip                    21.2.4
ply                    3.11
python-ilorest-library 3.2.1
requests               2.26.0
setuptools             56.0.0
six                    1.16.0
tabulate               0.8.9
urllib3                1.26.6

# python
Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from redfish import RedfishClient
>>> REDFISHOBJ = RedfishClient(base_url="https://100.100.100.100", username="administrator", password='password')
>>>
rajeevkallur commented 2 years ago

This is fixed in 3.3.0.0 version which will be released soon. You can continue to use 3.2.1 until then.

nathanlin24 commented 2 years ago

Okay thanks.

rdbreak commented 2 years ago

@rajeevkallur is there an ETA on 3.3.0 release?