refactor metadata pack/unpack functions
Move the `parse` and `combine` functions, which are used to translate
between `map<string,string>` and `vector<string>` for the metadata.
This is in preparation for transitioning the AdditionalData field
from `vector` to `map`.
Tested: Test cases pass. Simple `log-create` call has no change in
behavior.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ib968e1fe02903072c300d5387cf91f2d8164b1b4
diff --git a/log_manager.cpp b/log_manager.cpp
index de3509d..125677e 100644
--- a/log_manager.cpp
+++ b/log_manager.cpp
@@ -707,8 +707,7 @@
const FFDCEntries& ffdc) -> sdbusplus::message::object_path
{
// Convert the map into a vector of "key=value" strings
- std::vector<std::string> ad;
- metadata::associations::combine(additionalData, ad);
+ auto ad = util::additional_data::combine(additionalData);
return createEntry(message, severity, ad, ffdc);
}