Use generic interface to look for configs

IBM has specific interface IBMCompatibleSystem to look for the
compatible system location under which the configs are placed. The
Entity Manager schema for the property under this interface and the
interface name itself can't be generic for other meta systems.
To find a more common interface, this should be the one that is probed
together with chassis and has its property value corresponding to
system's name.

This commit proposes the use of the property Names under the interface
xyz.openbmc_project.Inventory.Decorator.Compatible [1]. The property
can be configured in chassis's Entity Manager json configuration with
a list of one or more compatible system strings. The usage of this
interface was mentioned in document [2].

[1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/\
yaml/xyz/openbmc_project/Inventory/Decorator/Compatible.interface.yaml
[2] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/\
yaml/xyz/openbmc_project/Software/README.md#compatibility

Tested in Ampere's Mt.Mitchell platform.

1. Configure the interface in Motherboard's Entity Manager config:
"xyz.openbmc_project.Inventory.Decorator.Compatible": {
            "Names": ["com.ampere.Hardware.Chassis.Model.MtMitchell"]
        }
2. Configs are already placed under
/usr/share/phosphor-fan-presence/<daemon>/\
com.ampere.Hardware.Chassis.Model.MtMitchell/
3. When Entity Manager config is probed:
$ busctl call -j xyz.openbmc_project.ObjectMapper \
/xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper \
GetSubTreePaths sias / 0 1
xyz.openbmc_project.Inventory.Decorator.Compatible
{
  "type": "a{sa{sas}}",
  "data": [
    [
       "/xyz/openbmc_project/inventory/system/board/\
Mt_Mitchell_Motherboard" : {
           "xyz.openbmc_project.EntityManager" : [
                ...
                "xyz.openbmc_project.Inventory.Decorator.Compatible
           ]
         }
    ]
  ]
}

$ busctl get-property xyz.openbmc_project.EntityManager \
/xyz/openbmc_project/inventory/system/board/Mt_Mitchell_Motherboard \
xyz.openbmc_project.Inventory.Decorator.Compatible Names
as 1 "com.ampere.Hardware.Chassis.Model.MtMitchell"
4. When phosphor-fan's daemon starts, it can successfully find
configs under the folder "com.ampere.Hardware.Chassis.Model.MtMitchell"

Signed-off-by: Chau Ly <chaul@amperecomputing.com>
Change-Id: I55107f1c2a78e78ba7cea650b8eaeaf4fd615d2b
4 files changed