Redfish metadata implementation

Joseph Reynolds jrey at
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


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
> Ratan

More information about the openbmc mailing list