Modify mako script to generate code for empty interfaces
Empty interfaces are added for inventory objects to determine
the type of the object
Change-Id: I4b08e50a2ee45a3156012c0ef6b3ff53bd06c644
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
diff --git a/writefru.mako.hpp b/writefru.mako.hpp
index e27005f..fe84856 100755
--- a/writefru.mako.hpp
+++ b/writefru.mako.hpp
@@ -52,8 +52,9 @@
intfName = names[0] + names[-1]
%>\
PropertyMap ${intfName}Props;
- % for name, value in properties.iteritems():
- % if fru and interface and name and value:
+ % if properties:
+ % for name, value in properties.iteritems():
+ % if fru and interface and name and value:
<%
record, keyword = name.split(",")
%>\
@@ -62,8 +63,9 @@
${intfName}Props["${value}"] =
vpdStore.get<Record::${record}, record::Keyword::${keyword}>();
}
- % endif
- % endfor
+ % endif
+ % endfor
+ % endif
// Check and update extra properties
if(extra::objects.end() != iter)
{
diff --git a/writefru.yaml b/writefru.yaml
index eb7f827..1673225 100644
--- a/writefru.yaml
+++ b/writefru.yaml
@@ -7,9 +7,10 @@
VINI,DR: PrettyName
xyz.openbmc_project.Common.UUID:
OPFR,UD: UUID
-
+ xyz.openbmc_project.Inventory.Item.Bmc:
ETHERNET:
xyz.openbmc_project.Inventory.Item.NetworkInterface:
VINI,B1: MACAddress
OPFR,B1: MACAddress
+ xyz.openbmc_project.Inventory.Item.Ethernet: