|
1 | 1 | {%- set PORT_ALL = [] %}
|
2 | 2 | {%- set PORT_BP = [] %}
|
| 3 | +{%- set SYSTEM_PORT_ALL = [] %} |
| 4 | + |
| 5 | +{%- set voq_chassis = false %} |
| 6 | +{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost']['switch_type'] is defined and DEVICE_METADATA['localhost']['switch_type'] == 'voq' %} |
| 7 | +{%- set voq_chassis = true %} |
| 8 | +{%- endif -%} |
| 9 | + |
| 10 | +{%- if voq_chassis %} |
| 11 | + {%- for system_port in SYSTEM_PORT %} |
| 12 | + {% if '|' not in system_port %} |
| 13 | + {%- set system_port_name = system_port|join("|") %} |
| 14 | + {% else %} |
| 15 | + {%- set system_port_name = system_port %} |
| 16 | + {% endif %} |
| 17 | + {%- if 'cpu' not in system_port_name.lower() and 'IB' not in system_port_name and 'Rec' not in system_port_name %} |
| 18 | + {%- if SYSTEM_PORT_ALL.append(system_port_name) %}{%- endif %} |
| 19 | + {%- endif %} |
| 20 | + {%- endfor %} |
| 21 | +{%- endif %} |
3 | 22 | {%- for port in PORT %}
|
4 | 23 | {%- if not port.startswith('Ethernet-Rec') and not port.startswith('Ethernet-IB') %}
|
5 | 24 | {%- if PORT_ALL.append(port) %}{% endif %}
|
|
307 | 326 | }
|
308 | 327 | },
|
309 | 328 | {% endif %}
|
| 329 | +{% if voq_chassis %} |
310 | 330 | "QUEUE": {
|
| 331 | +{% for system_port in SYSTEM_PORT_ALL %} |
| 332 | + "{{ system_port }}|3": { |
| 333 | + "scheduler" : "scheduler.1", |
| 334 | + "wred_profile": "AZURE_LOSSLESS" |
| 335 | + }, |
| 336 | +{% endfor %} |
| 337 | +{% for system_port in SYSTEM_PORT_ALL %} |
| 338 | + "{{ system_port }}|4": { |
| 339 | + "scheduler" : "scheduler.1", |
| 340 | + "wred_profile": "AZURE_LOSSLESS" |
| 341 | + }, |
| 342 | +{% endfor %} |
| 343 | +{% for system_port in SYSTEM_PORT_ALL %} |
| 344 | + "{{ system_port }}|0": { |
| 345 | + "scheduler": "scheduler.0" |
| 346 | + }, |
| 347 | +{% endfor %} |
| 348 | +{% for system_port in SYSTEM_PORT_ALL %} |
| 349 | + "{{ system_port }}|1": { |
| 350 | + "scheduler": "scheduler.0" |
| 351 | + }, |
| 352 | +{% endfor %} |
| 353 | +{% for system_port in SYSTEM_PORT_ALL %} |
| 354 | + "{{ system_port }}|2": { |
| 355 | + "scheduler": "scheduler.0" |
| 356 | + }, |
| 357 | +{% endfor %} |
| 358 | +{% for system_port in SYSTEM_PORT_ALL %} |
| 359 | + "{{ system_port }}|5": { |
| 360 | + "scheduler": "scheduler.0" |
| 361 | + }, |
| 362 | +{% endfor %} |
| 363 | +{% for system_port in SYSTEM_PORT_ALL %} |
| 364 | + "{{ system_port }}|6": { |
| 365 | + "scheduler": "scheduler.0" |
| 366 | + }{% if not loop.last %},{% endif %} |
| 367 | +{% endfor %} |
| 368 | + } |
| 369 | +{% else %} |
| 370 | + "QUEUE": { |
311 | 371 | {% for port in PORT_ACTIVE %}
|
312 | 372 | "{{ port }}|3": {
|
313 | 373 | "scheduler" : "scheduler.1",
|
|
372 | 432 |
|
373 | 433 | {% endfor %}
|
374 | 434 | }
|
| 435 | +{% endif %} |
375 | 436 | }
|
0 commit comments