psu-ng: Implement the PowerSystemInputs interface

Implement the PowerSystemInputs interface which contains the status of
the power inputs to the chassis. The psu monitor app will use the status
property to communicate if a brownout condition exists.
Implement this interface under a /chassis0 path to specify it applies to
the current chassis. This can later be enhanced to support a
multi-chassis configuration.

Tested: The status property exists and it's set to default value Good:
root@p10bmc:~# busctl get-property xyz.openbmc_project.Power.PSUMonitor\
    /xyz/openbmc_project/power/power_supplies/chassis0/psus\
    xyz.openbmc_project.State.Decorator.PowerSystemInputs Status
s "xyz.openbmc_project.State.Decorator.PowerSystemInputs.Status.Good"

Change-Id: I7cf4d13e632841e0b19b52af0d9eac886eb161ce
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 3ad94cc..e6a3225 100644
--- a/phosphor-power-supply/psu_manager.cpp
+++ b/phosphor-power-supply/psu_manager.cpp
@@ -12,6 +12,11 @@
 
 namespace phosphor::power::manager
 {
+constexpr auto managerBusName = "xyz.openbmc_project.Power.PSUMonitor";
+constexpr auto objectManagerObjPath =
+    "/xyz/openbmc_project/power/power_supplies";
+constexpr auto powerSystemsInputsObjPath =
+    "/xyz/openbmc_project/power/power_supplies/chassis0/psus";
 
 constexpr auto IBMCFFPSInterface =
     "xyz.openbmc_project.Configuration.IBMCFFPSConnector";
@@ -24,7 +29,8 @@
     "xyz.openbmc_project.Configuration.SupportedConfiguration";
 
 PSUManager::PSUManager(sdbusplus::bus::bus& bus, const sdeventplus::Event& e) :
-    bus(bus)
+    bus(bus), powerSystemInputs(bus, powerSystemsInputsObjPath),
+    objectManager(bus, objectManagerObjPath)
 {
     // Subscribe to InterfacesAdded before doing a property read, otherwise
     // the interface could be created after the read attempt but before the
@@ -39,6 +45,10 @@
     getPSUConfiguration();
     getSystemProperties();
 
+    // Request the bus name before the analyze() function, which is the one that
+    // determines the brownout condition and sets the status d-bus property.
+    bus.request_name(managerBusName);
+
     using namespace sdeventplus;
     auto interval = std::chrono::milliseconds(1000);
     timer = std::make_unique<utility::Timer<ClockId::Monotonic>>(