Brad Bishop | 92665b2 | 2016-10-26 20:51:16 -0500 | [diff] [blame] | 1 | ## This file is a template. The comment below is emitted |
| 2 | ## into the rendered file; feel free to edit this file. |
| 3 | // This file was auto generated. Do not edit. |
| 4 | |
| 5 | #include "manager.hpp" |
| 6 | |
| 7 | namespace phosphor |
| 8 | { |
| 9 | namespace inventory |
| 10 | { |
| 11 | namespace manager |
| 12 | { |
| 13 | |
| 14 | const Manager::Events Manager::_events{ |
| 15 | % for e in events: |
| 16 | { |
| 17 | % if e.get('description'): |
| 18 | // ${e['description']} |
| 19 | % endif |
| 20 | "${e['name']}", |
| 21 | std::make_tuple( |
| 22 | % for i, s in enumerate(e['signature'].items()): |
| 23 | % if i + 1 == len(e['signature']): |
| 24 | ${'"{0}=\'{1}\'"'.format(*s)}, |
| 25 | % else: |
| 26 | ${'"{0}=\'{1}\',"'.format(*s)} |
| 27 | % endif |
| 28 | % endfor |
| 29 | % if e['filter'].get('args'): |
| 30 | filters::${e['filter']['type']}( |
| 31 | % for i, a in enumerate(e['filter']['args']): |
| 32 | % if i + 1 == len(e['filter']['args']): |
| 33 | "${a['value']}"), |
| 34 | % else: |
| 35 | "${a['value']}", |
| 36 | % endif |
| 37 | % endfor |
| 38 | % else: |
| 39 | filters::${e['filter']['type']}, |
| 40 | % endif |
| 41 | % if e['action'].get('args'): |
| 42 | actions::${e['action']['type']}( |
| 43 | % for i, a in enumerate(e['action']['args']): |
| 44 | % if i + 1 == len(e['action']['args']): |
| 45 | "${a['value']}") |
| 46 | % else: |
| 47 | "${a['value']}", |
| 48 | % endif |
| 49 | % endfor |
| 50 | % else: |
| 51 | actions::${e['action']['type']} |
| 52 | % endif |
| 53 | ), |
| 54 | }, |
| 55 | % endfor |
| 56 | }; |
| 57 | |
| 58 | } // namespace manager |
| 59 | } // namespace inventory |
| 60 | } // namespace phosphor |