health_metric: add tmp storage support

Add the tmp storage support in health config parser and health metric.

Change-Id: Ibb265c28b22d786031ed152d2cc52f40814be984
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/health_metric.cpp b/health_metric.cpp
index ed41fd1..b37698e 100644
--- a/health_metric.cpp
+++ b/health_metric.cpp
@@ -54,6 +54,10 @@
         {
             return std::string(BmcPath) + "/" + PathIntf::read_write_storage;
         }
+        case SubType::storageTmp:
+        {
+            return std::string(BmcPath) + "/" + PathIntf::tmp_storage;
+        }
         default:
         {
             error("Invalid Memory metric {TYPE}", "TYPE",
diff --git a/health_metric_config.cpp b/health_metric_config.cpp
index be8ebb7..231371a 100644
--- a/health_metric_config.cpp
+++ b/health_metric_config.cpp
@@ -44,7 +44,7 @@
     {"Memory_Shared", SubType::memoryShared},
     {"Memory_Buffered_And_Cached", SubType::memoryBufferedAndCached},
     {"Storage_RW", SubType::storageReadWrite},
-    {"Storage_TMP", SubType::storageReadWrite}};
+    {"Storage_TMP", SubType::storageTmp}};
 
 /** Deserialize a Threshold from JSON. */
 void from_json(const json& j, Threshold& self)
diff --git a/health_metric_config.hpp b/health_metric_config.hpp
index 2b0a578..49f39ad 100644
--- a/health_metric_config.hpp
+++ b/health_metric_config.hpp
@@ -37,6 +37,7 @@
     memoryTotal,
     // Storage subtypes
     storageReadWrite,
+    storageTmp,
     NA
 };
 
diff --git a/test/test_health_metric_config.cpp b/test/test_health_metric_config.cpp
index 471bf2b..c13e819 100644
--- a/test/test_health_metric_config.cpp
+++ b/test/test_health_metric_config.cpp
@@ -43,7 +43,8 @@
                 .contains(subType);
 
         case metric::Type::storage:
-            return set_t{metric::SubType::storageReadWrite, metric::SubType::NA}
+            return set_t{metric::SubType::storageReadWrite,
+                         metric::SubType::storageTmp}
                 .contains(subType);
 
         case metric::Type::inode: