Skip to content
Commit 043360d0 authored by Shantappa Teekappanavar's avatar Shantappa Teekappanavar Committed by Ed Tanous
Browse files

Populate cable properties if length is NaN

Cable Length property value is NaN by default. The current
implementation ignores processing other remaining Cable properties
if the length is NaN. Per Ed's comment here we need to
ignore if length is NaN and continue to process remaining properties:
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/50265/4..7/redfish-core\
/lib/cable.hpp#b51

Testing:
1. Validator test not done, assumed it is OK since it is a minor change
   in the code logic.

2. curl testing:
$ curl -k https://user:password@host:18080/redfish/v1/Cables/dp0_cable1


{
  "@odata.id": "/redfish/v1/Cables/dp0_cable1",
  "@odata.type": "#Cable.v1_0_0.Cable",
  "CableType": "",
  "Id": "dp0_cable1",
  "Name": "Cable"
}

Signed-off-by: default avatarShantappa Teekappanavar <shantappa.teekappanavar@ibm.com>
Change-Id: If73828484d91bbf2eee45a31973c825bab008ba4
parent 5b378546
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment