Switch to systemd state management

Enable systemd chassis and bmc state management support for Phosphor.

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I180496eb8e48dfc617f944053b8e909210c6df7d
diff --git a/common/recipes-phosphor/inventory-upload/inventory-upload.bb b/common/recipes-phosphor/inventory-upload/inventory-upload.bb
index 90425f4..03a63e5 100644
--- a/common/recipes-phosphor/inventory-upload/inventory-upload.bb
+++ b/common/recipes-phosphor/inventory-upload/inventory-upload.bb
@@ -7,6 +7,7 @@
 
 inherit allarch
 inherit setuptools
+inherit obmc-phosphor-systemd
 
 RDEPENDS_${PN} += " \
         python-dbus \
@@ -20,3 +21,11 @@
 SRCREV = "b07de872ac18710dbf0d393a206e2598c6580f46"
 
 S = "${WORKDIR}/git"
+
+TMPL = "op-inventory-upload@.service"
+INSTFMT = "op-inventory-upload@{0}.service"
+TGTFMT = "obmc-chassis-start@{0}.target"
+FMT = "../${TMPL}:${TGTFMT}.wants/${INSTFMT}"
+
+SYSTEMD_SERVICE_${PN} += "${TMPL}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"