diff --git a/device/common/profiles/th2/7260/BALANCED/pg_profile_lookup.ini b/device/common/profiles/th2/7260/BALANCED/pg_profile_lookup.ini index 9d94e3fc1e..0ff01d9aa5 100644 --- a/device/common/profiles/th2/7260/BALANCED/pg_profile_lookup.ini +++ b/device/common/profiles/th2/7260/BALANCED/pg_profile_lookup.ini @@ -1,11 +1,11 @@ # PG lossless profiles. # speed cable size xon xoff threshold xon_offset - 100000 5m 1248 1248 54080 -3 2496 - 100000 40m 1248 1248 59696 -3 2496 - 100000 300m 1248 1248 101088 -3 2496 - 50000 5m 1248 1248 54080 -3 2496 - 50000 40m 1248 1248 59696 -3 2496 - 50000 300m 1248 1248 101088 -3 2496 - 40000 5m 1248 1248 29536 -3 2496 - 40000 40m 1248 1248 31616 -3 2496 - 40000 300m 1248 1248 48256 -3 2496 + 100000 5m 1248 1248 54080 0 2496 + 100000 40m 1248 1248 59696 0 2496 + 100000 300m 1248 1248 101088 0 2496 + 50000 5m 1248 1248 54080 0 2496 + 50000 40m 1248 1248 59696 0 2496 + 50000 300m 1248 1248 101088 0 2496 + 40000 5m 1248 1248 29536 0 2496 + 40000 40m 1248 1248 31616 0 2496 + 40000 300m 1248 1248 48256 0 2496 diff --git a/device/common/profiles/th2/7260/BALANCED/qos.json.j2 b/device/common/profiles/th2/7260/BALANCED/qos.json.j2 index 3e548325ea..3e1d8df928 100644 --- a/device/common/profiles/th2/7260/BALANCED/qos.json.j2 +++ b/device/common/profiles/th2/7260/BALANCED/qos.json.j2 @@ -1 +1,21 @@ +{%- macro generate_wred_profiles() %} + "WRED_PROFILE": { + "AZURE_LOSSLESS" : { + "wred_green_enable" : "true", + "wred_yellow_enable" : "true", + "wred_red_enable" : "true", + "ecn" : "ecn_all", + "green_max_threshold" : "10000000", + "green_min_threshold" : "2000000", + "yellow_max_threshold" : "2097152", + "yellow_min_threshold" : "1048576", + "red_max_threshold" : "2097152", + "red_min_threshold" : "1048576", + "green_drop_probability" : "5", + "yellow_drop_probability": "5", + "red_drop_probability" : "5" + } + }, +{%- endmacro %} + {%- include 'qos_config.j2' %} diff --git a/device/common/profiles/th2/7260/RDMA-CENTRIC/pg_profile_lookup.ini b/device/common/profiles/th2/7260/RDMA-CENTRIC/pg_profile_lookup.ini index 9d94e3fc1e..0ff01d9aa5 100644 --- a/device/common/profiles/th2/7260/RDMA-CENTRIC/pg_profile_lookup.ini +++ b/device/common/profiles/th2/7260/RDMA-CENTRIC/pg_profile_lookup.ini @@ -1,11 +1,11 @@ # PG lossless profiles. # speed cable size xon xoff threshold xon_offset - 100000 5m 1248 1248 54080 -3 2496 - 100000 40m 1248 1248 59696 -3 2496 - 100000 300m 1248 1248 101088 -3 2496 - 50000 5m 1248 1248 54080 -3 2496 - 50000 40m 1248 1248 59696 -3 2496 - 50000 300m 1248 1248 101088 -3 2496 - 40000 5m 1248 1248 29536 -3 2496 - 40000 40m 1248 1248 31616 -3 2496 - 40000 300m 1248 1248 48256 -3 2496 + 100000 5m 1248 1248 54080 0 2496 + 100000 40m 1248 1248 59696 0 2496 + 100000 300m 1248 1248 101088 0 2496 + 50000 5m 1248 1248 54080 0 2496 + 50000 40m 1248 1248 59696 0 2496 + 50000 300m 1248 1248 101088 0 2496 + 40000 5m 1248 1248 29536 0 2496 + 40000 40m 1248 1248 31616 0 2496 + 40000 300m 1248 1248 48256 0 2496 diff --git a/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 b/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 index 3e548325ea..3e1d8df928 100644 --- a/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 +++ b/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 @@ -1 +1,21 @@ +{%- macro generate_wred_profiles() %} + "WRED_PROFILE": { + "AZURE_LOSSLESS" : { + "wred_green_enable" : "true", + "wred_yellow_enable" : "true", + "wred_red_enable" : "true", + "ecn" : "ecn_all", + "green_max_threshold" : "10000000", + "green_min_threshold" : "2000000", + "yellow_max_threshold" : "2097152", + "yellow_min_threshold" : "1048576", + "red_max_threshold" : "2097152", + "red_min_threshold" : "1048576", + "green_drop_probability" : "5", + "yellow_drop_probability": "5", + "red_drop_probability" : "5" + } + }, +{%- endmacro %} + {%- include 'qos_config.j2' %} diff --git a/src/sonic-config-engine/tests/sample-arista-7260-t1-minigraph.xml b/src/sonic-config-engine/tests/sample-arista-7260-t1-minigraph.xml new file mode 100644 index 0000000000..422e29c239 --- /dev/null +++ b/src/sonic-config-engine/tests/sample-arista-7260-t1-minigraph.xml @@ -0,0 +1,2491 @@ + + + + + + false + sdev-7260-1 + 10.0.0.32 + ARISTA01T0 + 10.0.0.33 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::41 + ARISTA01T0 + FC00::42 + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::1 + ARISTA01T2 + FC00::2 + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.34 + ARISTA02T0 + 10.0.0.35 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::45 + ARISTA02T0 + FC00::46 + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.36 + ARISTA03T0 + 10.0.0.37 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::49 + ARISTA03T0 + FC00::4A + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.4 + ARISTA03T2 + 10.0.0.5 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::5 + ARISTA03T2 + FC00::6 + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.38 + ARISTA04T0 + 10.0.0.39 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::4D + ARISTA04T0 + FC00::4E + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.40 + ARISTA05T0 + 10.0.0.41 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::51 + ARISTA05T0 + FC00::52 + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.8 + ARISTA05T2 + 10.0.0.9 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::9 + ARISTA05T2 + FC00::A + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.42 + ARISTA06T0 + 10.0.0.43 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::55 + ARISTA06T0 + FC00::56 + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.44 + ARISTA07T0 + 10.0.0.45 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::59 + ARISTA07T0 + FC00::5A + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.12 + ARISTA07T2 + 10.0.0.13 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::D + ARISTA07T2 + FC00::E + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.46 + ARISTA08T0 + 10.0.0.47 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::5D + ARISTA08T0 + FC00::5E + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.48 + ARISTA09T0 + 10.0.0.49 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::61 + ARISTA09T0 + FC00::62 + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.50 + ARISTA10T0 + 10.0.0.51 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::65 + ARISTA10T0 + FC00::66 + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.52 + ARISTA11T0 + 10.0.0.53 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::69 + ARISTA11T0 + FC00::6A + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.54 + ARISTA12T0 + 10.0.0.55 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::6D + ARISTA12T0 + FC00::6E + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.56 + ARISTA13T0 + 10.0.0.57 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::71 + ARISTA13T0 + FC00::72 + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.58 + ARISTA14T0 + 10.0.0.59 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::75 + ARISTA14T0 + FC00::76 + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.60 + ARISTA15T0 + 10.0.0.61 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::79 + ARISTA15T0 + FC00::7A + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.62 + ARISTA16T0 + 10.0.0.63 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::7D + ARISTA16T0 + FC00::7E + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.64 + ARISTA17T0 + 10.0.0.65 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::81 + ARISTA17T0 + FC00::82 + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.66 + ARISTA18T0 + 10.0.0.67 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::85 + ARISTA18T0 + FC00::86 + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.68 + ARISTA19T0 + 10.0.0.69 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::89 + ARISTA19T0 + FC00::8A + 1 + 10 + 3 + + + false + sdev-7260-1 + 10.0.0.70 + ARISTA20T0 + 10.0.0.71 + 1 + 10 + 3 + + + sdev-7260-1 + FC00::8D + ARISTA20T0 + FC00::8E + 1 + 10 + 3 + + + + + 65100 + sdev-7260-1 + + +
10.0.0.33
+ + + +
+ +
10.0.0.1
+ + + +
+ +
10.0.0.35
+ + + +
+ +
10.0.0.37
+ + + +
+ +
10.0.0.5
+ + + +
+ +
10.0.0.39
+ + + +
+ +
10.0.0.41
+ + + +
+ +
10.0.0.9
+ + + +
+ +
10.0.0.43
+ + + +
+ +
10.0.0.45
+ + + +
+ +
10.0.0.13
+ + + +
+ +
10.0.0.47
+ + + +
+ +
10.0.0.49
+ + + +
+ +
10.0.0.51
+ + + +
+ +
10.0.0.53
+ + + +
+ +
10.0.0.55
+ + + +
+ +
10.0.0.57
+ + + +
+ +
10.0.0.59
+ + + +
+ +
10.0.0.61
+ + + +
+ +
10.0.0.63
+ + + +
+ +
10.0.0.65
+ + + +
+ +
10.0.0.67
+ + + +
+ +
10.0.0.69
+ + + +
+ +
10.0.0.71
+ + + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 64003 + ARISTA03T0 + + + + 65200 + ARISTA03T2 + + + + 64004 + ARISTA04T0 + + + + 64005 + ARISTA05T0 + + + + 65200 + ARISTA05T2 + + + + 64006 + ARISTA06T0 + + + + 64007 + ARISTA07T0 + + + + 65200 + ARISTA07T2 + + + + 64008 + ARISTA08T0 + + + + 64009 + ARISTA09T0 + + + + 64010 + ARISTA10T0 + + + + 64011 + ARISTA11T0 + + + + 64012 + ARISTA12T0 + + + + 64013 + ARISTA13T0 + + + + 64014 + ARISTA14T0 + + + + 64015 + ARISTA15T0 + + + + 64016 + ARISTA16T0 + + + + 64017 + ARISTA17T0 + + + + 64018 + ARISTA18T0 + + + + 64019 + ARISTA19T0 + + + + 64020 + ARISTA20T0 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + HostIP1 + Loopback0 + + FC00:1::32/128 + + FC00:1::32/128 + + + + + HostIP + eth0 + + 10.64.246.78/23 + + 10.64.246.78/23 + + + V6HostIP + eth0 + + FC00:2::32/64 + + FC00:2::32/64 + + + + + + + sdev-7260-1 + + + PortChannel101 + Ethernet35/1 + + + + PortChannel102 + Ethernet1/1;Ethernet2/1 + + + + PortChannel103 + Ethernet37/1 + + + + PortChannel104 + Ethernet38/1 + + + + PortChannel105 + Ethernet5/1;Ethernet6/1 + + + + PortChannel106 + Ethernet39/1 + + + + PortChannel107 + Ethernet40/1 + + + + PortChannel108 + Ethernet17/1;Ethernet18/1 + + + + PortChannel109 + Ethernet43/1 + + + + PortChannel1010 + Ethernet45/1 + + + + PortChannel1011 + Ethernet21/1;Ethernet22/1 + + + + PortChannel1012 + Ethernet46/1 + + + + PortChannel1013 + Ethernet47/1 + + + + PortChannel1014 + Ethernet48/1 + + + + PortChannel1015 + Ethernet51/1 + + + + PortChannel1016 + Ethernet53/1 + + + + PortChannel1017 + Ethernet54/1 + + + + PortChannel1018 + Ethernet55/1 + + + + PortChannel1019 + Ethernet56/1 + + + + PortChannel1020 + Ethernet59/1 + + + + PortChannel1021 + Ethernet61/1 + + + + PortChannel1022 + Ethernet62/1 + + + + PortChannel1023 + Ethernet63/1 + + + + PortChannel1024 + Ethernet64/1 + + + + + + + + + PortChannel101 + 10.0.0.32/31 + + + + PortChannel101 + FC00::41/126 + + + + PortChannel102 + 10.0.0.0/31 + + + + PortChannel102 + FC00::1/126 + + + + PortChannel103 + 10.0.0.34/31 + + + + PortChannel103 + FC00::45/126 + + + + PortChannel104 + 10.0.0.36/31 + + + + PortChannel104 + FC00::49/126 + + + + PortChannel105 + 10.0.0.4/31 + + + + PortChannel105 + FC00::5/126 + + + + PortChannel106 + 10.0.0.38/31 + + + + PortChannel106 + FC00::4D/126 + + + + PortChannel107 + 10.0.0.40/31 + + + + PortChannel107 + FC00::51/126 + + + + PortChannel108 + 10.0.0.8/31 + + + + PortChannel108 + FC00::9/126 + + + + PortChannel109 + 10.0.0.42/31 + + + + PortChannel109 + FC00::55/126 + + + + PortChannel1010 + 10.0.0.44/31 + + + + PortChannel1010 + FC00::59/126 + + + + PortChannel1011 + 10.0.0.12/31 + + + + PortChannel1011 + FC00::D/126 + + + + PortChannel1012 + 10.0.0.46/31 + + + + PortChannel1012 + FC00::5D/126 + + + + PortChannel1013 + 10.0.0.48/31 + + + + PortChannel1013 + FC00::61/126 + + + + PortChannel1014 + 10.0.0.50/31 + + + + PortChannel1014 + FC00::65/126 + + + + PortChannel1015 + 10.0.0.52/31 + + + + PortChannel1015 + FC00::69/126 + + + + PortChannel1016 + 10.0.0.54/31 + + + + PortChannel1016 + FC00::6D/126 + + + + PortChannel1017 + 10.0.0.56/31 + + + + PortChannel1017 + FC00::71/126 + + + + PortChannel1018 + 10.0.0.58/31 + + + + PortChannel1018 + FC00::75/126 + + + + PortChannel1019 + 10.0.0.60/31 + + + + PortChannel1019 + FC00::79/126 + + + + PortChannel1020 + 10.0.0.62/31 + + + + PortChannel1020 + FC00::7D/126 + + + + PortChannel1021 + 10.0.0.64/31 + + + + PortChannel1021 + FC00::81/126 + + + + PortChannel1022 + 10.0.0.66/31 + + + + PortChannel1022 + FC00::85/126 + + + + PortChannel1023 + 10.0.0.68/31 + + + + PortChannel1023 + FC00::89/126 + + + + PortChannel1024 + 10.0.0.70/31 + + + + PortChannel1024 + FC00::8D/126 + + + + + + NTP_ACL + NTP + NTP + + + SNMP_ACL + SNMP + SNMP + + + ERSPAN + Everflow + Everflow + + + ERSPANV6 + EverflowV6 + EverflowV6 + + + VTY_LINE + ssh-only + SSH + + + PortChannel101;PortChannel102;PortChannel103;PortChannel104;PortChannel105;PortChannel106;PortChannel107;PortChannel108;PortChannel109;PortChannel1010;PortChannel1011;PortChannel1012;PortChannel1013;PortChannel1014;PortChannel1015;PortChannel1016;PortChannel1017;PortChannel1018;PortChannel1019;PortChannel1020;PortChannel1021;PortChannel1022;PortChannel1023;PortChannel1024 + DataAcl + DataPlane + + + + + + + + + + DeviceInterfaceLink + ARISTA01T0 + Ethernet1 + sdev-7260-1 + Ethernet35/1 + + + DeviceInterfaceLink + ARISTA01T2 + Ethernet1 + sdev-7260-1 + Ethernet1/1 + + + DeviceInterfaceLink + ARISTA01T2 + Ethernet2 + sdev-7260-1 + Ethernet2/1 + + + DeviceInterfaceLink + ARISTA02T0 + Ethernet1 + sdev-7260-1 + Ethernet37/1 + + + DeviceInterfaceLink + ARISTA03T0 + Ethernet1 + sdev-7260-1 + Ethernet38/1 + + + DeviceInterfaceLink + ARISTA03T2 + Ethernet1 + sdev-7260-1 + Ethernet5/1 + + + DeviceInterfaceLink + ARISTA03T2 + Ethernet2 + sdev-7260-1 + Ethernet6/1 + + + DeviceInterfaceLink + ARISTA04T0 + Ethernet1 + sdev-7260-1 + Ethernet39/1 + + + DeviceInterfaceLink + ARISTA05T0 + Ethernet1 + sdev-7260-1 + Ethernet40/1 + + + DeviceInterfaceLink + ARISTA05T2 + Ethernet1 + sdev-7260-1 + Ethernet17/1 + + + DeviceInterfaceLink + ARISTA05T2 + Ethernet2 + sdev-7260-1 + Ethernet18/1 + + + DeviceInterfaceLink + ARISTA06T0 + Ethernet1 + sdev-7260-1 + Ethernet43/1 + + + DeviceInterfaceLink + ARISTA07T0 + Ethernet1 + sdev-7260-1 + Ethernet45/1 + + + DeviceInterfaceLink + ARISTA07T2 + Ethernet1 + sdev-7260-1 + Ethernet21/1 + + + DeviceInterfaceLink + ARISTA07T2 + Ethernet2 + sdev-7260-1 + Ethernet22/1 + + + DeviceInterfaceLink + ARISTA08T0 + Ethernet1 + sdev-7260-1 + Ethernet46/1 + + + DeviceInterfaceLink + ARISTA09T0 + Ethernet1 + sdev-7260-1 + Ethernet47/1 + + + DeviceInterfaceLink + ARISTA10T0 + Ethernet1 + sdev-7260-1 + Ethernet48/1 + + + DeviceInterfaceLink + ARISTA11T0 + Ethernet1 + sdev-7260-1 + Ethernet51/1 + + + DeviceInterfaceLink + ARISTA12T0 + Ethernet1 + sdev-7260-1 + Ethernet53/1 + + + DeviceInterfaceLink + ARISTA13T0 + Ethernet1 + sdev-7260-1 + Ethernet54/1 + + + DeviceInterfaceLink + ARISTA14T0 + Ethernet1 + sdev-7260-1 + Ethernet55/1 + + + DeviceInterfaceLink + ARISTA15T0 + Ethernet1 + sdev-7260-1 + Ethernet56/1 + + + DeviceInterfaceLink + ARISTA16T0 + Ethernet1 + sdev-7260-1 + Ethernet59/1 + + + DeviceInterfaceLink + ARISTA17T0 + Ethernet1 + sdev-7260-1 + Ethernet61/1 + + + DeviceInterfaceLink + ARISTA18T0 + Ethernet1 + sdev-7260-1 + Ethernet62/1 + + + DeviceInterfaceLink + ARISTA19T0 + Ethernet1 + sdev-7260-1 + Ethernet63/1 + + + DeviceInterfaceLink + ARISTA20T0 + Ethernet1 + sdev-7260-1 + Ethernet64/1 + + + + + sdev-7260-1 + Arista-7260CX3-C64 + + 10.64.246.78 + + + + ARISTA16T0 + + 172.16.141.95 + + Arista-VM + + + ARISTA11T0 + + 172.16.141.90 + + Arista-VM + + + ARISTA10T0 + + 172.16.141.89 + + Arista-VM + + + ARISTA17T0 + + 172.16.141.96 + + Arista-VM + + + ARISTA09T0 + + 172.16.141.88 + + Arista-VM + + + ARISTA20T0 + + 172.16.141.99 + + Arista-VM + + + ARISTA08T0 + + 172.16.141.87 + + Arista-VM + + + ARISTA07T0 + + 172.16.141.86 + + Arista-VM + + + ARISTA07T2 + + 172.16.141.79 + + Arista-VM + + + ARISTA01T2 + + 172.16.141.76 + + Arista-VM + + + ARISTA01T0 + + 172.16.141.80 + + Arista-VM + + + ARISTA05T2 + + 172.16.141.78 + + Arista-VM + + + ARISTA05T0 + + 172.16.141.84 + + Arista-VM + + + ARISTA02T0 + + 172.16.141.81 + + Arista-VM + + + ARISTA03T0 + + 172.16.141.82 + + Arista-VM + + + ARISTA03T2 + + 172.16.141.77 + + Arista-VM + + + ARISTA04T0 + + 172.16.141.83 + + Arista-VM + + + ARISTA18T0 + + 172.16.141.97 + + Arista-VM + + + ARISTA15T0 + + 172.16.141.94 + + Arista-VM + + + ARISTA19T0 + + 172.16.141.98 + + Arista-VM + + + ARISTA14T0 + + 172.16.141.93 + + Arista-VM + + + ARISTA12T0 + + 172.16.141.91 + + Arista-VM + + + ARISTA13T0 + + 172.16.141.92 + + Arista-VM + + + ARISTA06T0 + + 172.16.141.85 + + Arista-VM + + + + + + true + + + DeviceInterface + + true + true + 1 + Ethernet1/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet2/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet3/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet4/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet5/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet6/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet7/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet8/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet9/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet10/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet11/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet12/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet13/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet14/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet15/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet16/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet17/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet18/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet19/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet20/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet21/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet22/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet23/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet24/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet25/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet26/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet27/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet28/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet29/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet30/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet31/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet32/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet33/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet34/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet35/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet36/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet37/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet38/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet39/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet40/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet41/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet42/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet43/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet44/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet45/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet46/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet47/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet48/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet49/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet50/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet51/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet52/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet53/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet54/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet55/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet56/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet57/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet58/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet59/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet60/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet61/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet62/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet63/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet64/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet65 + + false + 0 + 0 + 10000 + + + DeviceInterface + + true + true + 1 + Ethernet66 + + false + 0 + 0 + 10000 + + + true + 0 + Arista-7260CX3-C64 + + + + + + + sdev-7260-1 + + + DeploymentId + + 1 + + + QosProfile + + Profile0 + + + DhcpResources + + 192.0.0.1;192.0.0.2;192.0.0.3;192.0.0.4;192.0.0.5;192.0.0.6;192.0.0.7;192.0.0.8;192.0.0.9;192.0.0.10;192.0.0.11;192.0.0.12;192.0.0.13;192.0.0.14;192.0.0.15;192.0.0.16;192.0.0.17;192.0.0.18;192.0.0.19;192.0.0.20;192.0.0.21;192.0.0.22;192.0.0.23;192.0.0.24;192.0.0.25;192.0.0.26;192.0.0.27;192.0.0.28;192.0.0.29;192.0.0.30;192.0.0.31;192.0.0.32;192.0.0.33;192.0.0.34;192.0.0.35;192.0.0.36;192.0.0.37;192.0.0.38;192.0.0.39;192.0.0.40;192.0.0.41;192.0.0.42;192.0.0.43;192.0.0.44;192.0.0.45;192.0.0.46;192.0.0.47;192.0.0.48 + + + NtpResources + + 10.20.8.129;10.20.8.130 + + + SnmpResources + + 10.3.145.98 + + + SyslogResources + + 10.64.246.95 + + + TacacsGroup + + Starlab + + + TacacsServer + + 100.127.20.21 + + + ForcedMgmtRoutes + + 10.3.145.98/31;10.3.145.8;100.127.20.16/28;10.3.149.170/31;40.122.216.24;13.91.48.226;10.3.145.14;10.64.246.0/24;10.64.247.0/24;10.64.5.5 + + + ErspanDestinationIpv4 + + 10.20.6.16 + + + + + + + sdev-7260-1 + Arista-7260CX3-C64 +
diff --git a/src/sonic-config-engine/tests/sample_output/qos-arista7260.json b/src/sonic-config-engine/tests/sample_output/qos-arista7260.json new file mode 100644 index 0000000000..d95dcbe8ed --- /dev/null +++ b/src/sonic-config-engine/tests/sample_output/qos-arista7260.json @@ -0,0 +1,977 @@ +{ + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "0", + "2": "0", + "3": "3", + "4": "4", + "5": "0", + "6": "0", + "7": "7" + } + }, + "MAP_PFC_PRIORITY_TO_QUEUE": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "TC_TO_QUEUE_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "DSCP_TO_TC_MAP": { + "AZURE": { + "0" : "1", + "1" : "1", + "2" : "1", + "3" : "3", + "4" : "4", + "5" : "2", + "6" : "1", + "7" : "1", + "8" : "0", + "9" : "1", + "10": "1", + "11": "1", + "12": "1", + "13": "1", + "14": "1", + "15": "1", + "16": "1", + "17": "1", + "18": "1", + "19": "1", + "20": "1", + "21": "1", + "22": "1", + "23": "1", + "24": "1", + "25": "1", + "26": "1", + "27": "1", + "28": "1", + "29": "1", + "30": "1", + "31": "1", + "32": "1", + "33": "1", + "34": "1", + "35": "1", + "36": "1", + "37": "1", + "38": "1", + "39": "1", + "40": "1", + "41": "1", + "42": "1", + "43": "1", + "44": "1", + "45": "1", + "46": "5", + "47": "1", + "48": "6", + "49": "1", + "50": "1", + "51": "1", + "52": "1", + "53": "1", + "54": "1", + "55": "1", + "56": "1", + "57": "1", + "58": "1", + "59": "1", + "60": "1", + "61": "1", + "62": "1", + "63": "1" + } + }, + "SCHEDULER": { + "scheduler.0": { + "type" : "DWRR", + "weight": "14" + }, + "scheduler.1": { + "type" : "DWRR", + "weight": "15" + } + }, + "PORT_QOS_MAP": { + "Ethernet0": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet4": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet16": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet20": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet64": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet68": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet80": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet84": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet136": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet144": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet148": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet152": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet156": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet168": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet176": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet180": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet184": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet188": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet200": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet208": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet212": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet216": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet220": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet232": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet240": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet244": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet248": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + }, + "Ethernet252": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable" : "3,4" + } + }, + "WRED_PROFILE": { + "AZURE_LOSSLESS" : { + "wred_green_enable" : "true", + "wred_yellow_enable" : "true", + "wred_red_enable" : "true", + "ecn" : "ecn_all", + "green_max_threshold" : "10000000", + "green_min_threshold" : "2000000", + "yellow_max_threshold" : "2097152", + "yellow_min_threshold" : "1048576", + "red_max_threshold" : "2097152", + "red_min_threshold" : "1048576", + "green_drop_probability" : "5", + "yellow_drop_probability": "5", + "red_drop_probability" : "5" + } + }, + "QUEUE": { + "Ethernet0|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet4|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet16|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet20|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet64|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet68|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet80|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet84|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet136|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet144|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet148|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet152|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet156|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet168|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet176|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet180|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet184|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet188|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet200|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet208|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet212|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet216|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet220|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet232|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet240|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet244|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet248|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet252|3": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet0|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet4|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet16|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet20|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet64|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet68|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet80|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet84|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet136|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet144|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet148|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet152|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet156|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet168|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet176|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet180|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet184|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet188|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet200|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet208|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet212|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet216|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet220|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet232|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet240|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet244|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet248|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet252|4": { + "scheduler" : "[SCHEDULER|scheduler.1]", + "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet0|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet4|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet16|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet20|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet64|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet68|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet80|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet84|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet136|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet144|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet148|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet152|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet156|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet168|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet176|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet180|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet184|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet188|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet200|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet208|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet212|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet216|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet220|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet232|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet240|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet244|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet248|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet252|0": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet0|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet4|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet16|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet20|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet64|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet68|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet80|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet84|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet136|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet144|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet148|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet152|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet156|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet168|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet176|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet180|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet184|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet188|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet200|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet208|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet212|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet216|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet220|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet232|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet240|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet244|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet248|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet252|1": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet0|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet4|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet16|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet20|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet64|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet68|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet80|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet84|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet136|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet144|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet148|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet152|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet156|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet168|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet176|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet180|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet184|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet188|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet200|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet208|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet212|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet216|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet220|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet232|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet240|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet244|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet248|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet252|2": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet0|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet4|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet16|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet20|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet64|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet68|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet80|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet84|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet136|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet144|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet148|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet152|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet156|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet168|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet176|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet180|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet184|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet188|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet200|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet208|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet212|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet216|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet220|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet232|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet240|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet244|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet248|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet252|5": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet0|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet4|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet16|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet20|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet64|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet68|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet80|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet84|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet136|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet144|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet148|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet152|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet156|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet168|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet176|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet180|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet184|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet188|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet200|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet208|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet212|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet216|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet220|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet232|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet240|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet244|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet248|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + }, + "Ethernet252|6": { + "scheduler": "[SCHEDULER|scheduler.0]" + } + } +} diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py index f3b8598690..042877f470 100644 --- a/src/sonic-config-engine/tests/test_j2files.py +++ b/src/sonic-config-engine/tests/test_j2files.py @@ -17,7 +17,6 @@ class TestJ2Files(TestCase): self.t1_mlnx_minigraph = os.path.join(self.test_dir, 't1-sample-graph-mlnx.xml') 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.arista7050_t0_minigraph = os.path.join(self.test_dir, 'sample-arista-7050-t0-minigraph.xml') self.output_file = os.path.join(self.test_dir, 'output') def run_script(self, argument): @@ -27,10 +26,13 @@ class TestJ2Files(TestCase): def run_diff(self, file1, file2): return subprocess.check_output('diff -u {} {} || true'.format(file1, file2), shell=True) - def create_machine_conf(self, platform): + def create_machine_conf(self, platform, vendor): file_exist = True dir_exist = True - echo_cmd = "echo 'onie_platform={}' | sudo tee -a /host/machine.conf > /dev/null".format(platform) + mode = {'arista': 'aboot', + 'dell': 'onie' + } + echo_cmd = "echo '{}_platform={}' | sudo tee -a /host/machine.conf > /dev/null".format(mode[vendor], platform) if not os.path.exists('/host/machine.conf'): file_exist = False if not os.path.isdir('/host'): @@ -116,49 +118,40 @@ class TestJ2Files(TestCase): self.assertTrue(filecmp.cmp(sample_output_file, self.output_file)) - def test_qos_arista7050_render_template(self): - arista_dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', 'arista', 'x86_64-arista_7050_qx32s', 'Arista-7050-QX-32S') - qos_file = os.path.join(arista_dir_path, 'qos.json.j2') - port_config_ini_file = os.path.join(arista_dir_path, 'port_config.ini') + def _test_qos_render_template(self, vendor, platform, sku, minigraph, expected): + file_exist, dir_exist = self.create_machine_conf(platform, vendor) + dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', vendor, platform, sku) + qos_file = os.path.join(dir_path, 'qos.json.j2') + port_config_ini_file = os.path.join(dir_path, 'port_config.ini') - # copy qos_config.j2 to the Arista 7050 directory to have all templates in one directory + # copy qos_config.j2 to the SKU 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) + shutil.copy2(qos_config_file, dir_path) - argument = '-m ' + self.arista7050_t0_minigraph + ' -p ' + port_config_ini_file + ' -t ' + qos_file + ' > ' + self.output_file + minigraph = os.path.join(self.test_dir, minigraph) + argument = '-m ' + minigraph + ' -p ' + port_config_ini_file + ' -t ' + qos_file + ' > ' + self.output_file self.run_script(argument) # cleanup - qos_config_file_new = os.path.join(arista_dir_path, 'qos_config.j2') - os.remove(qos_config_file_new) - - sample_output_file = os.path.join(self.test_dir, 'sample_output', 'qos-arista7050.json') - assert filecmp.cmp(sample_output_file, self.output_file) - - def test_qos_dell6100_render_template(self): - file_exist, dir_exist = self.create_machine_conf('x86_64-dell_s6100_c2538-r0') - dell_dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', 'dell', 'x86_64-dell_s6100_c2538-r0', 'Force10-S6100') - qos_file = os.path.join(dell_dir_path, 'qos.json.j2') - port_config_ini_file = os.path.join(dell_dir_path, 'port_config.ini') - - # copy qos_config.j2 to the Dell S6100 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, dell_dir_path) - - argument = '-m ' + self.dell6100_t0_minigraph + ' -p ' + port_config_ini_file + ' -t ' + qos_file + ' > ' + self.output_file - self.run_script(argument) - - # cleanup - qos_config_file_new = os.path.join(dell_dir_path, 'qos_config.j2') + qos_config_file_new = os.path.join(dir_path, 'qos_config.j2') os.remove(qos_config_file_new) self.remove_machine_conf(file_exist, dir_exist) - sample_output_file = os.path.join(self.test_dir, 'sample_output', 'qos-dell6100.json') - assert filecmp.cmp(sample_output_file, self.output_file) + sample_output_file = os.path.join(self.test_dir, 'sample_output', expected) + assert filecmp.cmp(sample_output_file, self.output_file), self.run_diff(sample_output_file, self.output_file) + + def test_qos_arista7050_render_template(self): + self._test_qos_render_template('arista', 'x86_64-arista_7050_qx32s', 'Arista-7050-QX-32S', 'sample-arista-7050-t0-minigraph.xml', 'qos-arista7050.json') + + def test_qos_dell6100_render_template(self): + self._test_qos_render_template('dell', 'x86_64-dell_s6100_c2538-r0', 'Force10-S6100', 'sample-dell-6100-t0-minigraph.xml', 'qos-dell6100.json') + + def test_qos_arista7260_render_template(self): + self._test_qos_render_template('arista', 'x86_64-arista_7260cx3_64', 'Arista-7260CX3-C64', 'sample-arista-7260-t1-minigraph.xml', 'qos-arista7260.json') def test_buffers_dell6100_render_template(self): - file_exist, dir_exist = self.create_machine_conf('x86_64-dell_s6100_c2538-r0') + file_exist, dir_exist = self.create_machine_conf('x86_64-dell_s6100_c2538-r0', 'dell') dell_dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', 'dell', 'x86_64-dell_s6100_c2538-r0', 'Force10-S6100') buffers_file = os.path.join(dell_dir_path, 'buffers.json.j2') port_config_ini_file = os.path.join(dell_dir_path, 'port_config.ini') @@ -169,7 +162,7 @@ class TestJ2Files(TestCase): argument = '-m ' + self.dell6100_t0_minigraph + ' -p ' + port_config_ini_file + ' -t ' + buffers_file + ' > ' + self.output_file self.run_script(argument) - + # cleanup buffers_config_file_new = os.path.join(dell_dir_path, 'buffers_config.j2') os.remove(buffers_config_file_new)