diff options
author | Marri Devender Rao <devenrao@in.ibm.com> | 2017-08-21 04:11:18 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-09-13 21:29:51 +0000 |
commit | 16fe26d83f06719077da41b054d99d78c065091e (patch) | |
tree | da07d0d8e479785e5db5d558dc20a99f3b78d19d | |
parent | 0044524d8972df79d9439e676f0f80a1006a2f23 (diff) | |
download | phosphor-host-ipmid-16fe26d83f06719077da41b054d99d78c065091e.tar.gz phosphor-host-ipmid-16fe26d83f06719077da41b054d99d78c065091e.zip |
Modify mako script to generate code for empty interfaces
Allow generating empty interfaces in the FRU map, which are
used to determine the type of the inventory object.
Change-Id: I6dc97514b0bdf7ef9d3a63ee6790a7933b3e7cd9
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
-rw-r--r-- | scripts/fru-read-example.yaml | 5 | ||||
-rw-r--r-- | scripts/readfru.mako.cpp | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/scripts/fru-read-example.yaml b/scripts/fru-read-example.yaml index 8c6074c..86151af 100644 --- a/scripts/fru-read-example.yaml +++ b/scripts/fru-read-example.yaml @@ -33,6 +33,7 @@ Version: IPMIFruProperty: Version IPMIFruSection: Product + xyz.openbmc_project.Inventory.Item.System: 1: /system/chassis/motherboard/dimm0: xyz.openbmc_project.Inventory.Item: @@ -56,6 +57,7 @@ Version: IPMIFruProperty: Version IPMIFruSection: Product + xyz.openbmc_project.Inventory.Item.Dimm: 2: /system/chassis/motherboard/dimm1: xyz.openbmc_project.Inventory.Item: @@ -79,6 +81,7 @@ Version: IPMIFruProperty: Version IPMIFruSection: Product + xyz.openbmc_project.Inventory.Item.Dimm: 3: /system/chassis/motherboard/cpu0: xyz.openbmc_project.Inventory.Item: @@ -98,6 +101,7 @@ Manufacturer: IPMIFruProperty: Manufacturer IPMIFruSection: Board + xyz.openbmc_project.Inventory.Item.Cpu: 4: /system/chassis/motherboard/cpu1: xyz.openbmc_project.Inventory.Item: @@ -117,3 +121,4 @@ Manufacturer: IPMIFruProperty: Manufacturer IPMIFruSection: Board + xyz.openbmc_project.Inventory.Item.Cpu: diff --git a/scripts/readfru.mako.cpp b/scripts/readfru.mako.cpp index 40e4812..061b4e0 100644 --- a/scripts/readfru.mako.cpp +++ b/scripts/readfru.mako.cpp @@ -12,10 +12,11 @@ extern const FruMap frus = { {"${object}",{ % for interface,properties in interfaces.items(): {"${interface}",{ - % for dbus_property,property_value in properties.items(): - {"${dbus_property}",{ - "${property_value.get("IPMIFruSection", "")}", - "${property_value.get("IPMIFruProperty", "")}",\ + % if properties: + % for dbus_property,property_value in properties.items(): + {"${dbus_property}",{ + "${property_value.get("IPMIFruSection", "")}", + "${property_value.get("IPMIFruProperty", "")}", \ <% delimiter = property_value.get("IPMIFruValueDelimiter") if not delimiter: @@ -25,7 +26,8 @@ extern const FruMap frus = { %> "${delimiter}" }}, - % endfor + % endfor + %endif }}, % endfor }}, |