diff --git a/dockers/docker-orchagent/Dockerfile.j2 b/dockers/docker-orchagent/Dockerfile.j2 index 587d8f4db2ee..b2d20383e38e 100755 --- a/dockers/docker-orchagent/Dockerfile.j2 +++ b/dockers/docker-orchagent/Dockerfile.j2 @@ -31,5 +31,6 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["ipinip.json.j2", "/usr/share/sonic/templates/"] COPY ["mirror.json.j2", "/usr/share/sonic/templates/"] COPY ["ports.json.j2", "/usr/share/sonic/templates/"] +COPY ["msn27xx.32ports.buffers.json.j2", "/usr/share/sonic/templates/"] ENTRYPOINT ["/usr/bin/supervisord"] diff --git a/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 b/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 new file mode 100644 index 000000000000..075385079a0d --- /dev/null +++ b/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 @@ -0,0 +1,294 @@ +[ +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') %} + { + "BUFFER_POOL_TABLE:ingress_lossless_pool": { + "size": "3024486", + "type": "ingress", + "mode": "dynamic" + }, + "OP": "SET" + }, + { + "BUFFER_POOL_TABLE:ingress_lossy_pool": { + "size": "6422528", + "type": "ingress", + "mode": "dynamic" + }, + "OP": "SET" + }, + { + "BUFFER_POOL_TABLE:egress_lossless_pool": { + "size": "7291456", + "type": "egress", + "mode": "dynamic" + }, + "OP": "SET" + }, + { + "BUFFER_POOL_TABLE:egress_lossy_pool": { + "size": "8254464", + "type": "egress", + "mode": "dynamic" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:ingress_lossless_profile": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:ingress_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", + "size":"0", + "dynamic_th":"7" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:egress_lossless_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", + "size":"1518", + "dynamic_th":"7" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:egress_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", + "size":"4096", + "dynamic_th":"7" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:pg_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:q_lossless_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:q_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", + "size":"0", + "dynamic_th":"1" + }, + "OP": "SET" + }, + { + "BUFFER_PORT_INGRESS_PROFILE_LIST:{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE_TABLE:ingress_lossless_profile],[BUFFER_PROFILE_TABLE:ingress_lossy_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PORT_EGRESS_PROFILE_LIST:{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE_TABLE:egress_lossless_profile],[BUFFER_PROFILE_TABLE:egress_lossy_profile]" + }, + "OP": "SET" + }, + +{# The following template part is for variable PG profile configuration #} +{% set pg_range = '3-4' %} +{# Lists of supported speed and cable length #} +{% set supported_speed = [10000, 25000, 40000, 50000, 100000] %} +{% set supported_cable = [5, 40, 300] %} + +{# The key in this lictionary consist of two parts: (port speed)_(cable length) #} +{%- set portconfig2profile = { + '10000_5' : 'pg_lossless_10G_5m_profile', + '25000_5' : 'pg_lossless_25G_5m_profile', + '40000_5' : 'pg_lossless_40G_5m_profile', + '50000_5' : 'pg_lossless_50G_5m_profile', + '100000_5' : 'pg_lossless_100G_5m_profile', + + '10000_40' : 'pg_lossless_10G_40m_profile', + '25000_40' : 'pg_lossless_25G_40m_profile', + '40000_40' : 'pg_lossless_40G_40m_profile', + '50000_40' : 'pg_lossless_50G_40m_profile', + '100000_40' : 'pg_lossless_100G_40m_profile', + + '10000_300' : 'pg_lossless_10G_300m_profile', + '25000_300' : 'pg_lossless_25G_300m_profile', + '40000_300' : 'pg_lossless_40G_300m_profile', + '50000_300' : 'pg_lossless_50G_300m_profile', + '100000_300': 'pg_lossless_100G_300m_profile' + } +-%} + +{# PG profiles. All profiles reffered in portconfig2profile dictionary should be declared here #} +{# Only those which were actually used will be created in SAI #} +{%- set pg_profiles = { + 'pg_lossless_10G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 1 }, + 'pg_lossless_25G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 1 }, + 'pg_lossless_40G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 1 }, + 'pg_lossless_50G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 1 }, + 'pg_lossless_100G_5m_profile': { 'xon': 18432, 'xoff': 18432, 'size': 36864, 'dynamic_th': 1 }, + + 'pg_lossless_10G_40m_profile': { 'xon': 18432, 'xoff': 18432, 'size': 36864, 'dynamic_th': 1 }, + 'pg_lossless_25G_40m_profile': { 'xon': 18432, 'xoff': 21504, 'size': 39936, 'dynamic_th': 1 }, + 'pg_lossless_40G_40m_profile': { 'xon': 18432, 'xoff': 23552, 'size': 41984, 'dynamic_th': 1 }, + 'pg_lossless_50G_40m_profile': { 'xon': 18432, 'xoff': 23552, 'size': 41984, 'dynamic_th': 1 }, + 'pg_lossless_100G_40m_profile': { 'xon': 18432, 'xoff': 35840, 'size': 54272, 'dynamic_th': 1 }, + + 'pg_lossless_10G_300m_profile': { 'xon': 18432, 'xoff': 30720, 'size': 49152, 'dynamic_th': 1 }, + 'pg_lossless_25G_300m_profile': { 'xon': 18432, 'xoff': 53248, 'size': 71680, 'dynamic_th': 1 }, + 'pg_lossless_40G_300m_profile': { 'xon': 18432, 'xoff': 75776, 'size': 94208, 'dynamic_th': 1 }, + 'pg_lossless_50G_300m_profile': { 'xon': 18432, 'xoff': 75776, 'size': 94208, 'dynamic_th': 1 }, + 'pg_lossless_100G_300m_profile':{ 'xon': 18432, 'xoff': 165888,'size': 184320,'dynamic_th': 1 }, + } +-%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'ToRRouter_Server' : '5', + 'LeafRouter_ToRRouter' : '40', + 'SpineRouter_LeafRouter' : '300' + } +%} + +{% set switch_role = DEVICE_METADATA['localhost']['type'] %} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {% endif %} + {% endif %} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ supported_cable | last }} + {%- endif -%} +{% endmacro %} + +{%- macro find_closest_greater_config(speed, cable) -%} +{%- set new_speed = [] -%} +{%- for std_speed in supported_speed -%} + {%- if std_speed | int >= speed | int -%} + {%- if new_speed.append(std_speed) -%}{%- endif -%} + {% endif -%} +{%- endfor -%} +{%- set new_cable = [] -%} +{%- for std_cable in supported_cable -%} + {% if std_cable | int >= cable | int -%} + {%- if new_cable.append(std_cable) -%}{%- endif -%} + {% endif %} +{%- endfor -%} +{{ new_speed.0 }}_{{ new_cable.0 }} +{%- endmacro -%} + +{% set ingress_lossless_pg_pool_size = [] %} +{% set used_pg_profiles = [] %} +{% for port in PORT %} + {%- if PORT[port].speed -%} + {%- set speed = PORT[port]['speed'] -%} + {% else %} + {%- set speed = supported_speed|last -%} + {%- endif -%} + {%- set cable = cable_length(port) -%} + {%- set port_config = speed|string + '_' + cable -%} + {%- if not port_config in portconfig2profile -%} + {% set port_config = find_closest_greater_config(speed, cable) -%} + {%- endif -%} + {% set profile = portconfig2profile[port_config] -%} + {% if ingress_lossless_pg_pool_size.append(pg_profiles[profile]['size']) %}{% endif %} + {# add to list profiles which were actually used #} + {%- if profile not in used_pg_profiles and used_pg_profiles.append(profile) %}{% endif -%} + { + "BUFFER_PG_TABLE:{{ port }}:{{ pg_range }}": { + "profile" : "[BUFFER_PROFILE_TABLE:{{ profile }}]" + }, + "OP": "SET" + }, +{% endfor -%} + +{# PG profiles declaration #} + +{% for profile_name in used_pg_profiles %} + {%- set profile_config = pg_profiles[profile_name] %} + { + "BUFFER_PROFILE_TABLE:{{ profile_name }}": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pg_pool]", + "xon":"{{ profile_config['xon'] }}", + "xoff":"{{ profile_config['xoff'] }}", + "size":"{{ profile_config['size'] }}", + "dynamic_th":"{{ profile_config['dynamic_th'] }}" + }, + "OP": "SET" + }, +{% endfor -%} + + {# Pool declaration #} + { + "BUFFER_POOL_TABLE:ingress_lossless_pg_pool": { + "size": "{{ ingress_lossless_pg_pool_size | sum }}", + "type": "ingress", + "mode": "dynamic" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:{{ port_names }}:0-1": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossy_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_QUEUE_TABLE:{{ port_names }}:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:q_lossless_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_QUEUE_TABLE:{{ port_names }}:0-1": { + "profile" : "[BUFFER_PROFILE_TABLE:q_lossy_profile]" + }, + "OP": "SET" + }, + { + "PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + }, + "OP": "SET" + }, + { + "PORT_QOS_MAP_TABLE:{{ port_names }}": { + "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE]" + }, + "OP": "SET" + } +] diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index e6533ce7beeb..479f08cab0b1 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -430,6 +430,7 @@ def parse_xml(filename, platform=None, port_config_file=None): results['VLAN'] = vlans results['DEVICE_NEIGHBOR'] = neighbors + results['DEVICE_NEIGHBOR_METADATA'] = { key:devices[key] for key in devices if key != hostname } results['SYSLOG_SERVER'] = dict((item, {}) for item in syslog_servers) results['DHCP_SERVER'] = dict((item, {}) for item in dhcp_servers) results['NTP_SERVER'] = dict((item, {}) for item in ntp_servers) diff --git a/src/sonic-config-engine/tests/sample-port-config-mlnx.ini b/src/sonic-config-engine/tests/sample-port-config-mlnx.ini new file mode 100644 index 000000000000..816bb0e94a70 --- /dev/null +++ b/src/sonic-config-engine/tests/sample-port-config-mlnx.ini @@ -0,0 +1,33 @@ +# name lanes +Ethernet0 0,1,2,3 +Ethernet4 4,5,6,7 +Ethernet8 8,9,10,11 +Ethernet12 12,13,14,15 +Ethernet16 16,17,18,19 +Ethernet20 20,21,22,23 +Ethernet24 24,25,26,27 +Ethernet28 28,29,30,31 +Ethernet32 32,33,34,35 +Ethernet36 36,37,38,39 +Ethernet40 40,41,42,43 +Ethernet44 44,45,46,47 +Ethernet48 48,49,50,51 +Ethernet52 52,53,54,55 +Ethernet56 56,57,58,59 +Ethernet60 60,61,62,63 +Ethernet64 64,65,66,67 +Ethernet68 68,69,70,71 +Ethernet72 72,73,74,75 +Ethernet76 76,77,78,79 +Ethernet80 80,81,82,83 +Ethernet84 84,85,86,87 +Ethernet88 88,89,90,91 +Ethernet92 92,93,94,95 +Ethernet96 96,97,98,99 +Ethernet100 100,101,102,103 +Ethernet104 104,105,106,107 +Ethernet108 108,109,110,111 +Ethernet112 112,113,114,115 +Ethernet116 116,117,118,119 +Ethernet120 120,121,122,123 +Ethernet124 124,125,126,127 diff --git a/src/sonic-config-engine/tests/sample_output/msn27.32ports.json b/src/sonic-config-engine/tests/sample_output/msn27.32ports.json new file mode 100644 index 000000000000..876706b5de13 --- /dev/null +++ b/src/sonic-config-engine/tests/sample_output/msn27.32ports.json @@ -0,0 +1,349 @@ +[ + { + "BUFFER_POOL_TABLE:ingress_lossless_pool": { + "size": "3024486", + "type": "ingress", + "mode": "dynamic" + }, + "OP": "SET" + }, + { + "BUFFER_POOL_TABLE:ingress_lossy_pool": { + "size": "6422528", + "type": "ingress", + "mode": "dynamic" + }, + "OP": "SET" + }, + { + "BUFFER_POOL_TABLE:egress_lossless_pool": { + "size": "7291456", + "type": "egress", + "mode": "dynamic" + }, + "OP": "SET" + }, + { + "BUFFER_POOL_TABLE:egress_lossy_pool": { + "size": "8254464", + "type": "egress", + "mode": "dynamic" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:ingress_lossless_profile": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:ingress_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", + "size":"0", + "dynamic_th":"7" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:egress_lossless_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", + "size":"1518", + "dynamic_th":"7" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:egress_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", + "size":"4096", + "dynamic_th":"7" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:pg_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:q_lossless_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:q_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", + "size":"0", + "dynamic_th":"1" + }, + "OP": "SET" + }, + { + "BUFFER_PORT_INGRESS_PROFILE_LIST:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { + "profile_list" : "[BUFFER_PROFILE_TABLE:ingress_lossless_profile],[BUFFER_PROFILE_TABLE:ingress_lossy_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PORT_EGRESS_PROFILE_LIST:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { + "profile_list" : "[BUFFER_PROFILE_TABLE:egress_lossless_profile],[BUFFER_PROFILE_TABLE:egress_lossy_profile]" + }, + "OP": "SET" + }, + + + + { + "BUFFER_PG_TABLE:Ethernet8:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet0:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet4:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet108:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet100:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet104:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet68:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet96:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet124:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet92:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet120:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet52:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet56:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet76:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet72:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet64:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet32:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet16:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet36:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet12:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet88:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet116:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet80:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet112:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet84:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet48:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet44:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet40:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet28:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet60:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet20:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet24:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + + { + "BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pg_pool]", + "xon":"18432", + "xoff":"75776", + "size":"94208", + "dynamic_th":"1" + }, + "OP": "SET" + }, + { + "BUFFER_POOL_TABLE:ingress_lossless_pg_pool": { + "size": "3014656", + "type": "ingress", + "mode": "dynamic" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24:0-1": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossy_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_QUEUE_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:q_lossless_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_QUEUE_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24:0-1": { + "profile" : "[BUFFER_PROFILE_TABLE:q_lossy_profile]" + }, + "OP": "SET" + }, + { + "PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + }, + "OP": "SET" + }, + { + "PORT_QOS_MAP_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { + "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE]" + }, + "OP": "SET" + } +] diff --git a/src/sonic-config-engine/tests/t1-sample-graph-mlnx.xml b/src/sonic-config-engine/tests/t1-sample-graph-mlnx.xml new file mode 100644 index 000000000000..04fc88c34370 --- /dev/null +++ b/src/sonic-config-engine/tests/t1-sample-graph-mlnx.xml @@ -0,0 +1,2240 @@ + + + + + + ARISTA01T0 + 10.0.0.33 + arc-switch1026 + 10.0.0.32 + 1 + 10 + 3 + + + ARISTA01T0 + FC00::42 + arc-switch1026 + FC00::41 + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 10 + 3 + + + arc-switch1026 + FC00::1 + ARISTA01T2 + FC00::2 + 1 + 10 + 3 + + + ARISTA02T0 + 10.0.0.35 + arc-switch1026 + 10.0.0.34 + 1 + 10 + 3 + + + ARISTA02T0 + FC00::46 + arc-switch1026 + FC00::45 + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.2 + ARISTA02T2 + 10.0.0.3 + 1 + 10 + 3 + + + arc-switch1026 + FC00::5 + ARISTA02T2 + FC00::6 + 1 + 10 + 3 + + + ARISTA03T0 + 10.0.0.37 + arc-switch1026 + 10.0.0.36 + 1 + 10 + 3 + + + ARISTA03T0 + FC00::4A + arc-switch1026 + FC00::49 + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.4 + ARISTA03T2 + 10.0.0.5 + 1 + 10 + 3 + + + arc-switch1026 + FC00::9 + ARISTA03T2 + FC00::A + 1 + 10 + 3 + + + ARISTA04T0 + 10.0.0.39 + arc-switch1026 + 10.0.0.38 + 1 + 10 + 3 + + + ARISTA04T0 + FC00::4E + arc-switch1026 + FC00::4D + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.6 + ARISTA04T2 + 10.0.0.7 + 1 + 10 + 3 + + + arc-switch1026 + FC00::D + ARISTA04T2 + FC00::E + 1 + 10 + 3 + + + ARISTA05T0 + 10.0.0.41 + arc-switch1026 + 10.0.0.40 + 1 + 10 + 3 + + + ARISTA05T0 + FC00::52 + arc-switch1026 + FC00::51 + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.8 + ARISTA05T2 + 10.0.0.9 + 1 + 10 + 3 + + + arc-switch1026 + FC00::11 + ARISTA05T2 + FC00::12 + 1 + 10 + 3 + + + ARISTA06T0 + 10.0.0.43 + arc-switch1026 + 10.0.0.42 + 1 + 10 + 3 + + + ARISTA06T0 + FC00::56 + arc-switch1026 + FC00::55 + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.10 + ARISTA06T2 + 10.0.0.11 + 1 + 10 + 3 + + + arc-switch1026 + FC00::15 + ARISTA06T2 + FC00::16 + 1 + 10 + 3 + + + ARISTA07T0 + 10.0.0.45 + arc-switch1026 + 10.0.0.44 + 1 + 10 + 3 + + + ARISTA07T0 + FC00::5A + arc-switch1026 + FC00::59 + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.12 + ARISTA07T2 + 10.0.0.13 + 1 + 10 + 3 + + + arc-switch1026 + FC00::19 + ARISTA07T2 + FC00::1A + 1 + 10 + 3 + + + ARISTA08T0 + 10.0.0.47 + arc-switch1026 + 10.0.0.46 + 1 + 10 + 3 + + + ARISTA08T0 + FC00::5E + arc-switch1026 + FC00::5D + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.14 + ARISTA08T2 + 10.0.0.15 + 1 + 10 + 3 + + + arc-switch1026 + FC00::1D + ARISTA08T2 + FC00::1E + 1 + 10 + 3 + + + ARISTA09T0 + 10.0.0.49 + arc-switch1026 + 10.0.0.48 + 1 + 10 + 3 + + + ARISTA09T0 + FC00::62 + arc-switch1026 + FC00::61 + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.16 + ARISTA09T2 + 10.0.0.17 + 1 + 10 + 3 + + + arc-switch1026 + FC00::21 + ARISTA09T2 + FC00::22 + 1 + 10 + 3 + + + ARISTA10T0 + 10.0.0.51 + arc-switch1026 + 10.0.0.50 + 1 + 10 + 3 + + + ARISTA10T0 + FC00::66 + arc-switch1026 + FC00::65 + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.18 + ARISTA10T2 + 10.0.0.19 + 1 + 10 + 3 + + + arc-switch1026 + FC00::25 + ARISTA10T2 + FC00::26 + 1 + 10 + 3 + + + ARISTA11T0 + 10.0.0.53 + arc-switch1026 + 10.0.0.52 + 1 + 10 + 3 + + + ARISTA11T0 + FC00::6A + arc-switch1026 + FC00::69 + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.20 + ARISTA11T2 + 10.0.0.21 + 1 + 10 + 3 + + + arc-switch1026 + FC00::29 + ARISTA11T2 + FC00::2A + 1 + 10 + 3 + + + ARISTA12T0 + 10.0.0.55 + arc-switch1026 + 10.0.0.54 + 1 + 10 + 3 + + + ARISTA12T0 + FC00::6E + arc-switch1026 + FC00::6D + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.22 + ARISTA12T2 + 10.0.0.23 + 1 + 10 + 3 + + + arc-switch1026 + FC00::2D + ARISTA12T2 + FC00::2E + 1 + 10 + 3 + + + ARISTA13T0 + 10.0.0.57 + arc-switch1026 + 10.0.0.56 + 1 + 10 + 3 + + + ARISTA13T0 + FC00::72 + arc-switch1026 + FC00::71 + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.24 + ARISTA13T2 + 10.0.0.25 + 1 + 10 + 3 + + + arc-switch1026 + FC00::31 + ARISTA13T2 + FC00::32 + 1 + 10 + 3 + + + ARISTA14T0 + 10.0.0.59 + arc-switch1026 + 10.0.0.58 + 1 + 10 + 3 + + + ARISTA14T0 + FC00::76 + arc-switch1026 + FC00::75 + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.26 + ARISTA14T2 + 10.0.0.27 + 1 + 10 + 3 + + + arc-switch1026 + FC00::35 + ARISTA14T2 + FC00::36 + 1 + 10 + 3 + + + ARISTA15T0 + 10.0.0.61 + arc-switch1026 + 10.0.0.60 + 1 + 10 + 3 + + + ARISTA15T0 + FC00::7A + arc-switch1026 + FC00::79 + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.28 + ARISTA15T2 + 10.0.0.29 + 1 + 10 + 3 + + + arc-switch1026 + FC00::39 + ARISTA15T2 + FC00::3A + 1 + 10 + 3 + + + ARISTA16T0 + 10.0.0.63 + arc-switch1026 + 10.0.0.62 + 1 + 10 + 3 + + + ARISTA16T0 + FC00::7E + arc-switch1026 + FC00::7D + 1 + 10 + 3 + + + arc-switch1026 + 10.0.0.30 + ARISTA16T2 + 10.0.0.31 + 1 + 10 + 3 + + + arc-switch1026 + FC00::3D + ARISTA16T2 + FC00::3E + 1 + 10 + 3 + + + + + 65100 + arc-switch1026 + + +
10.0.0.33
+ + +
+ +
10.0.0.1
+ + +
+ +
10.0.0.35
+ + +
+ +
10.0.0.3
+ + +
+ +
10.0.0.37
+ + +
+ +
10.0.0.5
+ + +
+ +
10.0.0.39
+ + +
+ +
10.0.0.7
+ + +
+ +
10.0.0.41
+ + +
+ +
10.0.0.9
+ + +
+ +
10.0.0.43
+ + +
+ +
10.0.0.11
+ + +
+ +
10.0.0.45
+ + +
+ +
10.0.0.13
+ + +
+ +
10.0.0.47
+ + +
+ +
10.0.0.15
+ + +
+ +
10.0.0.49
+ + +
+ +
10.0.0.17
+ + +
+ +
10.0.0.51
+ + +
+ +
10.0.0.19
+ + +
+ +
10.0.0.53
+ + +
+ +
10.0.0.21
+ + +
+ +
10.0.0.55
+ + +
+ +
10.0.0.23
+ + +
+ +
10.0.0.57
+ + +
+ +
10.0.0.25
+ + +
+ +
10.0.0.59
+ + +
+ +
10.0.0.27
+ + +
+ +
10.0.0.61
+ + +
+ +
10.0.0.29
+ + +
+ +
10.0.0.63
+ + +
+ +
10.0.0.31
+ + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 65200 + ARISTA02T2 + + + + 64003 + ARISTA03T0 + + + + 65200 + ARISTA03T2 + + + + 64004 + ARISTA04T0 + + + + 65200 + ARISTA04T2 + + + + 64005 + ARISTA05T0 + + + + 65200 + ARISTA05T2 + + + + 64006 + ARISTA06T0 + + + + 65200 + ARISTA06T2 + + + + 64007 + ARISTA07T0 + + + + 65200 + ARISTA07T2 + + + + 64008 + ARISTA08T0 + + + + 65200 + ARISTA08T2 + + + + 64009 + ARISTA09T0 + + + + 65200 + ARISTA09T2 + + + + 64010 + ARISTA10T0 + + + + 65200 + ARISTA10T2 + + + + 64011 + ARISTA11T0 + + + + 65200 + ARISTA11T2 + + + + 64012 + ARISTA12T0 + + + + 65200 + ARISTA12T2 + + + + 64013 + ARISTA13T0 + + + + 65200 + ARISTA13T2 + + + + 64014 + ARISTA14T0 + + + + 65200 + ARISTA14T2 + + + + 64015 + ARISTA15T0 + + + + 65200 + ARISTA15T2 + + + + 64016 + ARISTA16T0 + + + + 65200 + ARISTA16T2 + + +
+
+ + + + + + 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.224.23.80/24 + + 10.224.23.80/24 + + + V6HostIP + eth0 + + FC00:2::32/64 + + FC00:2::32/64 + + + + + + arc-switch1026 + + + + + + Ethernet0 + 10.0.0.0/31 + + + + Ethernet0 + FC00::1/126 + + + + Ethernet4 + 10.0.0.2/31 + + + + Ethernet4 + FC00::5/126 + + + + Ethernet8 + 10.0.0.4/31 + + + + Ethernet8 + FC00::9/126 + + + + Ethernet12 + 10.0.0.6/31 + + + + Ethernet12 + FC00::D/126 + + + + Ethernet16 + 10.0.0.8/31 + + + + Ethernet16 + FC00::11/126 + + + + Ethernet20 + 10.0.0.10/31 + + + + Ethernet20 + FC00::15/126 + + + + Ethernet24 + 10.0.0.12/31 + + + + Ethernet24 + FC00::19/126 + + + + Ethernet28 + 10.0.0.14/31 + + + + Ethernet28 + FC00::1D/126 + + + + Ethernet32 + 10.0.0.16/31 + + + + Ethernet32 + FC00::21/126 + + + + Ethernet36 + 10.0.0.18/31 + + + + Ethernet36 + FC00::25/126 + + + + Ethernet40 + 10.0.0.20/31 + + + + Ethernet40 + FC00::29/126 + + + + Ethernet44 + 10.0.0.22/31 + + + + Ethernet44 + FC00::2D/126 + + + + Ethernet48 + 10.0.0.24/31 + + + + Ethernet48 + FC00::31/126 + + + + Ethernet52 + 10.0.0.26/31 + + + + Ethernet52 + FC00::35/126 + + + + Ethernet56 + 10.0.0.28/31 + + + + Ethernet56 + FC00::39/126 + + + + Ethernet60 + 10.0.0.30/31 + + + + Ethernet60 + FC00::3D/126 + + + + Ethernet64 + 10.0.0.32/31 + + + + Ethernet64 + FC00::41/126 + + + + Ethernet68 + 10.0.0.34/31 + + + + Ethernet68 + FC00::45/126 + + + + Ethernet72 + 10.0.0.36/31 + + + + Ethernet72 + FC00::49/126 + + + + Ethernet76 + 10.0.0.38/31 + + + + Ethernet76 + FC00::4D/126 + + + + Ethernet80 + 10.0.0.40/31 + + + + Ethernet80 + FC00::51/126 + + + + Ethernet84 + 10.0.0.42/31 + + + + Ethernet84 + FC00::55/126 + + + + Ethernet88 + 10.0.0.44/31 + + + + Ethernet88 + FC00::59/126 + + + + Ethernet92 + 10.0.0.46/31 + + + + Ethernet92 + FC00::5D/126 + + + + Ethernet96 + 10.0.0.48/31 + + + + Ethernet96 + FC00::61/126 + + + + Ethernet100 + 10.0.0.50/31 + + + + Ethernet100 + FC00::65/126 + + + + Ethernet104 + 10.0.0.52/31 + + + + Ethernet104 + FC00::69/126 + + + + Ethernet108 + 10.0.0.54/31 + + + + Ethernet108 + FC00::6D/126 + + + + Ethernet112 + 10.0.0.56/31 + + + + Ethernet112 + FC00::71/126 + + + + Ethernet116 + 10.0.0.58/31 + + + + Ethernet116 + FC00::75/126 + + + + Ethernet120 + 10.0.0.60/31 + + + + Ethernet120 + FC00::79/126 + + + + Ethernet124 + 10.0.0.62/31 + + + + Ethernet124 + FC00::7D/126 + + + + + + + + + + + + DeviceInterfaceLink + arc-switch1026 + Ethernet0 + ARISTA01T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet4 + ARISTA02T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet8 + ARISTA03T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet12 + ARISTA04T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet16 + ARISTA05T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet20 + ARISTA06T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet24 + ARISTA07T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet28 + ARISTA08T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet32 + ARISTA09T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet36 + ARISTA10T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet40 + ARISTA11T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet44 + ARISTA12T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet48 + ARISTA13T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet52 + ARISTA14T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet56 + ARISTA15T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet60 + ARISTA16T2 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet64 + ARISTA01T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet68 + ARISTA02T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet72 + ARISTA03T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet76 + ARISTA04T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet80 + ARISTA05T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet84 + ARISTA06T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet88 + ARISTA07T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet92 + ARISTA08T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet96 + ARISTA09T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet100 + ARISTA10T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet104 + ARISTA11T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet108 + ARISTA12T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet112 + ARISTA13T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet116 + ARISTA14T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet120 + ARISTA15T0 + Ethernet1 + + + DeviceInterfaceLink + arc-switch1026 + Ethernet124 + ARISTA16T0 + Ethernet1 + + + + + arc-switch1026 + ACS-MSN2700 + + 10.224.23.80 + + + + "ARISTA01T0" + Arista-VM + + 10.224.23.196 + + + + "ARISTA01T2" + Arista-VM + + 10.224.23.180 + + + + "ARISTA02T0" + Arista-VM + + 10.224.23.197 + + + + "ARISTA02T2" + Arista-VM + + 10.224.23.181 + + + + "ARISTA03T0" + Arista-VM + + 10.224.23.198 + + + + "ARISTA03T2" + Arista-VM + + 10.224.23.182 + + + + "ARISTA04T0" + Arista-VM + + 10.224.23.199 + + + + "ARISTA04T2" + Arista-VM + + 10.224.23.183 + + + + "ARISTA05T0" + Arista-VM + + 10.224.23.200 + + + + "ARISTA05T2" + Arista-VM + + 10.224.23.184 + + + + "ARISTA06T0" + Arista-VM + + 10.224.23.201 + + + + "ARISTA06T2" + Arista-VM + + 10.224.23.185 + + + + "ARISTA07T0" + Arista-VM + + 10.224.23.202 + + + + "ARISTA07T2" + Arista-VM + + 10.224.23.186 + + + + "ARISTA08T0" + Arista-VM + + 10.224.23.203 + + + + "ARISTA08T2" + Arista-VM + + 10.224.23.187 + + + + "ARISTA09T0" + Arista-VM + + 10.224.23.152 + + + + "ARISTA09T2" + Arista-VM + + 10.224.23.188 + + + + "ARISTA10T0" + Arista-VM + + 10.224.23.153 + + + + "ARISTA10T2" + Arista-VM + + 10.224.23.189 + + + + "ARISTA11T0" + Arista-VM + + 10.224.23.154 + + + + "ARISTA11T2" + Arista-VM + + 10.224.23.190 + + + + "ARISTA12T0" + Arista-VM + + 10.224.23.155 + + + + "ARISTA12T2" + Arista-VM + + 10.224.23.191 + + + + "ARISTA13T0" + Arista-VM + + 10.224.23.156 + + + + "ARISTA13T2" + Arista-VM + + 10.224.23.192 + + + + "ARISTA14T0" + Arista-VM + + 10.224.23.157 + + + + "ARISTA14T2" + Arista-VM + + 10.224.23.193 + + + + "ARISTA15T0" + Arista-VM + + 10.224.23.158 + + + + "ARISTA15T2" + Arista-VM + + 10.224.23.194 + + + + "ARISTA16T0" + Arista-VM + + 10.224.23.159 + + + + "ARISTA16T2" + Arista-VM + + 10.224.23.195 + + + + + + + true + + + DeviceInterface + + true + true + 1 + Ethernet0 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet4 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet8 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet12 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet16 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet20 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet24 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet28 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet32 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet36 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet40 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet44 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet48 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet52 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet56 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet60 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet64 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet68 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet72 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet76 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet80 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet84 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet88 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet92 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet96 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet100 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet104 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet108 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet112 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet116 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet120 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + true + 1 + Ethernet124 + + false + 0 + 0 + 40000 + + + true + 0 + ACS-MSN2700 + + + + + + + arc-switch1026 + + + DhcpResources + + 10.0.0.1 + + + NTPResources + + 10.0.0.1;10.0.0.2 + + + DeploymentId + + 1 + + + QosProfile + + Profile0 + + + RadiusResources + + + + + SnmpResources + + 10.0.0.9 + + + SyslogResources + + 10.0.0.5;10.0.0.6 + + + TacacsGroup + + testlab + + + TacacsServer + + 10.0.0.9;10.0.0.8 + + + ForcedMgmtRoutes + + 10.0.0.100/31;10.250.0.8;10.255.0.0/28 + + + ErspanDestinationIpv4 + + 10.0.0.7 + + + + + + + arc-switch1026 + ACS-MSN2700 +
diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py index 4bdc1b41f5b4..99c25e877e9a 100644 --- a/src/sonic-config-engine/tests/test_j2files.py +++ b/src/sonic-config-engine/tests/test_j2files.py @@ -12,6 +12,8 @@ def setUp(self): self.t0_minigraph = os.path.join(self.test_dir, 't0-sample-graph.xml') self.pc_minigraph = os.path.join(self.test_dir, 'pc-test-graph.xml') self.t0_port_config = os.path.join(self.test_dir, 't0-sample-port-config.ini') + 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.output_file = os.path.join(self.test_dir, 'output') def run_script(self, argument): @@ -84,6 +86,15 @@ def test_everflow(self): assert filecmp.cmp(sample_output_file, self.output_file) + def test_msn27xx_32ports_buffers(self): + buffer_file = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-orchagent', 'msn27xx.32ports.buffers.json.j2') + argument = '-m ' + self.t1_mlnx_minigraph + ' -p ' + self.mlnx_port_config + ' -t ' + buffer_file + ' > ' + self.output_file + self.run_script(argument) + + sample_output_file = os.path.join(self.test_dir, 'sample_output', 'msn27.32ports.json') + + self.assertTrue(filecmp.cmp(sample_output_file, self.output_file)) + def tearDown(self): try: