RBMC: Create initial RBMC application
Create a new phosphor-rbmc-manager application and service file to go
along with it, hidden behind the rbmc-state-management meson option.
As described in https://gerrit.openbmc.org/c/openbmc/docs/+/70233, this
application will manage redundancy related information for redundant BMC
systems.
This initial commit will just immediately set the role to Passive. It
does introduce the framework to determine the role and also includes a
basic test case. Future commits can then build on this.
It is setup to use the coroutine versions of sdbusplus's D-Bus
bindings.
The idea for the role_determination::run() function is to eventually
pass in all of the pieces of information it would need to determine the
role, like BMC position, sibling presence, previous role, etc. That
way, test cases can be created to easily vary the inputs to test all of
the code paths.
Tested:
```
$ busctl introspect xyz.openbmc_project.State.BMC.Redundancy /xyz/openbmc_project/state/bmc/redundancy -l
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.ObjectManager interface - - -
.GetManagedObjects method - a{oa{sa{sv}}} -
.InterfacesAdded signal oa{sa{sv}} - -
.InterfacesRemoved signal oas - -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.State.BMC.Redundancy interface - - -
.RedundancyEnabled property b false emits-change
.Role property s "xyz.openbmc_project.State.BMC.Redundancy.Role.Passive" emits-change
```
Change-Id: Ie159d46ac5bd9cf47792d55ebd5a2e4a811017e8
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/service_files/xyz.openbmc_project.State.BMC.Redundancy.service b/service_files/xyz.openbmc_project.State.BMC.Redundancy.service
new file mode 100644
index 0000000..65910a3
--- /dev/null
+++ b/service_files/xyz.openbmc_project.State.BMC.Redundancy.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Phosphor Redundant BMC State Manager
+After=xyz.openbmc_project.State.BMC.service
+
+[Service]
+ExecStart=/usr/bin/phosphor-rbmc-state-manager
+Restart=always
+Type=dbus
+BusName=xyz.openbmc_project.State.BMC.Redundancy
+
+[Install]
+WantedBy=multi-user.target