Openbmc-test-automation checking service root URL "/"
Hello George:
I’m trying to test BMC with test_service_root.robot in openbmc-test-automation. However there’s a problem that robot tried to check “/”, “/redfish”, “/redfish/v1” URL in redfish, but it seems there’s no “/” as a service root node in bmcweb.
Should it exist? Do you have any suggestion about this?
Thanks
Best Regards,
David
Quoted 11 lines · David Wang (王振宇)
Hello George:
I’m trying to test BMC with test_service_root.robot in openbmc-test-automation.
However there’s a problem that robot tried to check “/”, “/redfish”, “/redfish/v1” URL in redfish,
but it seems there’s no “/” as a service root node in bmcweb.
Should it exist? Do you have any suggestion about this?
The Redfish spec (DSP0266, section "Service Root Request") specifies the service root as /redfish/v1. It also specifies the (in the "Protocol version" section) what GET /redfish should return. It does not specify what "/" should return.
To see supported URIs, see https://github.com/openbmc/bmcweb/blob/master/CMakeLists.txt
I understand GET requests for URI "/" to return the web app, if BMCWEB_ENABLE_STATIC_HOSTING is enabled and the web app is present. See https://github.com/openbmc/bmcweb/blob/master/CMakeLists.txt#L49
and https://github.com/openbmc/phosphor-webui
- Joseph
Quoted 6 lines
Thanks
Best Regards,
David
Quoted 5 lines · Joseph Reynolds
I understand GET requests for URI "/" to return the web app, if
BMCWEB_ENABLE_STATIC_HOSTINGis enabled and the web app is present. See
https://github.com/openbmc/bmcweb/blob/master/CMakeLists.txt#L49
and https://github.com/openbmc/phosphor-webui
Yup, the URI "/" is supposed to be the webui.
By default, it is phosphor-webui's login page, but be noted that it could be in a compressed format.
Yes, it works after I install "phosphor-webui" package in my bmc. And the BMCWEB_ENABLE_STATIC_HOSTING compile flag is enable in default in bmcweb.
Then I can get some binary response by running
curl -k https://${bmc}/ --output
and encoding by
curl -k -H "Accept-Encoding: gzip" https://${bmc}/ --output - | gunzip | more
then see the readable page info.
Thank you for the information, it's very helpful.
David
-----Original Message-----
From: 郁雷 <[email protected]>
Sent: Friday, May 15, 2020 10:29 AM
To: Joseph Reynolds <[email protected]>
Cc: David Wang (王振宇) <[email protected]>; [email protected]; [email protected]
Subject: Re: Openbmc-test-automation checking service root URL "/"
Quoted 6 lines · Joseph Reynolds
I understand GET requests for URI "/" to return the web app, if
BMCWEB_ENABLE_STATIC_HOSTINGis enabled and the web app is present. See
https://github.com/openbmc/bmcweb/blob/master/CMakeLists.txt#L49
and https://github.com/openbmc/phosphor-webui
Yup, the URI "/" is supposed to be the webui.
By default, it is phosphor-webui's login page, but be noted that it could be in a compressed format.