2017-08-23 21:41:14 -05:00
|
|
|
[
|
2018-01-29 10:11:05 -06:00
|
|
|
{% set ports_with_speed_set=[] %}
|
2017-09-12 16:13:27 -05:00
|
|
|
{% if PORT %}
|
|
|
|
{% for port in PORT %}
|
|
|
|
{% if PORT[port].has_key('speed') %}
|
2018-01-29 10:11:05 -06:00
|
|
|
{%- if ports_with_speed_set.append(port) -%}{%- endif -%}
|
|
|
|
{%- endif -%}
|
|
|
|
{% endfor %}
|
|
|
|
{% for port in ports_with_speed_set %}
|
2017-08-23 21:41:14 -05:00
|
|
|
{
|
2017-09-12 16:13:27 -05:00
|
|
|
"PORT_TABLE:{{ port }}": {
|
2017-12-08 11:06:22 -06:00
|
|
|
"speed": "{{ PORT[port]['speed'] }}",
|
2017-12-06 23:45:45 -06:00
|
|
|
"description": "{{ PORT[port]['description'] }}"
|
2017-08-23 21:41:14 -05:00
|
|
|
},
|
|
|
|
"OP": "SET"
|
|
|
|
}{% if not loop.last %},{% endif %}
|
|
|
|
|
|
|
|
{% endfor %}
|
2017-09-12 16:13:27 -05:00
|
|
|
{% endif %}
|
2017-08-23 21:41:14 -05:00
|
|
|
]
|