sensordatahandler: Support empty inventory interfaces

This commit adds support for empty inventory interfaces when
asserting a sensor into the inventory. This is something already
supported in ipmi-fru-parser, for example.

Currently, the notify::assertion function expects that each DBUS
interface also have a set of associated properties. One of the
use-cases this commit tries to solve is when a sensor being asserted
maps to an inventory item (accessed via
xyz.openbmc_project.Inventory.Manager DBUS service) that implements
a DBUS interface with no properties. For example, the GPU sensor
is mapped to a GPU inventory object that implements the DBUS
interface xyz.openbmc_project.Inventory.Item.Accelerator.
This commit enables phosphor-host-ipmid to correctly create/update
inventory objects even in cases where they implement DBUS interfaces
that contain no properties.

The sensor-example.yaml file has been updated to show an example
of a GPU sensor, the inventory object for which implements a
property-less DBUS interface.

Tested:

Tested on a witherspoon system that had some GPUs attached to it.
Pulled also https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/21107
in order to generate the right sensor configs for testing.
Verified that the GPU invetory objects that are created when the host
asserts a GPU sensor now implement the empty interface
xyz.openbmc_project.Inventory.Item.Accelerator

Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
Change-Id: I973580e285ae0fff1a513d3bbe8c03a89e0eeb83
diff --git a/scripts/sensor-example.yaml b/scripts/sensor-example.yaml
index 4a1472d..c0fbe1e 100755
--- a/scripts/sensor-example.yaml
+++ b/scripts/sensor-example.yaml
@@ -154,3 +154,41 @@
             #the update will be skipped.
             skipOn: deassert
             type: bool
+
+0xC5:
+  sensorType: 0x17
+  path: /system/chassis/motherboard/gv100card0
+  sensorReadingType: 1
+  serviceInterface: xyz.openbmc_project.Inventory.Manager
+  readingType: assertion
+  mutability: Mutability::Write|Mutability::Read
+  sensorNamePattern: nameLeaf
+  interfaces:
+    xyz.openbmc_project.Inventory.Decorator.Replaceable:
+      FieldReplaceable:
+        Offsets:
+          7:
+            assert: true
+            deassert: true
+            type: bool
+    xyz.openbmc_project.Inventory.Item:
+      Present:
+        Offsets:
+          7:
+            assert: true
+            deassert: false
+            type: bool
+    # Example of an interface with no attached properties
+    xyz.openbmc_project.Inventory.Item.Accelerator:
+    xyz.openbmc_project.State.Decorator.OperationalStatus:
+      Functional:
+        Offsets:
+          8:
+            assert: false
+            deassert: true
+            type: bool
+        Prereqs:
+          7:
+            assert: true
+            deassert: false
+            type: bool