HewlettPackard / python-ilorest-library

Python library for interacting with devices which support a Redfish Service
Apache License 2.0
189 stars 92 forks source link

Base.1.4.NoValidSession with X-Auth-Token #101

Closed samiron7567 closed 3 years ago

samiron7567 commented 3 years ago

With reference to posted this morning, I am seeking help with the session based login.

Same session token working with RestAPI however showing NoValidSession while using RedfishClient. I tried putting "Location" as well that is received via session header, but no luck.

request_headers = {'Content-Type' : 'application/json; charset=utf-8', 'OData-Version': '4.0', 'Location': <LOCATION>, 'X-Auth-Token' : <TOKEN>}

RedfishClient(base_url=SYSTEM_URL, headers=request_headers)

This is what I am getting every time with a valid token

### RedFish Client Method ###
{
    "error": {
        "@Message.ExtendedInfo": [
            {
                "MessageId": "Base.1.4.NoValidSession"
            }
        ],
        "code": "iLO.0.10.ExtendedInfo",
        "message": "See @Message.ExtendedInfo for more information."
    }
}