summaryrefslogtreecommitdiff
path: root/redfish-core/lib/pcie.hpp
diff options
context:
space:
mode:
authorLakshmi Yadlapati <lakshmiy@us.ibm.com>2023-04-07 17:14:37 +0300
committerLakshmi Yadlapati <lakshmiy@us.ibm.com>2023-05-12 21:32:53 +0300
commitbad2c4a9a1095e5e41959bfc5bc56102bbd2a79a (patch)
tree6ee7c6e6b7e26d8f4c643eaeffc5bf82cbd81985 /redfish-core/lib/pcie.hpp
parentb84e729dfcc428c2696b86b09e736ecdd10db2ff (diff)
downloadbmcweb-bad2c4a9a1095e5e41959bfc5bc56102bbd2a79a.tar.xz
Remove "Manufacturer" from PCIeDevice interface
Remove Manufacturer from the PCIeDevice's PCIeInterface and fix the following Redfish validator error: ERROR - Manufacturer not defined in Complex PCIeInterface PCIeDevice.v1_3_0.PCIeInterface (check version, spelling and casing) This error is because there is no ["PCIeInterface"]["Manufacturer"] at https://redfish.dmtf.org/schemas/v1/PCIeDevice.v1_11_0.json. "Manufacturer" is already part of the root PCIeDevice and is implemented on line 219. On the backend "Manufacturer" is already part of Asset interface so remove it from PCIeDevice interface in peci-pcie and phosphor-dbus-interface. phosphor-dbus-interfaces commit: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/61738 peci-pcie commit: https://gerrit.openbmc.org/c/openbmc/peci-pcie/+/62256 Tested: ``` curl -k https://$bmc/redfish/v1/Systems/system/PCIeDevices/pcie_card10 { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card10", "@odata.type": "#PCIeDevice.v1_9_0.PCIeDevice", "Id": "pcie_card10", "Manufacturer": "", "Model": "6B87", "Name": "PCIe Device", "PCIeFunctions": { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card10/PCIeFunctions" }, "PCIeInterface": { "LanesInUse": 16, "PCIeType": "Gen4" }, "PartNumber": "03FL204", "SerialNumber": "YA31UF07200Z", "Slot": { "Location": { "PartLocation": { "ServiceLabel": "U78DA.ND0.WZS003T-P0-C10" } } }, "SparePartNumber": "03FL205" } ``` Change-Id: I860bf60f6fa3cc5d6b57f945d781e7dcafc17d7f Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
Diffstat (limited to 'redfish-core/lib/pcie.hpp')
-rw-r--r--redfish-core/lib/pcie.hpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index 4ea2dbc797..45625f7f0b 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -285,7 +285,6 @@ inline void addPCIeDeviceProperties(
crow::Response& resp, const std::string& pcieDeviceId,
const dbus::utility::DBusPropertiesMap& pcieDevProperties)
{
- const std::string* manufacturer = nullptr;
const std::string* deviceType = nullptr;
const std::string* generationInUse = nullptr;
const int64_t* lanesInUse = nullptr;
@@ -293,7 +292,7 @@ inline void addPCIeDeviceProperties(
const bool success = sdbusplus::unpackPropertiesNoThrow(
dbus_utils::UnpackErrorPrinter(), pcieDevProperties, "DeviceType",
deviceType, "GenerationInUse", generationInUse, "LanesInUse",
- lanesInUse, "Manufacturer", manufacturer);
+ lanesInUse);
if (!success)
{
@@ -330,11 +329,6 @@ inline void addPCIeDeviceProperties(
resp.jsonValue["PCIeInterface"]["LanesInUse"] = *lanesInUse;
}
- if (manufacturer != nullptr)
- {
- resp.jsonValue["PCIeInterface"]["Manufacturer"] = *manufacturer;
- }
-
resp.jsonValue["PCIeFunctions"]["@odata.id"] = crow::utility::urlFromPieces(
"redfish", "v1", "Systems", "system", "PCIeDevices", pcieDeviceId,
"PCIeFunctions");