Progress tracking support for dump entries.

A new attribute status is added which indicates the status of the
dump creation. The user requested dump entries will be created
with InProgress and updated to Completed once the dump creation
is completed

Test: Request user initiated BMC and system dump and
make sure the progress is changing and the dump details
are updated correctly

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: I68e25c865765dff97913af00bf89c8c3a4b65d43
diff --git a/dump_manager_bmc.cpp b/dump_manager_bmc.cpp
index acd14a2..0236e46 100644
--- a/dump_manager_bmc.cpp
+++ b/dump_manager_bmc.cpp
@@ -10,6 +10,7 @@
 #include <sys/inotify.h>
 #include <unistd.h>
 
+#include <ctime>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/elog.hpp>
 #include <regex>
@@ -44,9 +45,11 @@
 
     try
     {
+        std::time_t timeStamp = std::time(nullptr);
         entries.insert(std::make_pair(
-            id, std::make_unique<bmc::Entry>(bus, objPath.c_str(), id, 0, 0,
-                                             std::string(), *this)));
+            id, std::make_unique<bmc::Entry>(
+                    bus, objPath.c_str(), id, timeStamp, 0, std::string(),
+                    phosphor::dump::OperationStatus::InProgress, *this)));
     }
     catch (const std::invalid_argument& e)
     {
@@ -146,10 +149,11 @@
 
     try
     {
-        entries.insert(
-            std::make_pair(id, std::make_unique<bmc::Entry>(
-                                   bus, objPath.c_str(), id, stoull(msString),
-                                   fs::file_size(file), file, *this)));
+        entries.insert(std::make_pair(
+            id,
+            std::make_unique<bmc::Entry>(
+                bus, objPath.c_str(), id, stoull(msString), fs::file_size(file),
+                file, phosphor::dump::OperationStatus::Completed, *this)));
     }
     catch (const std::invalid_argument& e)
     {