psu-ng: Get the power config full load property

The supported configuration schema now includes the PowerConfigFullLoad
property to indicate the value that the power-config-full-load GPIO
should be set to for systems that support it.

Reference:
https://github.com/openbmc/docs/blob/master/designs/device-tree-gpio-naming.md#power-config-full-load

Change-Id: I590b9f2aff310f6175b9e66b507423dea0d0a3b4
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/phosphor-power-supply/psu_manager.cpp b/phosphor-power-supply/psu_manager.cpp
index 0d12dbc..78d380a 100644
--- a/phosphor-power-supply/psu_manager.cpp
+++ b/phosphor-power-supply/psu_manager.cpp
@@ -222,6 +222,19 @@
             }
         }
 
+        // The PowerConfigFullLoad is an optional property, default it to false
+        // since that's the default value of the power-config-full-load GPIO.
+        sys.powerConfigFullLoad = false;
+        propIt = properties.find("PowerConfigFullLoad");
+        if (propIt != properties.end())
+        {
+            const bool* fullLoad = std::get_if<bool>(&(propIt->second));
+            if (fullLoad != nullptr)
+            {
+                sys.powerConfigFullLoad = *fullLoad;
+            }
+        }
+
         supportedConfigs.emplace(*model, sys);
     }
     catch (const std::exception& e)
diff --git a/phosphor-power-supply/psu_manager.hpp b/phosphor-power-supply/psu_manager.hpp
index e54f536..13da13c 100644
--- a/phosphor-power-supply/psu_manager.hpp
+++ b/phosphor-power-supply/psu_manager.hpp
@@ -13,6 +13,7 @@
 {
     int powerSupplyCount;
     std::vector<uint64_t> inputVoltage;
+    bool powerConfigFullLoad;
 };
 
 using namespace phosphor::power::psu;
diff --git a/utility.hpp b/utility.hpp
index 941c909..31684ac 100644
--- a/utility.hpp
+++ b/utility.hpp
@@ -29,7 +29,8 @@
 using DbusInterfaceList = std::vector<DbusInterface>;
 using DbusSubtree =
     std::map<DbusPath, std::map<DbusService, DbusInterfaceList>>;
-using DbusVariant = std::variant<uint64_t, std::string, std::vector<uint64_t>>;
+using DbusVariant =
+    std::variant<bool, uint64_t, std::string, std::vector<uint64_t>>;
 using DbusPropertyMap = std::map<DbusProperty, DbusVariant>;
 /**
  * @brief Get the service name from the mapper for the