Add inventory, led and sensors package groups

Add inventory, leds and sensors categories to the obmc-apps
packagegroup.

Add virtuals and mark Phosphor apps as providers:
 -obmc-inventory-manager
 -obmc-leds-manager
 -obmc-leds-sysfs
 -obmc-sensors-hwmon

Add legacy applications to these groups in the OpenPOWER later until
they are fully deprecated.

Change-Id: If3ae7c83ccd03e21adbca4653c1e803566b502de
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-phosphor/classes/obmc-phosphor-image.bbclass b/meta-phosphor/classes/obmc-phosphor-image.bbclass
index cd322bb..b22d55f 100644
--- a/meta-phosphor/classes/obmc-phosphor-image.bbclass
+++ b/meta-phosphor/classes/obmc-phosphor-image.bbclass
@@ -11,8 +11,11 @@
 # - obmc-host-ctl                     - OpenBMC host control
 # - obmc-host-ipmi                    - OpenBMC host IPMI
 # - obmc-host-state-mgmt              - OpenBMC host state management
+# - obmc-inventory                    - OpenBMC inventory support
+# - obmc-leds                         - OpenBMC LED support
 # - obmc-logging-mgmt                 - OpenBMC logging management
 # - obmc-sensor-mgmt                  - OpenBMC sensor management
+# - obmc-sensors                      - OpenBMC sensor support
 # - obmc-settings-mgmt                - OpenBMC settings management
 # - obmc-system-mgmt                  - OpenBMC system management
 # - obmc-user-mgmt                    - OpenBMC user management
@@ -30,9 +33,12 @@
 FEATURE_PACKAGES_obmc-host-ctl ?= "${@cf_enabled(d, 'obmc-host-ctl', 'virtual-obmc-host-ctl')}"
 FEATURE_PACKAGES_obmc-host-ipmi ?= "${@cf_enabled(d, 'obmc-host-ipmi', 'virtual-obmc-host-ipmi-hw')}"
 FEATURE_PACKAGES_obmc-host-state-mgmt ?= "${@cf_enabled(d, 'obmc-host-state-mgmt', 'virtual-obmc-host-state-mgmt')}"
+FEATURE_PACKAGES_obmc-inventory ?= "packagegroup-obmc-apps-inventory"
+FEATURE_PACKAGES_obmc-leds ?= "packagegroup-obmc-apps-leds"
 FEATURE_PACKAGES_obmc-logging-mgmt ?= "${@df_enabled(d, 'obmc-logging-mgmt', 'virtual-obmc-logging-mgmt')}"
 FEATURE_PACKAGES_obmc-net-ipmi ?= "${@df_enabled(d, 'obmc-net-ipmi', 'virtual-obmc-net-ipmi')}"
 FEATURE_PACKAGES_obmc-sensor-mgmt ?= "${@cf_enabled(d, 'obmc-phosphor-sensor-mgmt', 'virtual-obmc-sensor-mgmt')}"
+FEATURE_PACKAGES_obmc-sensors ?= "packagegroup-obmc-apps-sensors"
 FEATURE_PACKAGES_obmc-settings-mgmt ?= "${@df_enabled(d, 'obmc-settings-mgmt', 'virtual-obmc-settings-mgmt')}"
 FEATURE_PACKAGES_obmc-system-mgmt ?= "${@df_enabled(d, 'obmc-phosphor-system-mgmt', 'virtual-obmc-system-mgmt')}"
 FEATURE_PACKAGES_obmc-user-mgmt ?= "${@df_enabled(d, 'obmc-phosphor-user-mgmt', 'virtual-obmc-user-mgmt')}"
@@ -48,9 +54,12 @@
         obmc-host-ctl \
         obmc-host-ipmi \
         obmc-host-state-mgmt \
+        obmc-inventory \
+        obmc-leds \
         obmc-logging-mgmt \
         obmc-net-ipmi \
         obmc-sensor-mgmt \
+        obmc-sensors \
         obmc-settings-mgmt \
         obmc-system-mgmt \
         obmc-user-mgmt \
diff --git a/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb b/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
index 04b4fc8..4c1c98b 100644
--- a/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
+++ b/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
@@ -9,6 +9,9 @@
 PACKAGES = " \
         ${PN}-extras \
         ${PN}-extrasdev \
+        ${PN}-inventory \
+        ${PN}-leds \
+        ${PN}-sensors \
         "
 
 SUMMARY_${PN}-extras = "Extra features"
@@ -20,3 +23,17 @@
 RDEPENDS_${PN}-extrasdev = " \
         rest-dbus \
         "
+
+SUMMARY_${PN}-inventory = "Inventory applications"
+RDEPENDS_${PN}-inventory = " \
+        ${VIRTUAL-RUNTIME_obmc-inventory-manager} \
+        "
+
+SUMMARY_${PN}-leds = "LED applications"
+RDEPENDS_${PN}-leds = " \
+        "
+
+SUMMARY_${PN}-sensors = "Sensor applications"
+RDEPENDS_${PN}-sensors = " \
+        ${VIRTUAL-RUNTIME_obmc-sensors-hwmon} \
+        "
diff --git a/meta-phosphor/conf/distro/include/phosphor-defaults.inc b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
index 3006137..9164a26 100644
--- a/meta-phosphor/conf/distro/include/phosphor-defaults.inc
+++ b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
@@ -16,9 +16,34 @@
 PREFERRED_PROVIDER_virtual/obmc-flash-mgmt ?= "obmc-phosphor-flashd"
 PREFERRED_PROVIDER_virtual/obmc-host-ipmi-hw ?= "phosphor-ipmi-hw-example"
 PREFERRED_PROVIDER_virtual/obmc-host-state-mgmt ?= "phosphor-state-manager"
+
+# obmc-inventory-manager
+#
+# Provides an implementation of the xyz.openbmc_project.Inventory.Manager
+# interface.
+VIRTUAL-RUNTIME_obmc-inventory-manager ?= "phosphor-inventory-manager"
+
+# obmc-led-manager
+#
+# Provides an implementation of the xyz.openbmc_project.ledmanager interface.
+VIRTUAL-RUNTIME_obmc-leds-manager ?= "phosphor-led-manager"
+
+# obmc-led-sysfs
+#
+# Provides an implementation of xyz.openbmc_project.Led.Physical for
+# Linux kernel LED subsystem LEDs.
+VIRTUAL-RUNTIME_obmc-leds-sysfs ?= "phosphor-led-sysfs"
+
 PREFERRED_PROVIDER_virtual/obmc-logging-mgmt ?= "phosphor-logging"
 PREFERRED_PROVIDER_virtual/obmc-net-ipmi ?= "phosphor-net-ipmid"
 PREFERRED_PROVIDER_virtual/obmc-sensor-mgmt ?= "obmc-phosphor-sensord"
+
+# obmc-sensors-hwmon
+#
+# Provides an implementation of xyz.openbmc_project.Sensor.Value
+# for hwmon sensors.
+VIRTUAL-RUNTIME_obmc-sensors-hwmon ?= "phosphor-hwmon"
+
 PREFERRED_PROVIDER_virtual/obmc-settings-mgmt ?= "phosphor-settings"
 PREFERRED_PROVIDER_virtual/obmc-system-mgmt ?= "obmc-phosphor-sysd"
 PREFERRED_PROVIDER_virtual/obmc-user-mgmt ?= "obmc-phosphor-user"