pimgen: ignore sdbusplus::object_path

pimgen.py processes all d-bus interfaces defined by
phosphor-dbus-interfaces, not just the ones under the Inventory/
namespace, because the inventory objects can implement any d-bus
interface.

The interface xyz.openbmc_project.Association has a property of type
sdbusplus::object_path (a wrapper around std::string), which Cereal
can't understand (and asserts at compile time). As a temporary solution,
ignore this property type. It's safe to do that because
xyz.openbmc_project.Association is un-implemented interface.

Resolves openbmc/openbmc#957.

Change-Id: I85dcd7a5d0885b29718c60b5062c8b5c7770a1ec
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/pimgen.py b/pimgen.py
index 73d1868..a31267f 100755
--- a/pimgen.py
+++ b/pimgen.py
@@ -543,6 +543,16 @@
                 properties = parsed.get('properties', None)
                 if not properties:
                     continue
+                # Cereal can't understand the type sdbusplus::object_path. This
+                # type is a wrapper around std::string. Ignore interfaces having
+                # a property of this type for now. The only interface that has a
+                # property of this type now is xyz.openbmc_project.Association,
+                # which is an unused interface. No inventory objects implement
+                # this interface.
+                # TODO via openbmc/openbmc#2123 : figure out how to make Cereal
+                # understand sdbusplus::object_path.
+                if any('path' in p['type'] for p in properties):
+                    continue
                 interface_composite[i] = properties
                 interfaces.append(i)