-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
None
-
None
-
None
Hello,
'Get Data' item code have bugs:
In apiLogout function lines should be changed ( changed line starts with comment)
1. from:
url = encodeURI(ilo.session_url);
to:
url = encodeURI(ilo.params.ilo_url.replace(/\/$/, "") + ilo.session_url);
2. from:
if (request.getStatus() != 200) {
to:
if (request.getStatus() != 204) {
Without these changes apiLogout function always will throw error, especially 1st change. Regarding 2nd it may depend on actuall HP system - better to include all 20* return codes.
Even worse - after several times of usage as sessions will not be deleted it can hit maximum number of connections https://developer.hpe.com/blog/managing-ilo-sessions-with-redfish/
Next just suggestions;
ilo.params.ilo_url should be stored without trailing '/' and relative urls used with starting '/' , as every redfish documentation urls shows this way and ilo.session_url is returned with starting '/'.