Local Redfish does not correctly transition between bytes and string in Python 3
See original GitHub issueHi,
I’m trying to use this library for monitoring the health of some servers I’m using. I began adapting the simple redfish-quickstart file that’s available under the examples directory. As per instructions, I also have hprest_chif.so available on my system. The relevant part of the script is below:
import redfish
# When running on the server locally use the following commented values
iLO_host = "blobstore://."
iLO_account = "None"
iLO_password = "None"
redfish_obj = redfish.redfish_client(base_url=iLO_host,
username=iLO_host,
password=iLO_password)
redfish_obj.login(auth="session")
When I try to run this with python3.6, I get the following errors:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/redfish/rest/v1.py", line 955, in __init__
password=password)
File "/usr/lib/python3.6/site-packages/redfish/hpilo/risblobstore2.py", line 858, in initializecreds
dll = BlobStore2.gethprestchifhandle()
File "/usr/lib/python3.6/site-packages/redfish/hpilo/risblobstore2.py", line 837, in gethprestchifhandle
raise ChifDllMissingError(excp)
redfish.hpilo.risblobstore2.ChifDllMissingError: '_Environ' object has no attribute 'has_key'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "check_memory_status.py", line 16, in <module>
password=iLO_password)
File "/usr/lib/python3.6/site-packages/redfish/rest/v1.py", line 1226, in get_client_instance
is_redfish=is_redfish, cache=cache, proxy=proxy)
File "/usr/lib/python3.6/site-packages/redfish/rest/v1.py", line 966, in __init__
if excp.message == 'chif':
AttributeError: 'ChifDllMissingError' object has no attribute 'message'
When I try running with python 2.7:
Traceback (most recent call last):
File "check_memory_status.py", line 16, in <module>
password=iLO_password)
File "/usr/lib/python2.7/site-packages/redfish/rest/v1.py", line 1226, in get_client_instance
is_redfish=is_redfish, cache=cache, proxy=proxy)
File "/usr/lib/python2.7/site-packages/redfish/rest/v1.py", line 955, in __init__
password=password)
File "/usr/lib/python2.7/site-packages/redfish/hpilo/risblobstore2.py", line 858, in initializecreds
dll = BlobStore2.gethprestchifhandle()
File "/usr/lib/python2.7/site-packages/redfish/hpilo/risblobstore2.py", line 835, in gethprestchifhandle
BlobStore2.setglobalhprestchifrandnumber(libhandle)
File "/usr/lib/python2.7/site-packages/redfish/hpilo/risblobstore2.py", line 846, in setglobalhprestchifrandnumber
libbhndl.updaterandval.argtypes = [c_ushort]
File "/usr/lib64/python2.7/ctypes/__init__.py", line 373, in __getattr__
func = self.__getitem__(name)
File "/usr/lib64/python2.7/ctypes/__init__.py", line 378, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /lib64/hprest_chif.so: undefined symbol: updaterandval
Remote connections (using an explicit IP address) to connect to the iLO works fine but I want to avoid using hardcoded IPs and account credentials in my script. Any help to fix these issues would be greatly appreciated.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Converting integer to byte string problem in python 3
I have a library function that is failing because I cannot seem to properly convert an integer to a proper byte string except...
Read more >Overview – RESTful Interface Tool 3.2.2 User Guide
An issue with downloading AHS when iLOREST is running locally on a server. The privilege modification of an iLO user account that was...
Read more >Common migration problems — Supporting Python 3
So taking one character of a string will return a one-character long string, but taking one byte of a bytes object will return...
Read more >oVirt 4.4.0 Release Notes
oVirt is a free open-source virtualization solution for your entire enterprise.
Read more >Server Configuration Profiles - Reference Guide - Dell
The information in this publication is provided “as is.” Dell Inc. makes no representations or warranties of any kind with respect to the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rirze A fix for the local python 3 issues have been committed. Please pull the master and see if that fixes your issue. https://github.com/HewlettPackard/python-ilorest-library/commit/1b02fad86ebe6a8e681d791fe7838104f2a6d371
@rirze Yes. We are working on a fix now. I will update the issue once it has been addressed. In the meantime, if you need it to work now, can you try running it with the latest Python 2?