version-handler: Refactor handler construction
Instead of requiring callers to build maps and info blobs, take the
minimal required amount of information about the blob configuration and
build required datastructures internally.
This reduces the amount of code, and nearly eliminates all of the
untested code in main.cpp.
Change-Id: Iaa398eb404814e9263e6707b71b38a9831d96697
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/bmc/version-handler/version_handlers_builder.hpp b/bmc/version-handler/version_handlers_builder.hpp
index 5055098..0ec85ae 100644
--- a/bmc/version-handler/version_handlers_builder.hpp
+++ b/bmc/version-handler/version_handlers_builder.hpp
@@ -12,10 +12,11 @@
* provide the method to parse and validate blob entries from json and produce
* something that is usable by the version handler.
*/
-class VersionHandlersBuilder : public HandlersBuilderIfc<VersionActionPack>
+class VersionHandlersBuilder :
+ public HandlersBuilderIfc<VersionBlobHandler::ActionPack>
{
public:
- std::vector<HandlerConfig<VersionActionPack>>
+ std::vector<HandlerConfig<VersionBlobHandler::ActionPack>>
buildHandlerFromJson(const nlohmann::json& data) override;
};
} // namespace ipmi_flash