Marri Devender Rao | a62bacc | 2017-06-04 23:40:16 -0500 | [diff] [blame] | 1 | // !!! WARNING: This is a GENERATED Code..Please do NOT Edit !!! |
| 2 | #include <iostream> |
| 3 | #include "fruread.hpp" |
| 4 | |
| 5 | extern const FruMap frus = { |
| 6 | % for key in fruDict.keys(): |
| 7 | {${key},{ |
| 8 | <% |
Ratan Gupta | 0033097 | 2018-01-19 16:23:10 +0530 | [diff] [blame] | 9 | instanceList = fruDict[key] |
Marri Devender Rao | a62bacc | 2017-06-04 23:40:16 -0500 | [diff] [blame] | 10 | %> |
Ratan Gupta | 0033097 | 2018-01-19 16:23:10 +0530 | [diff] [blame] | 11 | % for instancePath,instanceInfo in instanceList.items(): |
| 12 | <% |
| 13 | entityID = instanceInfo["entityID"] |
| 14 | entityInstance = instanceInfo["entityInstance"] |
| 15 | interfaces = instanceInfo["interfaces"] |
| 16 | %> |
| 17 | {${entityID}, ${entityInstance}, "${instancePath}",{ |
Marri Devender Rao | a62bacc | 2017-06-04 23:40:16 -0500 | [diff] [blame] | 18 | % for interface,properties in interfaces.items(): |
| 19 | {"${interface}",{ |
Marri Devender Rao | 16fe26d | 2017-08-21 04:11:18 -0500 | [diff] [blame] | 20 | % if properties: |
| 21 | % for dbus_property,property_value in properties.items(): |
| 22 | {"${dbus_property}",{ |
| 23 | "${property_value.get("IPMIFruSection", "")}", |
Ratan Gupta | 0033097 | 2018-01-19 16:23:10 +0530 | [diff] [blame] | 24 | "${property_value.get("IPMIFruProperty", "")}",\ |
Marri Devender Rao | a62bacc | 2017-06-04 23:40:16 -0500 | [diff] [blame] | 25 | <% |
| 26 | delimiter = property_value.get("IPMIFruValueDelimiter") |
| 27 | if not delimiter: |
| 28 | delimiter = "" |
| 29 | else: |
| 30 | delimiter = '\\' + hex(delimiter)[1:] |
| 31 | %> |
| 32 | "${delimiter}" |
| 33 | }}, |
Marri Devender Rao | 16fe26d | 2017-08-21 04:11:18 -0500 | [diff] [blame] | 34 | % endfor |
| 35 | %endif |
Marri Devender Rao | a62bacc | 2017-06-04 23:40:16 -0500 | [diff] [blame] | 36 | }}, |
| 37 | % endfor |
| 38 | }}, |
| 39 | % endfor |
| 40 | }}, |
| 41 | % endfor |
| 42 | }; |