Redfish metadata implementation

Joseph Reynolds jrey at linux.ibm.com
Tue Jan 21 04:38:43 AEDT 2020


On 1/20/20 4:07 AM, Ratan Gupta wrote:
>
> Hi James,
>
> I was looking at the current master metadata redfish url 
> implementation and seems that is not correct.
>
> Currently redfish/v1 and redfish/v1/$metadata is giving the same 
> service root data(service root).
>
> curl -k -H "X-Auth-Token: $bmc_token" -X GEThttps://${bmc}/redfish/v1
> curl -k -H "X-Auth-Token: $bmc_token" -X GEThttps://${bmc}/redfish/v1/$metadata

I wonder if  $metadata  is being expanded as a shell variable.  The 
shell expands un-set variables to the empty string and you get the 
result you are seeing.  If this is happening to you, you could quote 
your command in one of these ways (but be careful not to quote the 
${bmc} variable):

curl -k -H "X-Auth-Token: $bmc_token" -X GEThttps://${bmc}/redfish/v1/\$metadata

-or-

curl -k -H "X-Auth-Token: $bmc_token" -X GEThttps://${bmc}'/redfish/v1/$metadata'


Also, note that URI /redfish/v1/$metadata does not require 
authentication, so the X-Auth-Token header is not needed.

- Joseph

> I am hoping the redfish/v1/$metadata should return the following data
>
> https://github.com/openbmc/bmcweb/blob/master/static/redfish/v1/%24metadata/index.xml
>
> Ratan
>
>
>



More information about the openbmc mailing list