Return-Path: Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=jrey@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 481f6K5HhyzDqg7 for ; Tue, 21 Jan 2020 04:38:49 +1100 (AEDT) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00KHbKlT061388; Mon, 20 Jan 2020 12:38:46 -0500 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 2xmg5shfuj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jan 2020 12:38:45 -0500 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 00KHc2bL024570; Mon, 20 Jan 2020 17:38:45 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma04dal.us.ibm.com with ESMTP id 2xksn6hws4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jan 2020 17:38:44 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 00KHci3Z54133048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 20 Jan 2020 17:38:44 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 27B37AE060; Mon, 20 Jan 2020 17:38:44 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EC875AE05C; Mon, 20 Jan 2020 17:38:43 +0000 (GMT) Received: from demeter.rchland.ibm.com (unknown [9.10.254.252]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTPS; Mon, 20 Jan 2020 17:38:43 +0000 (GMT) Subject: Re: Redfish metadata implementation To: Ratan Gupta , "openbmc@lists.ozlabs.org" , james.feist@linux.intel.com References: <20116922-06a2-897c-55ba-d037675ea52e@linux.vnet.ibm.com> From: Joseph Reynolds Message-ID: Date: Mon, 20 Jan 2020 11:38:43 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20116922-06a2-897c-55ba-d037675ea52e@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-01-20_07:2020-01-20, 2020-01-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 suspectscore=0 bulkscore=0 phishscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 malwarescore=0 mlxlogscore=999 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001200149 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 17:38:50 -0000 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 > > >