summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-06-17 21:39:22 +0300
committerEd Tanous <ed@tanous.net>2022-06-17 22:15:45 +0300
commite825cbc8f967e54dfd6d911ebbbc6b2bfc7bc543 (patch)
tree734bf900181c81ab61a6a9e12a8c3b0f417e0f43
parente9dd1d31584b98689ceef4963067e6fc5709b1d3 (diff)
downloadbmcweb-e825cbc8f967e54dfd6d911ebbbc6b2bfc7bc543.tar.xz
Revert "Implement Redfish PCIeSlots schema"
This reverts commit 7691cc2f7ef1f0ceedf3de0554045a614f25776d. This causes validator failures ERROR - JsonSchemas: GET of resource at URI /redfish/v1/JsonSchemas returned HTTP 404. Check URI. ERROR - PCIeSlots: GET of resource at URI /redfish/v1/Chassis/motherboard/PCIeSlots returned HTTP 404. Check URI. ERROR - PCIeSlots: GET of resource at URI /redfish/v1/Chassis/chassis/PCIeSlots returned HTTP 404. Check URI. Change-Id: Ibcdf238a222da83127a89d8f38c8180501ffe882 Signed-off-by: Ed Tanous <edtanous@google.com>
-rw-r--r--Redfish.md9
-rw-r--r--redfish-core/include/redfish.hpp2
-rw-r--r--redfish-core/lib/chassis.hpp4
-rw-r--r--redfish-core/lib/pcie.hpp5
4 files changed, 3 insertions, 17 deletions
diff --git a/Redfish.md b/Redfish.md
index 694a587ef0..e964c2cc41 100644
--- a/Redfish.md
+++ b/Redfish.md
@@ -274,15 +274,6 @@ PowerControl Voltages PowerSupplies Redundancy
- MinNumNeeded
- MaxNumSupported
-#### /redfish/v1/Chassis/{ChassisId}/PCIeSlots/
-- Members
-
-#### /redfish/v1/Chassis/{ChassisId}/PCIeSlots/{SlotName}
-- HotPluggable
-- Lanes
-- PCIeType
-- SlotType
-
#### /redfish/v1/EventService/
##### EventService
- Actions
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
index 55c00f6619..b7dd3b3d79 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
@@ -31,7 +31,6 @@
#include "../lib/metric_report_definition.hpp"
#include "../lib/network_protocol.hpp"
#include "../lib/pcie.hpp"
-#include "../lib/pcie_slots.hpp"
#include "../lib/power.hpp"
#include "../lib/processor.hpp"
#include "../lib/redfish_sessions.hpp"
@@ -81,7 +80,6 @@ class RedfishService
requestRoutesManagerResetAction(app);
requestRoutesManagerResetActionInfo(app);
requestRoutesManagerResetToDefaultsAction(app);
- requestRoutesPCIeSlots(app);
requestRoutesChassisCollection(app);
requestRoutesChassis(app);
requestRoutesChassisResetAction(app);
diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp
index 11c04b4cd7..724d5f344c 100644
--- a/redfish-core/lib/chassis.hpp
+++ b/redfish-core/lib/chassis.hpp
@@ -397,10 +397,6 @@ inline void requestRoutesChassis(App& app)
"/redfish/v1/Chassis/" + chassisId + "/Sensors";
asyncResp->res.jsonValue["Status"]["State"] = "Enabled";
- asyncResp->res.jsonValue["PCIeSlots"]["@odata.id"] =
- crow::utility::urlFromPieces("redfish", "v1", "Chassis",
- chassisId, "PCIeSlots");
-
nlohmann::json::array_t computerSystems;
nlohmann::json::object_t system;
system["@odata.id"] = "/redfish/v1/Systems/system";
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index 8437f501fc..b4d64332b5 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -129,8 +129,9 @@ inline std::optional<std::string>
{
return "Gen5";
}
- if (generationInUse ==
- "xyz.openbmc_project.Inventory.Item.PCIeSlot.Generations.Unknown")
+ if (generationInUse.empty() ||
+ generationInUse ==
+ "xyz.openbmc_project.Inventory.Item.PCIeSlot.Generations.Unknown")
{
return "";
}