summaryrefslogtreecommitdiffstats
path: root/occ_finder.hpp
diff options
context:
space:
mode:
authorDeepak Kodihalli <dkodihal@in.ibm.com>2017-07-26 08:25:59 -0500
committerDeepak Kodihalli <dkodihal@in.ibm.com>2017-08-01 10:55:50 -0500
commit5f031f3c722f0a4d10e562f5cfa54ba32d12958e (patch)
tree50516eb3c732e38d78cbb49528b5d9800b06da9c /occ_finder.hpp
parentee4d83dfc7b6cf3b5979541ab5b1918b68e6bbdb (diff)
downloadopenpower-occ-control-5f031f3c722f0a4d10e562f5cfa54ba32d12958e.tar.gz
openpower-occ-control-5f031f3c722f0a4d10e562f5cfa54ba32d12958e.zip
Reconstruct OCC objects on app restart
The OCC objects would get created when corresponding CPU inventory items get added. This doesn't cover a scenario where the OCC app restarts. If the CPU inventory is already present when the app starts, construct OCC objects as well. Resolves openbmc/openbmc#1824. Change-Id: I4994d93ba6f528ca67977604ccb1da717563092a Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Diffstat (limited to 'occ_finder.hpp')
-rw-r--r--occ_finder.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/occ_finder.hpp b/occ_finder.hpp
new file mode 100644
index 0000000..cad8277
--- /dev/null
+++ b/occ_finder.hpp
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <vector>
+#include <string>
+
+namespace open_power
+{
+namespace occ
+{
+namespace finder
+{
+
+/** @brief Get OCC objects on the system by mapping them to CPU inventory
+ * @returns vector of occ objects, such as occ0, occ1, and so on.
+ */
+std::vector<std::string> get();
+
+} // namespace finder
+} // namespace occ
+} // namespace open_power
OpenPOWER on IntegriCloud