bmc: cleanup verification language and symbols
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ife4d7e519e44aff60441c5909346ca6d7e2aa090
diff --git a/bmc/Makefile.am b/bmc/Makefile.am
index 797de8d..a33a63e 100644
--- a/bmc/Makefile.am
+++ b/bmc/Makefile.am
@@ -41,7 +41,7 @@
firmware_handler.cpp \
file_handler.cpp \
prepare_systemd.cpp \
- verify_systemd.cpp \
+ general_systemd.cpp \
update_systemd.cpp \
lpc_handler.cpp
diff --git a/bmc/buildjson.cpp b/bmc/buildjson.cpp
index e4d1d54..0fd40ef 100644
--- a/bmc/buildjson.cpp
+++ b/bmc/buildjson.cpp
@@ -17,9 +17,9 @@
#include "file_handler.hpp"
#include "fs.hpp"
+#include "general_systemd.hpp"
#include "prepare_systemd.hpp"
#include "update_systemd.hpp"
-#include "verify_systemd.hpp"
#include <algorithm>
#include <cstdio>
@@ -100,8 +100,9 @@
systemdMode = verify.at("mode").get<std::string>();
}
- pack->verification = SystemdWithStatusFile::CreateVerification(
- sdbusplus::bus::new_default(), path, unit, systemdMode);
+ pack->verification =
+ SystemdWithStatusFile::CreateSystemdWithStatusFile(
+ sdbusplus::bus::new_default(), path, unit, systemdMode);
}
else
{
@@ -131,8 +132,9 @@
systemdMode = update.at("mode").get<std::string>();
}
- pack->update = SystemdWithStatusFile::CreateVerification(
- sdbusplus::bus::new_default(), path, unit, systemdMode);
+ pack->update =
+ SystemdWithStatusFile::CreateSystemdWithStatusFile(
+ sdbusplus::bus::new_default(), path, unit, systemdMode);
}
else if (updateType == "systemd")
{
diff --git a/bmc/verify_systemd.cpp b/bmc/general_systemd.cpp
similarity index 88%
rename from bmc/verify_systemd.cpp
rename to bmc/general_systemd.cpp
index 3851f94..ff51f39 100644
--- a/bmc/verify_systemd.cpp
+++ b/bmc/general_systemd.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "verify_systemd.hpp"
+#include "general_systemd.hpp"
#include "status.hpp"
@@ -28,10 +28,9 @@
{
std::unique_ptr<TriggerableActionInterface>
- SystemdWithStatusFile::CreateVerification(sdbusplus::bus::bus&& bus,
- const std::string& path,
- const std::string& service,
- const std::string& mode)
+ SystemdWithStatusFile::CreateSystemdWithStatusFile(
+ sdbusplus::bus::bus&& bus, const std::string& path,
+ const std::string& service, const std::string& mode)
{
return std::make_unique<SystemdWithStatusFile>(std::move(bus), path,
service, mode);
diff --git a/bmc/verify_systemd.hpp b/bmc/general_systemd.hpp
similarity index 73%
rename from bmc/verify_systemd.hpp
rename to bmc/general_systemd.hpp
index 8126b3b..5c4c0e3 100644
--- a/bmc/verify_systemd.hpp
+++ b/bmc/general_systemd.hpp
@@ -10,17 +10,15 @@
{
/**
- * Representation of what is used for verification. Currently, this reduces the
- * chance of error by using an object instead of two strings to control the
- * verification step, however, it leaves room for a future possibility out
- * something wholly configurable.
+ * Representation of what is used for triggering an action with systemd and
+ * checking the result by reading a file.
*/
class SystemdWithStatusFile : public TriggerableActionInterface
{
public:
/**
- * Create a default Verification object that uses systemd to trigger the
- * process.
+ * Create a default SystemdWithStatusFile object that uses systemd to
+ * trigger the process.
*
* @param[in] bus - an sdbusplus handler for a bus to use.
* @param[in] path - the path to check for verification status.
@@ -29,8 +27,10 @@
* @param[in] mode - the job-mode when starting the systemd Unit.
*/
static std::unique_ptr<TriggerableActionInterface>
- CreateVerification(sdbusplus::bus::bus&& bus, const std::string& path,
- const std::string& service, const std::string& mode);
+ CreateSystemdWithStatusFile(sdbusplus::bus::bus&& bus,
+ const std::string& path,
+ const std::string& service,
+ const std::string& mode);
SystemdWithStatusFile(sdbusplus::bus::bus&& bus, const std::string& path,
const std::string& service, const std::string& mode) :
diff --git a/bmc/main.cpp b/bmc/main.cpp
index b988ab2..c0526de 100644
--- a/bmc/main.cpp
+++ b/bmc/main.cpp
@@ -20,6 +20,7 @@
#include "file_handler.hpp"
#include "firmware_handler.hpp"
#include "flags.hpp"
+#include "general_systemd.hpp"
#include "image_handler.hpp"
#include "lpc_aspeed.hpp"
#include "lpc_handler.hpp"
@@ -29,7 +30,6 @@
#include "status.hpp"
#include "update_systemd.hpp"
#include "util.hpp"
-#include "verify_systemd.hpp"
#include <cstdint>
#include <memory>
diff --git a/bmc/test/firmware_json_unittest.cpp b/bmc/test/firmware_json_unittest.cpp
index 38bfda6..66b9db9 100644
--- a/bmc/test/firmware_json_unittest.cpp
+++ b/bmc/test/firmware_json_unittest.cpp
@@ -1,6 +1,6 @@
#include "buildjson.hpp"
+#include "general_systemd.hpp"
#include "update_systemd.hpp"
-#include "verify_systemd.hpp"
#include <nlohmann/json.hpp>