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

Logout doesn't work #114

Closed JohnAZoidberg closed 2 years ago

JohnAZoidberg commented 2 years ago

I tried the upload_firmware_ilo_repository.py script with SYSTEM_URL = "https://localhost:8443".

I need to specify the port because I'm tunneling through a jumphost.

Upload works! But logout fails:

root@zbook-nix:/# /redfish/upload_firmware_ilo_repository.py 
Logged in to https://localhost:8443
        Found resource directory at /redfish/v1/resourcedirectory

Upload complete!

Traceback (most recent call last):
  File "/redfish/upload_firmware_ilo_repository.py", line 114, in <module>
    REDFISHOBJ.logout()
  File "/usr/local/lib/python3.9/site-packages/redfish/rest/v1.py", line 347, in logout
    resp = self.delete(self.session_location)
  File "/usr/local/lib/python3.9/site-packages/redfish/rest/v1.py", line 183, in delete
    return self.connection.rest_request(path, method='DELETE',
  File "/usr/local/lib/python3.9/site-packages/redfish/rest/connections.py", line 237, in rest_request
    resp = self._conn(method, reqfullpath, **request_args)
  File "/usr/local/lib/python3.9/site-packages/urllib3/request.py", line 74, in request
    return self.request_encode_url(
  File "/usr/local/lib/python3.9/site-packages/urllib3/request.py", line 96, in request_encode_url
    return self.urlopen(method, url, **extra_kw)
  File "/usr/local/lib/python3.9/site-packages/urllib3/poolmanager.py", line 361, in urlopen
    u = parse_url(url)
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/url.py", line 394, in parse_url
    return six.raise_from(LocationParseError(source_url), None)
  File "<string>", line 3, in raise_from
urllib3.exceptions.LocationParseError: Failed to parse: https://localhost:8443https:/localhost/redfish/v1/SessionService/Sessions/administrator000000003a5016e69c6a7e98/
rajeevkallur commented 2 years ago

This is fixed

JohnAZoidberg commented 2 years ago

Oh really? In which version/commit? I ran into this again this week and tried to fix it: #134

I'm using the latest version on pip: 3.5.0.2 Could you please publish the new releases to pip?