[Chassis][QoS template] Skip configuring buffer and QoS config on recirc ports (#7869)

* Added test case to verify the template changes.
This commit is contained in:
Song Yuan 2022-03-09 16:04:36 -08:00 committed by GitHub
parent 3fa18d18d4
commit 01798447ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 6971 additions and 2 deletions

View File

@ -101,7 +101,9 @@ def
{%- endif %} {%- endif %}
{%- else %} {%- else %}
{%- for port in PORT %} {%- for port in PORT %}
{%- if PORT_ALL.append(port) %}{%- endif %} {%- if not port.startswith('Ethernet-Rec') and not port.startswith('Ethernet-IB') %}
{%- if PORT_ALL.append(port) %}{%- endif %}
{%- endif %}
{%- endfor %} {%- endfor %}
{%- endif %} {%- endif %}

View File

@ -1,6 +1,8 @@
{%- set PORT_ALL = [] %} {%- set PORT_ALL = [] %}
{%- for port in PORT %} {%- for port in PORT %}
{%- if PORT_ALL.append(port) %}{% endif %} {%- if not port.startswith('Ethernet-Rec') and not port.startswith('Ethernet-IB') %}
{%- if PORT_ALL.append(port) %}{% endif %}
{%- endif %}
{%- endfor %} {%- endfor %}
{%- if PORT_ALL | sort_by_port_index %}{% endif %} {%- if PORT_ALL | sort_by_port_index %}{% endif %}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,590 @@
{
"CABLE_LENGTH": {
"AZURE": {
"Ethernet180": "5m",
"Ethernet8": "5m",
"Ethernet184": "5m",
"Ethernet188": "5m",
"Ethernet0": "5m",
"Ethernet4": "5m",
"Ethernet108": "5m",
"Ethernet100": "5m",
"Ethernet128": "5m",
"Ethernet104": "5m",
"Ethernet68": "5m",
"Ethernet96": "5m",
"Ethernet124": "5m",
"Ethernet148": "5m",
"Ethernet92": "5m",
"Ethernet120": "5m",
"Ethernet144": "5m",
"Ethernet52": "5m",
"Ethernet160": "5m",
"Ethernet140": "5m",
"Ethernet56": "5m",
"Ethernet164": "5m",
"Ethernet76": "5m",
"Ethernet72": "5m",
"Ethernet64": "5m",
"Ethernet32": "5m",
"Ethernet16": "5m",
"Ethernet36": "5m",
"Ethernet12": "5m",
"Ethernet168": "5m",
"Ethernet116": "5m",
"Ethernet80": "5m",
"Ethernet112": "5m",
"Ethernet84": "5m",
"Ethernet152": "5m",
"Ethernet136": "5m",
"Ethernet156": "5m",
"Ethernet132": "5m",
"Ethernet48": "5m",
"Ethernet172": "5m",
"Ethernet44": "5m",
"Ethernet176": "5m",
"Ethernet40": "5m",
"Ethernet28": "5m",
"Ethernet88": "5m",
"Ethernet60": "5m",
"Ethernet20": "5m",
"Ethernet24": "5m"
}
},
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "3220805000",
"type": "both",
"mode": "dynamic",
"xoff": "2102272"
}
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"1280",
"dynamic_th":"-2",
"xon_offset":"2560",
"xon":"0",
"xoff":"66048"
},
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"xon_offset":"0",
"static_th":"30535680"
},
"egress_lossless_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"static_th":"33030144"
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"-1"
}
},
"BUFFER_PG": {
"Ethernet180|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet8|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet184|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet188|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet0|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet4|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet108|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet100|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet128|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet104|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet68|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet96|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet124|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet148|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet92|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet120|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet144|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet52|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet140|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet56|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet164|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet76|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet72|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet64|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet32|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet16|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet36|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet12|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet88|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet116|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet80|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet112|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet84|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet152|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet136|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet156|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet132|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet48|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet44|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet176|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet40|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet28|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet60|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet20|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet24|0": {
"profile" : "ingress_lossy_profile"
}
},
"BUFFER_QUEUE": {
"Ethernet180|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet8|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet184|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet188|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet0|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet4|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet108|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet100|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet128|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet104|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet68|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet96|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet124|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet148|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet92|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet120|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet144|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet52|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet140|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet56|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet164|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet76|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet72|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet64|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet32|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet16|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet36|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet12|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet88|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet116|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet80|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet112|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet84|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet152|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet136|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet156|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet132|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet48|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet44|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet176|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet40|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet28|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet60|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet20|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet24|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet180|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet8|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet184|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet188|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet0|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet4|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet108|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet100|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet128|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet104|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet68|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet96|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet124|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet148|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet92|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet120|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet144|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet52|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet140|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet56|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet164|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet76|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet72|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet64|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet32|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet16|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet36|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet12|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet88|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet116|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet80|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet112|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet84|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet152|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet136|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet156|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet132|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet48|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet44|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet176|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet40|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet28|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet60|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet20|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet24|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet180|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet8|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet184|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet188|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet0|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet4|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet108|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet100|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet128|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet104|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet68|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet96|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet124|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet148|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet92|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet120|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet144|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet52|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet140|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet56|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet164|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet76|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet72|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet64|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet32|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet16|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet36|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet12|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet88|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet116|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet80|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet112|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet84|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet152|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet136|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet156|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet132|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet48|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet44|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet176|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet40|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet28|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet60|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet20|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet24|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,590 @@
{
"CABLE_LENGTH": {
"AZURE": {
"Ethernet0": "5m",
"Ethernet4": "5m",
"Ethernet8": "5m",
"Ethernet12": "5m",
"Ethernet16": "5m",
"Ethernet20": "5m",
"Ethernet24": "5m",
"Ethernet28": "5m",
"Ethernet32": "5m",
"Ethernet36": "5m",
"Ethernet40": "5m",
"Ethernet44": "5m",
"Ethernet48": "5m",
"Ethernet52": "5m",
"Ethernet56": "5m",
"Ethernet60": "5m",
"Ethernet64": "5m",
"Ethernet68": "5m",
"Ethernet72": "5m",
"Ethernet76": "5m",
"Ethernet80": "5m",
"Ethernet84": "5m",
"Ethernet88": "5m",
"Ethernet92": "5m",
"Ethernet96": "5m",
"Ethernet100": "5m",
"Ethernet104": "5m",
"Ethernet108": "5m",
"Ethernet112": "5m",
"Ethernet116": "5m",
"Ethernet120": "5m",
"Ethernet124": "5m",
"Ethernet128": "5m",
"Ethernet132": "5m",
"Ethernet136": "5m",
"Ethernet140": "5m",
"Ethernet144": "5m",
"Ethernet148": "5m",
"Ethernet152": "5m",
"Ethernet156": "5m",
"Ethernet160": "5m",
"Ethernet164": "5m",
"Ethernet168": "5m",
"Ethernet172": "5m",
"Ethernet176": "5m",
"Ethernet180": "5m",
"Ethernet184": "5m",
"Ethernet188": "5m"
}
},
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "3220805000",
"type": "both",
"mode": "dynamic",
"xoff": "2102272"
}
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"1280",
"dynamic_th":"-2",
"xon_offset":"2560",
"xon":"0",
"xoff":"66048"
},
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"xon_offset":"0",
"static_th":"30535680"
},
"egress_lossless_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"static_th":"33030144"
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"-1"
}
},
"BUFFER_PG": {
"Ethernet0|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet36|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet40|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet44|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet48|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet52|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet56|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet60|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet64|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet68|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet72|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet4|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet76|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet80|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet84|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet88|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet92|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet96|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet100|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet104|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet108|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet112|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet8|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet116|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet120|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet124|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet128|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet132|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet136|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet140|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet144|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet148|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet152|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet12|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet156|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet164|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet176|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet180|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet184|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet188|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet16|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet20|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet24|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet28|0": {
"profile" : "ingress_lossy_profile"
},
"Ethernet32|0": {
"profile" : "ingress_lossy_profile"
}
},
"BUFFER_QUEUE": {
"Ethernet0|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet36|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet40|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet44|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet48|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet52|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet56|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet60|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet64|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet68|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet72|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet4|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet76|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet80|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet84|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet88|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet92|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet96|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet100|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet104|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet108|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet112|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet8|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet116|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet120|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet124|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet128|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet132|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet136|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet140|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet144|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet148|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet152|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet12|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet156|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet164|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet176|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet180|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet184|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet188|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet16|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet20|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet24|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet28|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet32|3-4": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"Ethernet0|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet36|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet40|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet44|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet48|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet52|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet56|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet60|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet64|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet68|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet72|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet4|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet76|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet80|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet84|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet88|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet92|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet96|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet100|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet104|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet108|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet112|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet8|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet116|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet120|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet124|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet128|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet132|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet136|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet140|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet144|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet148|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet152|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet12|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet156|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet164|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet176|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet180|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet184|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet188|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet16|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet20|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet24|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet28|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet32|0-2": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"Ethernet0|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet36|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet40|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet44|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet48|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet52|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet56|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet60|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet64|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet68|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet72|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet4|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet76|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet80|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet84|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet88|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet92|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet96|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet100|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet104|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet108|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet112|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet8|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet116|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet120|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet124|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet128|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet132|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet136|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet140|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet144|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet148|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet152|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet12|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet156|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet164|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet176|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet180|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet184|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet188|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet16|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet20|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet24|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet28|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}, "Ethernet32|5-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -23,6 +23,7 @@ class TestJ2Files(TestCase):
self.mlnx_port_config = os.path.join(self.test_dir, 'sample-port-config-mlnx.ini') self.mlnx_port_config = os.path.join(self.test_dir, 'sample-port-config-mlnx.ini')
self.dell6100_t0_minigraph = os.path.join(self.test_dir, 'sample-dell-6100-t0-minigraph.xml') self.dell6100_t0_minigraph = os.path.join(self.test_dir, 'sample-dell-6100-t0-minigraph.xml')
self.arista7050_t0_minigraph = os.path.join(self.test_dir, 'sample-arista-7050-t0-minigraph.xml') self.arista7050_t0_minigraph = os.path.join(self.test_dir, 'sample-arista-7050-t0-minigraph.xml')
self.arista7800r3_48cq2_lc_t2_minigraph = os.path.join(self.test_dir, 'sample-arista-7800r3-48cq2-lc-t2-minigraph.xml')
self.multi_asic_minigraph = os.path.join(self.test_dir, 'multi_npu_data', 'sample-minigraph.xml') self.multi_asic_minigraph = os.path.join(self.test_dir, 'multi_npu_data', 'sample-minigraph.xml')
self.multi_asic_port_config = os.path.join(self.test_dir, 'multi_npu_data', 'sample_port_config-0.ini') self.multi_asic_port_config = os.path.join(self.test_dir, 'multi_npu_data', 'sample_port_config-0.ini')
self.dell9332_t1_minigraph = os.path.join(self.test_dir, 'sample-dell-9332-t1-minigraph.xml') self.dell9332_t1_minigraph = os.path.join(self.test_dir, 'sample-dell-9332-t1-minigraph.xml')
@ -212,6 +213,30 @@ class TestJ2Files(TestCase):
sample_output_file = os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'qos-arista7050.json') sample_output_file = os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'qos-arista7050.json')
assert utils.cmp(sample_output_file, self.output_file) assert utils.cmp(sample_output_file, self.output_file)
def test_qos_and_buffer_arista7800r3_48cq2_lc_render_template(self):
arista_dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', 'arista', 'x86_64-arista_7800r3_48cq2_lc', 'Arista-7800R3-48CQ2-C48')
qos_file = os.path.join(arista_dir_path, 'qos.json.j2')
buffer_file = os.path.join(arista_dir_path, 'buffers.json.j2')
port_config_ini_file = os.path.join(arista_dir_path, 'port_config.ini')
# copy qos_config.j2 and buffer_config.j2 to the Arista 7800r3_48cq2_lc directory to have all templates in one directory
qos_config_file = os.path.join(self.test_dir, '..', '..', '..', 'files', 'build_templates', 'qos_config.j2')
shutil.copy2(qos_config_file, arista_dir_path)
buffer_config_file = os.path.join(self.test_dir, '..', '..', '..', 'files', 'build_templates', 'buffers_config.j2')
shutil.copy2(buffer_config_file, arista_dir_path)
for template_file, cfg_file, sample_output_file in [(qos_file, 'qos_config.j2', 'qos-arista7800r3-48cq2-lc.json'),
(buffer_file, 'buffers_config.j2', 'buffer-arista7800r3-48cq2-lc.json') ]:
argument = '-m ' + self.arista7800r3_48cq2_lc_t2_minigraph + ' -p ' + port_config_ini_file + ' -t ' + template_file + ' > ' + self.output_file
self.run_script(argument)
# cleanup
cfg_file_new = os.path.join(arista_dir_path, cfg_file)
os.remove(cfg_file_new)
sample_output_file = os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, sample_output_file)
assert filecmp.cmp(sample_output_file, self.output_file)
def test_qos_dell9332_render_template(self): def test_qos_dell9332_render_template(self):
dell_dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', 'dell', 'x86_64-dellemc_z9332f_d1508-r0', 'DellEMC-Z9332f-O32') dell_dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', 'dell', 'x86_64-dellemc_z9332f_d1508-r0', 'DellEMC-Z9332f-O32')
qos_file = os.path.join(dell_dir_path, 'qos.json.j2') qos_file = os.path.join(dell_dir_path, 'qos.json.j2')