| Sapan Bhatia | 0917402 | 2017-06-02 13:39:28 +0200 | [diff] [blame] | 1 | { |
| 2 | {%- for model in proto.messages %} | ||||
| 3 | {%- if model.links %} | ||||
| 4 | "{{ model.name }}": [ | ||||
| 5 | {% for l in model.links -%} | ||||
| 6 | ["{{ l.peer }}", "{{ l.src_port }}", "{{ l.dst_port }}"]{% if not loop.last %},{% endif %} | ||||
| 7 | {%- endfor %} | ||||
| 8 | {%- if model.rlinks %},{% endif %} | ||||
| 9 | {% for l in model.rlinks -%} | ||||
| 10 | ["{{ l.peer }}", "{{ l.src_port }}", "{{ l.dst_port }}"]{% if not loop.last %},{% endif %} | ||||
| 11 | {%- endfor %} | ||||
| 12 | ],{% endif -%} | ||||
| 13 | {% endfor %} | ||||
| 14 | } | ||||