stmcginnis/gofish

Reboot example does not work

lzap opened this issue · 3 comments

lzap commented

Hey,

trying out the reboot example but it does not work, it panics with panic: unable to execute request, no target provided. I am using the official emulator, but it looks like the client cannot even connect for some reason. Function CreateSession passes serviceroot.sessions string which is empty and tat causes the Post to panic.

What am I missing?

lzap commented

Hmmm it looks like the Redfish API does implement some session handling and the emulator apparently does not return this.

$ curl http://localhost:5000/redfish/v1/
{
    "@odata.context": "/redfish/v1/$metadata#ServiceRoot",
    "@odata.type": "#ServiceRoot.1.0.0.ServiceRoot",
    "@odata.id": "/redfish/v1/",
    "Id": "RootService",
    "Name": "Root Service",
    "RedfishVersion": "1.0.0",
    "UUID": "e280c305-0620-4499-b003-63850f6515f1",
    "Chassis": {
        "@odata.id": "/redfish/v1/Chassis"
    },
    "Managers": {
        "@odata.id": "/redfish/v1/Managers"
    },
    "TaskService": {
        "@odata.id": "/redfish/v1/TaskService"
    },
    "SessionService": {
        "@odata.id": "/redfish/v1/SessionService"
    },
    "AccountService": {
        "@odata.id": "/redfish/v1/AccountService"
    },
    "EventService": {
        "@odata.id": "/redfish/v1/EventService"
    },
    "Registries": {
        "@odata.id": "/redfish/v1/Registries"
    },
    "Systems": {
        "@odata.id": "/redfish/v1/Systems"
    },
    "CompositionService": {
        "@odata.id": "/redfish/v1/CompositionService"
    }
}
lzap commented

Interesting, when I try https://github.com/DMTF/Redfish-Mockup-Server it freezes.

lzap commented

Okay now I understand, when username/password is provided, a session needs to be estabilished. After I removed it, it works with emulators. Sorry for the noise.