Skip to content

Logging out fails when accessing iLO7 in IPv6 #176

@NoriakiNagao

Description

@NoriakiNagao

I can login and get, but failed to logout.
DL380Gen12
iLO 1.17
python-ilorest-library: 7.0.0.0

Code to reproduce:
from redfish import RedfishClient
HOSTNAME = "https://[FE80::7EA6:2AFF:FE6C:4D48]"
USERNAME = "Administrator"
PASSWORD = "XXXXXXX"
URI = "/redfish/v1/systems/1/"
REDFISH_OBJ = RedfishClient(base_url=HOSTNAME, username=USERNAME, password=PASSWORD)
REDFISH_OBJ.login(auth="session")
response = REDFISH_OBJ.get(URI)
print(response.dict["Model"])
REDFISH_OBJ.logout()

Error:
Traceback (most recent call last):
File "C:\Users\XXXXXX\AppData\Local\Programs\Python\Python313\Lib\site-packages\urllib3\util\url.py", line 423, in parse_url
host, port = _HOST_PORT_RE.match(host_port).groups() # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'groups'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\XXXXXX\Documents\rest_ipv6\client.py", line 17, in
REDFISH_OBJ.logout()
~~~~~~~~~~~~~~~~~~^^
File "C:\Users\XXXXXX\AppData\Local\Programs\Python\Python313\Lib\site-packages\redfish\rest\v1.py", line 430, in logout
resp = self.delete(self.session_location)
File "C:\Users\XXXXXX\AppData\Local\Programs\Python\Python313\Lib\site-packages\redfish\rest\v1.py", line 227, in delete
return self.connection.rest_request(path, method="DELETE", headers=self._get_req_headers(headers=headers))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\XXXXXX\AppData\Local\Programs\Python\Python313\Lib\site-packages\redfish\rest\connections.py", line 313, in rest_request
resp = self._conn(method, reqfullpath, **request_args)
File "C:\Users\XXXXXX\AppData\Local\Programs\Python\Python313\Lib\site-packages\urllib3_request_methods.py", line 135, in request
return self.request_encode_url(
~~~~~~~~~~~~~~~~~~~~~~~^
method,
^^^^^^^
...<3 lines>...
**urlopen_kw,
^^^^^^^^^^^^^
)
^
File "C:\Users\XXXXXX\AppData\Local\Programs\Python\Python313\Lib\site-packages\urllib3_request_methods.py", line 182, in request_encode_url
return self.urlopen(method, url, **extra_kw)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\XXXXXX\AppData\Local\Programs\Python\Python313\Lib\site-packages\urllib3\poolmanager.py", line 434, in urlopen
u = parse_url(url)
File "C:\Users\XXXXXX\AppData\Local\Programs\Python\Python313\Lib\site-packages\urllib3\util\url.py", line 449, in parse_url
raise LocationParseError(source_url) from e
urllib3.exceptions.LocationParseError: Failed to parse: https://[FE80::7EA6:2AFF:FE6C:4D48]https:/[fe80::7ea6:2aff:fe6c:4d48]/redfish/v1/SessionService/Sessions/administrator00000000696889082e084da

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions