summaryrefslogtreecommitdiff
path: root/redfish-core
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2023-02-15 21:07:56 +0300
committerEd Tanous <ed@tanous.net>2023-02-16 21:57:12 +0300
commit86711e7095486db50b389e2cc5ec9224a396bc58 (patch)
treef9a247a0b7ecaabb3d5823e95eb9fef109b8914c /redfish-core
parent7da847b63120150b4fd0538306b37bc32645e0b3 (diff)
downloadbmcweb-86711e7095486db50b389e2cc5ec9224a396bc58.tar.xz
Revert "Implement Manager/ServiceRootUptime"
This reverts commit ee61a619da7f180a3148317d569d2dabd1cd9832. This feature was tested against an old version of schemas, and upstream DMTF seems to have changed the definition in the meantime. This wasn't caught because of the same test failure as yesterday. Mea Culpa Change-Id: I0be095f5dea0f036927202f367542275abc0ebe3 Signed-off-by: Ed Tanous <edtanous@google.com>
Diffstat (limited to 'redfish-core')
-rw-r--r--redfish-core/lib/managers.hpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index 0be135400f..376f70c52b 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -33,7 +33,6 @@
#include <algorithm>
#include <array>
-#include <chrono>
#include <cstdint>
#include <memory>
#include <sstream>
@@ -1770,47 +1769,6 @@ inline void
});
}
-inline void
- afterGetManagerStartTime(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
- const boost::system::error_code& ec,
- uint64_t bmcwebResetTime)
-{
- if (ec)
- {
- return;
- }
- using std::chrono::steady_clock;
- std::chrono::microseconds usReset{bmcwebResetTime};
- steady_clock::time_point resetTime{usReset};
-
- steady_clock::time_point now = steady_clock::now();
-
- steady_clock::duration run = now - resetTime;
-
- if (run < steady_clock::duration::zero())
- {
- BMCWEB_LOG_CRITICAL << "Uptime was negative????";
- messages::internalError(aResp->res);
- return;
- }
-
- using Milli = std::chrono::milliseconds;
- Milli uptimeMs = std::chrono::duration_cast<Milli>(run);
-
- using redfish::time_utils::toDurationString;
- aResp->res.jsonValue["ServiceRootUptime"] = toDurationString(uptimeMs);
-}
-
-inline void
- managerGetServiceRootUptime(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
-{
- sdbusplus::asio::getProperty<uint64_t>(
- *crow::connections::systemBus, "org.freedesktop.systemd1",
- "/org/freedesktop/systemd1/unit/bmcweb_2eservice",
- "org.freedesktop.systemd1.Unit", "ActiveEnterTimestampMonotonic",
- std::bind_front(afterGetManagerStartTime, aResp));
-}
-
/**
* @brief Set the running firmware image
*
@@ -2068,8 +2026,6 @@ inline void requestRoutesManager(App& app)
managerGetLastResetTime(asyncResp);
- managerGetServiceRootUptime(asyncResp);
-
// ManagerDiagnosticData is added for all BMCs.
nlohmann::json& managerDiagnosticData =
asyncResp->res.jsonValue["ManagerDiagnosticData"];