From 4d781c337dc612aa9e9c9c8de850b29e017e6775 Mon Sep 17 00:00:00 2001 From: Rida Hanif <61490193+ridahanif96@users.noreply.github.com> Date: Tue, 19 Mar 2024 09:17:28 +0000 Subject: [PATCH 1/5] Test Yang Validations --- src/sonic-config-engine/minigraph.py | 16 + .../tests/sample_hwsku.json | 274 ++++++++---- .../tests/sample_output/platform_output.json | 273 ++++++++---- .../tests/sample_output/py2/l2switch.json | 96 +++-- .../tests/sample_output/py3/l2switch.json | 96 +++-- .../tests/sample_platform.json | 39 +- .../tests/t0-sample-autoneg-port-config.ini | 66 +-- .../tests/t0-sample-port-config.ini | 66 +-- src/sonic-config-engine/tests/test_cfggen.py | 396 +++++++++--------- .../tests/test_cfggen_platformJson.py | 8 +- .../tests/test_minigraph_case.py | 12 +- .../tests/test_multinpu_cfggen.py | 44 +- 12 files changed, 840 insertions(+), 546 deletions(-) diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index cbfa4cabaef2..15020bd1ebda 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -1907,6 +1907,14 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw port['mtu'] = '9100' port['tpid'] = '0x8100' + # mode check for vlan membership in PORT table default mode is routed and for vlan membership it is trunk + for port_name, port in ports.items(): + if 'mode' not in port: + if port_name in [key[1] for key in vlan_members.keys()]: + port['mode'] = 'trunk' + else: + port['mode'] = 'routed' + # asymmetric PFC is disabled by default for port in ports.values(): port['pfc_asym'] = 'off' @@ -1977,6 +1985,14 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw pc['mtu'] = '9100' pc['tpid'] = '0x8100' pc['admin_status'] = 'up' + + # mode check for vlan membership in portchannel and default mode is routed and mode is trunk when port channel has vlan membership + for pc_name, pc in pcs.items(): + if 'mode' not in pc: + if pc_name in [key[1] for key in vlan_members.keys()]: + pc['mode'] = 'trunk' + else: + pc['mode'] = 'routed' results['PORTCHANNEL'] = pcs results['PORTCHANNEL_MEMBER'] = pc_members diff --git a/src/sonic-config-engine/tests/sample_hwsku.json b/src/sonic-config-engine/tests/sample_hwsku.json index 3615cda2680b..64b17111a86e 100644 --- a/src/sonic-config-engine/tests/sample_hwsku.json +++ b/src/sonic-config-engine/tests/sample_hwsku.json @@ -1,277 +1,369 @@ { "interfaces": { "Ethernet0": { - "default_brkout_mode": "1x100G[40G]" + "default_brkout_mode": "1x100G[40G]", + "mode" : "routed" + }, "Ethernet4": { - "default_brkout_mode": "2x50G" + "default_brkout_mode": "2x50G", + "mode" : "routed" }, "Ethernet6": { - "default_brkout_mode": "2x50G" + "default_brkout_mode": "2x50G", + "mode" : "routed" }, "Ethernet8": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet9": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet10": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet11": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet12": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet13": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet14": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet16": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet18": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet19": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet20": { - "default_brkout_mode": "1x100G[40G]" + "default_brkout_mode": "1x100G[40G]", + "mode" : "routed" }, "Ethernet24": { - "default_brkout_mode": "2x50G" + "default_brkout_mode": "2x50G", + "mode" : "routed" }, "Ethernet26": { - "default_brkout_mode": "2x50G" + "default_brkout_mode": "2x50G", + "mode" : "routed" }, "Ethernet28": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet29": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet30": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet31": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet32": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet33": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet34": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet36": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet38": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet39": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet40": { - "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]" + "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]", + "mode" : "routed" }, "Ethernet44": { - "default_brkout_mode": "2x50G[40G,25G,10G,1G]" + "default_brkout_mode": "2x50G[40G,25G,10G,1G]", + "mode" : "routed" }, "Ethernet46": { - "default_brkout_mode": "2x50G[40G,25G,10G,1G]" + "default_brkout_mode": "2x50G[40G,25G,10G,1G]", + "mode" : "routed" }, "Ethernet48": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet49": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet50": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet51": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet52": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet53": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet54": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet56": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet58": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet59": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet60": { - "default_brkout_mode": "1x100G[40G]" + "default_brkout_mode": "1x100G[40G]", + "mode" : "routed" }, "Ethernet64": { - "default_brkout_mode": "2x50G" + "default_brkout_mode": "2x50G", + "mode" : "routed" }, "Ethernet66": { - "default_brkout_mode": "2x50G" + "default_brkout_mode": "2x50G", + "mode" : "routed" }, "Ethernet68": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet69": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet70": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet71": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet72": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet73": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet74": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet76": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet78": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet79": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet80": { - "default_brkout_mode": "1x100G[40G]" + "default_brkout_mode": "1x100G[40G]", + "mode" : "routed" }, "Ethernet84": { - "default_brkout_mode": "2x50G" + "default_brkout_mode": "2x50G", + "mode" : "routed" }, "Ethernet86": { - "default_brkout_mode": "2x50G" + "default_brkout_mode": "2x50G", + "mode" : "routed" }, "Ethernet88": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet89": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet90": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet91": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet92": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet93": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet94": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet96": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet98": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet99": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet100": { - "default_brkout_mode": "1x100G[40G]" + "default_brkout_mode": "1x100G[40G]", + "mode" : "routed" }, "Ethernet104": { - "default_brkout_mode": "2x50G" + "default_brkout_mode": "2x50G", + "mode" : "routed" }, "Ethernet106": { - "default_brkout_mode": "2x50G" + "default_brkout_mode": "2x50G", + "mode" : "routed" }, "Ethernet108": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet109": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet110": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet111": { - "default_brkout_mode": "4x25G[10G]" + "default_brkout_mode": "4x25G[10G]", + "mode" : "routed" }, "Ethernet112": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet113": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet114": { - "default_brkout_mode": "2x25G(2)+1x50G(2)" + "default_brkout_mode": "2x25G(2)+1x50G(2)", + "mode" : "routed" }, "Ethernet116": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet118": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet119": { - "default_brkout_mode": "1x50G(2)+2x25G(2)" + "default_brkout_mode": "1x50G(2)+2x25G(2)", + "mode" : "routed" }, "Ethernet120": { - "default_brkout_mode": "1x100G[40G]" + "default_brkout_mode": "1x100G[40G]", + "mode" : "routed" }, "Ethernet124": { - "default_brkout_mode": "2x50G" + "default_brkout_mode": "2x50G", + "mode" : "routed" }, "Ethernet126": { - "default_brkout_mode": "2x50G" + "default_brkout_mode": "2x50G", + "mode" : "routed" }, "Ethernet128": { - "default_brkout_mode": "1x40G[100G]" + "default_brkout_mode": "1x40G[100G]", + "mode" : "routed" }, "Ethernet132": { - "default_brkout_mode": "1x25G[100G,50G,40G,10G]" + "default_brkout_mode": "1x25G[100G,50G,40G,10G]", + "mode" : "routed" }, "Ethernet136": { - "default_brkout_mode": "4x10G[25G]" + "default_brkout_mode": "4x10G[25G]", + "mode" : "routed" }, "Ethernet137": { - "default_brkout_mode": "4x10G[25G]" + "default_brkout_mode": "4x10G[25G]", + "mode" : "routed" }, "Ethernet138": { - "default_brkout_mode": "4x10G[25G]" + "default_brkout_mode": "4x10G[25G]", + "mode" : "routed" }, "Ethernet139": { - "default_brkout_mode": "4x10G[25G]" + "default_brkout_mode": "4x10G[25G]", + "mode" : "routed" }, "Ethernet140": { - "default_brkout_mode": "2x25G(2)+1x50000(2)" + "default_brkout_mode": "2x25G(2)+1x50000(2)", + "mode" : "routed" }, "Ethernet141": { - "default_brkout_mode": "2x25G(2)+1x50000(2)" + "default_brkout_mode": "2x25G(2)+1x50000(2)", + "mode" : "routed" }, "Ethernet142": { - "default_brkout_mode": "2x25G(2)+1x50000(2)" + "default_brkout_mode": "2x25G(2)+1x50000(2)", + "mode" : "routed" }, "Ethernet144": { - "default_brkout_mode": "1x100000[50G,40000,25G,10000]" + "default_brkout_mode": "1x100000[50G,40000,25G,10000]", + "mode" : "routed" } } } diff --git a/src/sonic-config-engine/tests/sample_output/platform_output.json b/src/sonic-config-engine/tests/sample_output/platform_output.json index 4c6cf197c389..d33a74faddaf 100644 --- a/src/sonic-config-engine/tests/sample_output/platform_output.json +++ b/src/sonic-config-engine/tests/sample_output/platform_output.json @@ -7,7 +7,8 @@ "alias": "Eth3/1", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet9": { "index": "3", @@ -17,7 +18,8 @@ "alias": "Eth3/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet36": { "index": "10", @@ -27,7 +29,8 @@ "alias": "Eth10/1", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet98": { "index": "25", @@ -37,7 +40,8 @@ "alias": "Eth25/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet0": { "index": "1", @@ -49,7 +53,8 @@ "alias": "Eth1", "pfc_asym": "off", "speed": "100000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet6": { "index": "2", @@ -60,7 +65,8 @@ "alias": "Eth2/2", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet4": { "index": "2", @@ -71,7 +77,8 @@ "alias": "Eth2/1", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet109": { "index": "28", @@ -81,7 +88,8 @@ "alias": "Eth28/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet108": { "index": "28", @@ -91,7 +99,8 @@ "alias": "Eth28/1", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet18": { "index": "5", @@ -101,7 +110,8 @@ "alias": "Eth5/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet100": { "index": "26", @@ -112,7 +122,8 @@ "alias": "Eth26", "pfc_asym": "off", "speed": "100000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet34": { "index": "9", @@ -122,7 +133,8 @@ "alias": "Eth9/3", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet104": { "index": "27", @@ -132,7 +144,8 @@ "alias": "Eth27/1", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet106": { "index": "27", @@ -142,7 +155,8 @@ "alias": "Eth27/2", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet94": { "index": "24", @@ -152,7 +166,8 @@ "alias": "Eth24/3", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet126": { "index": "32", @@ -162,7 +177,8 @@ "alias": "Eth32/2", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet96": { "index": "25", @@ -172,7 +188,8 @@ "alias": "Eth25/1", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet124": { "index": "32", @@ -182,7 +199,8 @@ "alias": "Eth32/1", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet90": { "index": "23", @@ -192,7 +210,8 @@ "alias": "Eth23/3", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet91": { "index": "23", @@ -202,7 +221,8 @@ "alias": "Eth23/4", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet92": { "index": "24", @@ -212,7 +232,8 @@ "alias": "Eth24/1", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet93": { "index": "24", @@ -222,7 +243,8 @@ "alias": "Eth24/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet50": { "index": "13", @@ -232,7 +254,8 @@ "alias": "Eth13/3", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet51": { "index": "13", @@ -242,7 +265,8 @@ "alias": "Eth13/4", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet52": { "index": "14", @@ -252,7 +276,8 @@ "alias": "Eth14/1", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet53": { "index": "14", @@ -262,7 +287,8 @@ "alias": "Eth14/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet54": { "index": "14", @@ -272,7 +298,8 @@ "alias": "Eth14/3", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet99": { "index": "25", @@ -282,7 +309,8 @@ "alias": "Eth25/3", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet56": { "index": "15", @@ -292,7 +320,8 @@ "alias": "Eth15/1", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet113": { "index": "29", @@ -302,7 +331,8 @@ "alias": "Eth29/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet76": { "index": "20", @@ -312,7 +342,8 @@ "alias": "Eth20/1", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet74": { "index": "19", @@ -322,7 +353,8 @@ "alias": "Eth19/3", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet39": { "index": "10", @@ -332,7 +364,8 @@ "alias": "Eth10/3", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet72": { "index": "19", @@ -342,7 +375,8 @@ "alias": "Eth19/1", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet73": { "index": "19", @@ -352,7 +386,8 @@ "alias": "Eth19/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet70": { "index": "18", @@ -362,7 +397,8 @@ "alias": "Eth18/3", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet71": { "index": "18", @@ -372,7 +408,8 @@ "alias": "Eth18/4", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet32": { "index": "9", @@ -382,7 +419,8 @@ "alias": "Eth9/1", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet33": { "index": "9", @@ -392,7 +430,8 @@ "alias": "Eth9/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet16": { "index": "5", @@ -402,7 +441,8 @@ "alias": "Eth5/1", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet111": { "index": "28", @@ -412,7 +452,8 @@ "alias": "Eth28/4", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet10": { "index": "3", @@ -422,7 +463,8 @@ "alias": "Eth3/3", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet11": { "index": "3", @@ -432,7 +474,8 @@ "alias": "Eth3/4", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet12": { "index": "4", @@ -442,7 +485,8 @@ "alias": "Eth4/1", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet13": { "index": "4", @@ -452,7 +496,8 @@ "alias": "Eth4/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet58": { "index": "15", @@ -462,7 +507,8 @@ "alias": "Eth15/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet19": { "index": "5", @@ -472,7 +518,8 @@ "alias": "Eth5/3", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet59": { "index": "15", @@ -482,7 +529,8 @@ "alias": "Eth15/3", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet38": { "index": "10", @@ -492,7 +540,8 @@ "alias": "Eth10/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet78": { "index": "20", @@ -502,7 +551,8 @@ "alias": "Eth20/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet68": { "index": "18", @@ -512,7 +562,8 @@ "alias": "Eth18/1", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet14": { "index": "4", @@ -522,7 +573,8 @@ "alias": "Eth4/3", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet89": { "index": "23", @@ -532,7 +584,8 @@ "alias": "Eth23/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet88": { "index": "23", @@ -542,7 +595,8 @@ "alias": "Eth23/1", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet118": { "index": "30", @@ -552,7 +606,8 @@ "alias": "Eth30/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet119": { "index": "30", @@ -562,7 +617,8 @@ "alias": "Eth30/3", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet116": { "index": "30", @@ -572,7 +628,8 @@ "alias": "Eth30/1", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet114": { "index": "29", @@ -582,7 +639,8 @@ "alias": "Eth29/3", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet80": { "index": "21", @@ -593,7 +651,8 @@ "alias": "Eth21", "pfc_asym": "off", "speed": "100000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet112": { "index": "29", @@ -603,7 +662,8 @@ "alias": "Eth29/1", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet86": { "index": "22", @@ -613,7 +673,8 @@ "alias": "Eth22/2", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet110": { "index": "28", @@ -623,7 +684,8 @@ "alias": "Eth28/3", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet84": { "index": "22", @@ -633,7 +695,8 @@ "alias": "Eth22/1", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet31": { "index": "8", @@ -643,7 +706,8 @@ "alias": "Eth8/4", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet49": { "index": "13", @@ -653,7 +717,8 @@ "alias": "Eth13/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet48": { "index": "13", @@ -663,7 +728,8 @@ "alias": "Eth13/1", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet46": { "index": "12", @@ -673,7 +739,8 @@ "alias": "Eth12/2", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet30": { "index": "8", @@ -683,7 +750,8 @@ "alias": "Eth8/3", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet29": { "index": "8", @@ -693,7 +761,8 @@ "alias": "Eth8/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet40": { "index": "11", @@ -704,7 +773,8 @@ "alias": "Eth11", "pfc_asym": "off", "speed": "100000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet120": { "index": "31", @@ -715,7 +785,8 @@ "alias": "Eth31", "pfc_asym": "off", "speed": "100000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet28": { "index": "8", @@ -725,7 +796,8 @@ "alias": "Eth8/1", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet66": { "index": "17", @@ -735,7 +807,8 @@ "alias": "Eth17/2", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet60": { "index": "16", @@ -746,7 +819,8 @@ "alias": "Eth16", "pfc_asym": "off", "speed": "100000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet64": { "index": "17", @@ -756,7 +830,8 @@ "alias": "Eth17/1", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet44": { "index": "12", @@ -766,7 +841,8 @@ "alias": "Eth12/1", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet20": { "index": "6", @@ -778,7 +854,8 @@ "alias": "Eth6", "pfc_asym": "off", "speed": "100000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet79": { "index": "20", @@ -788,7 +865,8 @@ "alias": "Eth20/3", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet69": { "index": "18", @@ -798,7 +876,8 @@ "alias": "Eth18/2", "pfc_asym": "off", "speed": "25000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet24": { "index": "7", @@ -808,7 +887,8 @@ "alias": "Eth7/1", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet26": { "index": "7", @@ -818,7 +898,8 @@ "alias": "Eth7/2", "pfc_asym": "off", "speed": "50000", - "tpid": "0x8100" + "tpid": "0x8100", + "mode": "routed" }, "Ethernet128": { "index": "33", @@ -828,7 +909,8 @@ "mtu": "9100", "alias": "Eth33", "pfc_asym": "off", - "speed": "40000" + "speed": "40000", + "mode": "routed" }, "Ethernet132": { "index": "34", @@ -838,7 +920,8 @@ "mtu": "9100", "alias": "Eth34", "pfc_asym": "off", - "speed": "25000" + "speed": "25000", + "mode": "routed" }, "Ethernet136": { "index": "35", @@ -848,7 +931,8 @@ "mtu": "9100", "alias": "Eth35/1", "pfc_asym": "off", - "speed": "10000" + "speed": "10000", + "mode": "routed" }, "Ethernet137": { "index": "35", @@ -858,7 +942,8 @@ "mtu": "9100", "alias": "Eth35/2", "pfc_asym": "off", - "speed": "10000" + "speed": "10000", + "mode": "routed" }, "Ethernet138": { "index": "35", @@ -868,7 +953,8 @@ "mtu": "9100", "alias": "Eth35/3", "pfc_asym": "off", - "speed": "10000" + "speed": "10000", + "mode": "routed" }, "Ethernet139": { "index": "35", @@ -878,7 +964,8 @@ "mtu": "9100", "alias": "Eth35/4", "pfc_asym": "off", - "speed": "10000" + "speed": "10000", + "mode": "routed" }, "Ethernet140": { "index": "36", @@ -888,7 +975,8 @@ "mtu": "9100", "alias": "Eth36/1", "pfc_asym": "off", - "speed": "25000" + "speed": "25000", + "mode": "routed" }, "Ethernet141": { "index": "36", @@ -898,7 +986,8 @@ "mtu": "9100", "alias": "Eth36/2", "pfc_asym": "off", - "speed": "25000" + "speed": "25000", + "mode": "routed" }, "Ethernet142": { "index": "36", @@ -908,7 +997,8 @@ "mtu": "9100", "alias": "Eth36/3", "pfc_asym": "off", - "speed": "50000" + "speed": "50000", + "mode": "routed" }, "Ethernet144": { "index": "37", @@ -919,6 +1009,7 @@ "alias": "Eth37", "pfc_asym": "off", "speed": "100000", - "fec": "rs" + "fec": "rs", + "mode": "routed" } } diff --git a/src/sonic-config-engine/tests/sample_output/py2/l2switch.json b/src/sonic-config-engine/tests/sample_output/py2/l2switch.json index 5c38ba7201fd..957b660c7710 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/l2switch.json +++ b/src/sonic-config-engine/tests/sample_output/py2/l2switch.json @@ -4,162 +4,194 @@ "Ethernet8": { "alias": "fortyGigE0/8", "lanes": "37,38,39,40", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet0": { "alias": "fortyGigE0/0", "lanes": "29,30,31,32", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet4": { "alias": "fortyGigE0/4", "lanes": "25,26,27,28", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet108": { "alias": "fortyGigE0/108", "lanes": "81,82,83,84", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet100": { "alias": "fortyGigE0/100", "lanes": "125,126,127,128", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet104": { "alias": "fortyGigE0/104", "lanes": "85,86,87,88", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet68": { "alias": "fortyGigE0/68", "lanes": "69,70,71,72", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet96": { "alias": "fortyGigE0/96", "lanes": "121,122,123,124", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet124": { "alias": "fortyGigE0/124", "lanes": "101,102,103,104", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet92": { "alias": "fortyGigE0/92", "lanes": "113,114,115,116", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet120": { "alias": "fortyGigE0/120", "lanes": "97,98,99,100", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet52": { "alias": "fortyGigE0/52", "lanes": "53,54,55,56", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet56": { "alias": "fortyGigE0/56", "lanes": "61,62,63,64", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet76": { "alias": "fortyGigE0/76", "lanes": "73,74,75,76", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet72": { "alias": "fortyGigE0/72", "lanes": "77,78,79,80", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet64": { "alias": "fortyGigE0/64", "lanes": "65,66,67,68", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet32": { "alias": "fortyGigE0/32", "lanes": "9,10,11,12", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet16": { "alias": "fortyGigE0/16", "lanes": "41,42,43,44", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet36": { "alias": "fortyGigE0/36", "lanes": "13,14,15,16", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet12": { "alias": "fortyGigE0/12", "lanes": "33,34,35,36", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet88": { "alias": "fortyGigE0/88", "lanes": "117,118,119,120", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet116": { "alias": "fortyGigE0/116", "lanes": "93,94,95,96", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet80": { "alias": "fortyGigE0/80", "lanes": "105,106,107,108", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet112": { "alias": "fortyGigE0/112", "lanes": "89,90,91,92", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet84": { "alias": "fortyGigE0/84", "lanes": "109,110,111,112", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet48": { "alias": "fortyGigE0/48", "lanes": "49,50,51,52", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet44": { "alias": "fortyGigE0/44", "lanes": "17,18,19,20", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet40": { "alias": "fortyGigE0/40", "lanes": "21,22,23,24", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet28": { "alias": "fortyGigE0/28", "lanes": "1,2,3,4", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet60": { "alias": "fortyGigE0/60", "lanes": "57,58,59,60", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet20": { "alias": "fortyGigE0/20", "lanes": "45,46,47,48", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet24": { "alias": "fortyGigE0/24", "lanes": "5,6,7,8", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" } }, "VLAN": { diff --git a/src/sonic-config-engine/tests/sample_output/py3/l2switch.json b/src/sonic-config-engine/tests/sample_output/py3/l2switch.json index fa3363ab749c..7315eae695cf 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/l2switch.json +++ b/src/sonic-config-engine/tests/sample_output/py3/l2switch.json @@ -4,162 +4,194 @@ "Ethernet0": { "alias": "fortyGigE0/0", "lanes": "29,30,31,32", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet4": { "alias": "fortyGigE0/4", "lanes": "25,26,27,28", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet8": { "alias": "fortyGigE0/8", "lanes": "37,38,39,40", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet12": { "alias": "fortyGigE0/12", "lanes": "33,34,35,36", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet16": { "alias": "fortyGigE0/16", "lanes": "41,42,43,44", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet20": { "alias": "fortyGigE0/20", "lanes": "45,46,47,48", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet24": { "alias": "fortyGigE0/24", "lanes": "5,6,7,8", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet28": { "alias": "fortyGigE0/28", "lanes": "1,2,3,4", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet32": { "alias": "fortyGigE0/32", "lanes": "9,10,11,12", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet36": { "alias": "fortyGigE0/36", "lanes": "13,14,15,16", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet40": { "alias": "fortyGigE0/40", "lanes": "21,22,23,24", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet44": { "alias": "fortyGigE0/44", "lanes": "17,18,19,20", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet48": { "alias": "fortyGigE0/48", "lanes": "49,50,51,52", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet52": { "alias": "fortyGigE0/52", "lanes": "53,54,55,56", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet56": { "alias": "fortyGigE0/56", "lanes": "61,62,63,64", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet60": { "alias": "fortyGigE0/60", "lanes": "57,58,59,60", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet64": { "alias": "fortyGigE0/64", "lanes": "65,66,67,68", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet68": { "alias": "fortyGigE0/68", "lanes": "69,70,71,72", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet72": { "alias": "fortyGigE0/72", "lanes": "77,78,79,80", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet76": { "alias": "fortyGigE0/76", "lanes": "73,74,75,76", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet80": { "alias": "fortyGigE0/80", "lanes": "105,106,107,108", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet84": { "alias": "fortyGigE0/84", "lanes": "109,110,111,112", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet88": { "alias": "fortyGigE0/88", "lanes": "117,118,119,120", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet92": { "alias": "fortyGigE0/92", "lanes": "113,114,115,116", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet96": { "alias": "fortyGigE0/96", "lanes": "121,122,123,124", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet100": { "alias": "fortyGigE0/100", "lanes": "125,126,127,128", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet104": { "alias": "fortyGigE0/104", "lanes": "85,86,87,88", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet108": { "alias": "fortyGigE0/108", "lanes": "81,82,83,84", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet112": { "alias": "fortyGigE0/112", "lanes": "89,90,91,92", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet116": { "alias": "fortyGigE0/116", "lanes": "93,94,95,96", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet120": { "alias": "fortyGigE0/120", "lanes": "97,98,99,100", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" }, "Ethernet124": { "alias": "fortyGigE0/124", "lanes": "101,102,103,104", - "admin_status": "up" + "admin_status": "up", + "mode": "trunk" } }, "VLAN": { diff --git a/src/sonic-config-engine/tests/sample_platform.json b/src/sonic-config-engine/tests/sample_platform.json index fbb281e07393..f1148ff15693 100644 --- a/src/sonic-config-engine/tests/sample_platform.json +++ b/src/sonic-config-engine/tests/sample_platform.json @@ -15,6 +15,7 @@ "Ethernet0": { "index": "1,1,1,1", "lanes": "0,1,2,3", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth1"], "2x50G": ["Eth1/1", "Eth1/2"], @@ -26,6 +27,7 @@ "Ethernet4": { "index": "2,2,2,2", "lanes": "4,5,6,7", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth2"], "2x50G": ["Eth2/1", "Eth2/2"], @@ -35,6 +37,7 @@ "Ethernet8": { "index": "3,3,3,3", "lanes": "8,9,10,11", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth3"], "2x50G": ["Eth3/1", "Eth3/2"], @@ -46,6 +49,7 @@ "Ethernet12": { "index": "4,4,4,4", "lanes": "12,13,14,15", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth4"], "2x50G": ["Eth4/1", "Eth4/2"], @@ -57,6 +61,7 @@ "Ethernet16": { "index": "5,5,5,5", "lanes": "16,17,18,19", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth5"], "2x50G": ["Eth5/1", "Eth5/2"], @@ -68,6 +73,7 @@ "Ethernet20": { "index": "6,6,6,6", "lanes": "20,21,22,23", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth6"], "2x50G": ["Eth6/1", "Eth6/2"], @@ -79,6 +85,7 @@ "Ethernet24": { "index": "7,7,7,7", "lanes": "24,25,26,27", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth7"], "2x50G": ["Eth7/1", "Eth7/2"], @@ -90,6 +97,7 @@ "Ethernet28": { "index": "8,8,8,8", "lanes": "28,29,30,31", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth8"], "2x50G": ["Eth8/1", "Eth8/2"], @@ -101,6 +109,7 @@ "Ethernet32": { "index": "9,9,9,9", "lanes": "32,33,34,35", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth9"], "2x50G": ["Eth9/1", "Eth9/2"], @@ -112,6 +121,7 @@ "Ethernet36": { "index": "10,10,10,10", "lanes": "36,37,38,39", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth10"], "2x50G": ["Eth10/1", "Eth10/2"], @@ -123,6 +133,7 @@ "Ethernet40": { "index": "11,11,11,11", "lanes": "40,41,42,43", + "mode" : "routed", "breakout_modes": { "1x100G[50G,40G,25G,10G,1G]": ["Eth11"], "2x50G[40G,25G,10G,1G]": ["Eth11/1", "Eth11/2"], @@ -134,6 +145,7 @@ "Ethernet44": { "index": "12,12,12,12", "lanes": "44,45,46,47", + "mode" : "routed", "breakout_modes": { "1x100G[50G,40G,25G,10G,1G]": ["Eth12"], "2x50G[40G,25G,10G,1G]": ["Eth12/1", "Eth12/2"], @@ -145,6 +157,7 @@ "Ethernet48": { "index": "13,13,13,13", "lanes": "48,49,50,51", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth13"], "2x50G": ["Eth13/1", "Eth13/2"], @@ -156,6 +169,7 @@ "Ethernet52": { "index": "14,14,14,14", "lanes": "52,53,54,55", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth14"], "2x50G": ["Eth14/1", "Eth14/2"], @@ -167,6 +181,7 @@ "Ethernet56": { "index": "15,15,15,15", "lanes": "56,57,58,59", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth15"], "2x50G": ["Eth15/1", "Eth15/2"], @@ -177,7 +192,8 @@ }, "Ethernet60": { "index": "16,16,16,16", - "lanes": "60,61,62,63", + "lanes": "60,61,62,63", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth16"], "2x50G": ["Eth16/1", "Eth16/2"], @@ -189,6 +205,7 @@ "Ethernet64": { "index": "17,17,17,17", "lanes": "64,65,66,67", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth17"], "2x50G": ["Eth17/1", "Eth17/2"], @@ -200,6 +217,7 @@ "Ethernet68": { "index": "18,18,18,18", "lanes": "68,69,70,71", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth18"], "2x50G": ["Eth18/1", "Eth18/2"], @@ -211,6 +229,7 @@ "Ethernet72": { "index": "19,19,19,19", "lanes": "72,73,74,75", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth19"], "2x50G": ["Eth19/1", "Eth19/2"], @@ -222,6 +241,7 @@ "Ethernet76": { "index": "20,20,20,20", "lanes": "76,77,78,79", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth20"], "2x50G": ["Eth20/1", "Eth20/2"], @@ -233,6 +253,7 @@ "Ethernet80": { "index": "21,21,21,21", "lanes": "80,81,82,83", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth21"], "2x50G": ["Eth21/1", "Eth21/2"], @@ -244,6 +265,7 @@ "Ethernet84": { "index": "22,22,22,22", "lanes": "84,85,86,87", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth22"], "2x50G": ["Eth22/1", "Eth22/2"], @@ -255,6 +277,7 @@ "Ethernet88": { "index": "23,23,23,23", "lanes": "88,89,90,91", + "mode" : "routed", "alias_at_lanes": "Eth23/1, Eth23/2, Eth23/3, Eth23/4", "breakout_modes": { "1x100G[40G]": ["Eth23"], @@ -267,6 +290,7 @@ "Ethernet92": { "index": "24,24,24,24", "lanes": "92,93,94,95", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth24"], "2x50G": ["Eth24/1", "Eth24/2"], @@ -278,6 +302,7 @@ "Ethernet96": { "index": "25,25,25,25", "lanes": "96,97,98,99", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth25"], "2x50G": ["Eth25/1", "Eth25/2"], @@ -289,6 +314,7 @@ "Ethernet100": { "index": "26,26,26,26", "lanes": "100,101,102,103", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth26"], "2x50G": ["Eth26/1", "Eth26/2"], @@ -300,6 +326,7 @@ "Ethernet104": { "index": "27,27,27,27", "lanes": "104,105,106,107", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth27"], "2x50G": ["Eth27/1", "Eth27/2"], @@ -311,6 +338,7 @@ "Ethernet108": { "index": "28,28,28,28", "lanes": "108,109,110,111", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth28"], "2x50G": ["Eth28/1", "Eth28/2"], @@ -322,6 +350,7 @@ "Ethernet112": { "index": "29,29,29,29", "lanes": "112,113,114,115", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth29"], "2x50G": ["Eth29/1", "Eth29/2"], @@ -333,6 +362,7 @@ "Ethernet116": { "index": "30,30,30,30", "lanes": "116,117,118,119", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth30"], "2x50G": ["Eth30/1", "Eth30/2"], @@ -344,6 +374,7 @@ "Ethernet120": { "index": "31,31,31,31", "lanes": "120,121,122,123", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth31"], "2x50G": ["Eth31/1", "Eth31/2"], @@ -355,6 +386,7 @@ "Ethernet124": { "index": "32,32,32,32", "lanes": "124,125,126,127", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth32"], "2x50G": ["Eth32/1", "Eth32/2"], @@ -366,6 +398,7 @@ "Ethernet128": { "index": "33,33,33,33", "lanes": "128,129,130,131", + "mode" : "routed", "breakout_modes": { "1x100G[40G]": ["Eth33"], "2x50G": ["Eth33/1", "Eth33/2"], @@ -377,6 +410,7 @@ "Ethernet132": { "index": "34,34,34,34", "lanes": "132,133,134,135", + "mode" : "routed", "breakout_modes": { "1x100G[50G,40G,25G,10G]": ["Eth34"], "2x50G": ["Eth34/1", "Eth34/2"], @@ -388,6 +422,7 @@ "Ethernet136": { "index": "35,35,35,35", "lanes": "136,137,138,139", + "mode" : "routed", "breakout_modes": { "1x100G[50G,40G,25G,10G]": ["Eth35"], "2x50G": ["Eth35/1", "Eth35/2"], @@ -399,6 +434,7 @@ "Ethernet140": { "index": "36,36,36,36", "lanes": "140,141,142,143", + "mode" : "routed", "breakout_modes": { "1x100000[50G,40000,25000,10G]": ["Eth36"], "2x50G": ["Eth36/1", "Eth36/2"], @@ -410,6 +446,7 @@ "Ethernet144": { "index": "37,37,37,37", "lanes": "144,145,146,147", + "mode" : "routed", "breakout_modes": { "1x100G[50G,40G,25G,10G]": ["Eth37"], "2x50G": ["Eth37/1", "Eth37/2"], diff --git a/src/sonic-config-engine/tests/t0-sample-autoneg-port-config.ini b/src/sonic-config-engine/tests/t0-sample-autoneg-port-config.ini index 91e2283eb4a6..06ada7482bc8 100644 --- a/src/sonic-config-engine/tests/t0-sample-autoneg-port-config.ini +++ b/src/sonic-config-engine/tests/t0-sample-autoneg-port-config.ini @@ -1,33 +1,33 @@ -# name lanes alias autoneg -Ethernet0 29,30,31,32 fortyGigE0/0 off -Ethernet4 25,26,27,28 fortyGigE0/4 off -Ethernet8 37,38,39,40 fortyGigE0/8 off -Ethernet12 33,34,35,36 fortyGigE0/12 off -Ethernet16 41,42,43,44 fortyGigE0/16 off -Ethernet20 45,46,47,48 fortyGigE0/20 off -Ethernet24 5,6,7,8 fortyGigE0/24 off -Ethernet28 1,2,3,4 fortyGigE0/28 off -Ethernet32 9,10,11,12 fortyGigE0/32 off -Ethernet36 13,14,15,16 fortyGigE0/36 off -Ethernet40 21,22,23,24 fortyGigE0/40 off -Ethernet44 17,18,19,20 fortyGigE0/44 off -Ethernet48 49,50,51,52 fortyGigE0/48 off -Ethernet52 53,54,55,56 fortyGigE0/52 off -Ethernet56 61,62,63,64 fortyGigE0/56 off -Ethernet60 57,58,59,60 fortyGigE0/60 off -Ethernet64 65,66,67,68 fortyGigE0/64 off -Ethernet68 69,70,71,72 fortyGigE0/68 off -Ethernet72 77,78,79,80 fortyGigE0/72 off -Ethernet76 73,74,75,76 fortyGigE0/76 off -Ethernet80 105,106,107,108 fortyGigE0/80 off -Ethernet84 109,110,111,112 fortyGigE0/84 off -Ethernet88 117,118,119,120 fortyGigE0/88 off -Ethernet92 113,114,115,116 fortyGigE0/92 off -Ethernet96 121,122,123,124 fortyGigE0/96 off -Ethernet100 125,126,127,128 fortyGigE0/100 off -Ethernet104 85,86,87,88 fortyGigE0/104 off -Ethernet108 81,82,83,84 fortyGigE0/108 off -Ethernet112 89,90,91,92 fortyGigE0/112 on -Ethernet116 93,94,95,96 fortyGigE0/116 on -Ethernet120 97,98,99,100 fortyGigE0/120 on -Ethernet124 101,102,103,104 fortyGigE0/124 on +# name lanes alias autoneg mode +Ethernet0 29,30,31,32 fortyGigE0/0 off routed +Ethernet4 25,26,27,28 fortyGigE0/4 off trunk +Ethernet8 37,38,39,40 fortyGigE0/8 off trunk +Ethernet12 33,34,35,36 fortyGigE0/12 off trunk +Ethernet16 41,42,43,44 fortyGigE0/16 off trunk +Ethernet20 45,46,47,48 fortyGigE0/20 off trunk +Ethernet24 5,6,7,8 fortyGigE0/24 off trunk +Ethernet28 1,2,3,4 fortyGigE0/28 off trunk +Ethernet32 9,10,11,12 fortyGigE0/32 off trunk +Ethernet36 13,14,15,16 fortyGigE0/36 off trunk +Ethernet40 21,22,23,24 fortyGigE0/40 off trunk +Ethernet44 17,18,19,20 fortyGigE0/44 off trunk +Ethernet48 49,50,51,52 fortyGigE0/48 off trunk +Ethernet52 53,54,55,56 fortyGigE0/52 off trunk +Ethernet56 61,62,63,64 fortyGigE0/56 off trunk +Ethernet60 57,58,59,60 fortyGigE0/60 off trunk +Ethernet64 65,66,67,68 fortyGigE0/64 off trunk +Ethernet68 69,70,71,72 fortyGigE0/68 off trunk +Ethernet72 77,78,79,80 fortyGigE0/72 off trunk +Ethernet76 73,74,75,76 fortyGigE0/76 off trunk +Ethernet80 105,106,107,108 fortyGigE0/80 off trunk +Ethernet84 109,110,111,112 fortyGigE0/84 off trunk +Ethernet88 117,118,119,120 fortyGigE0/88 off trunk +Ethernet92 113,114,115,116 fortyGigE0/92 off trunk +Ethernet96 121,122,123,124 fortyGigE0/96 off trunk +Ethernet100 125,126,127,128 fortyGigE0/100 off trunk +Ethernet104 85,86,87,88 fortyGigE0/104 off trunk +Ethernet108 81,82,83,84 fortyGigE0/108 off trunk +Ethernet112 89,90,91,92 fortyGigE0/112 on trunk +Ethernet116 93,94,95,96 fortyGigE0/116 on trunk +Ethernet120 97,98,99,100 fortyGigE0/120 on trunk +Ethernet124 101,102,103,104 fortyGigE0/124 on routed diff --git a/src/sonic-config-engine/tests/t0-sample-port-config.ini b/src/sonic-config-engine/tests/t0-sample-port-config.ini index 06898f1d7964..3cae283750bd 100644 --- a/src/sonic-config-engine/tests/t0-sample-port-config.ini +++ b/src/sonic-config-engine/tests/t0-sample-port-config.ini @@ -1,33 +1,33 @@ -# name lanes alias -Ethernet0 29,30,31,32 fortyGigE0/0 -Ethernet4 25,26,27,28 fortyGigE0/4 -Ethernet8 37,38,39,40 fortyGigE0/8 -Ethernet12 33,34,35,36 fortyGigE0/12 -Ethernet16 41,42,43,44 fortyGigE0/16 -Ethernet20 45,46,47,48 fortyGigE0/20 -Ethernet24 5,6,7,8 fortyGigE0/24 -Ethernet28 1,2,3,4 fortyGigE0/28 -Ethernet32 9,10,11,12 fortyGigE0/32 -Ethernet36 13,14,15,16 fortyGigE0/36 -Ethernet40 21,22,23,24 fortyGigE0/40 -Ethernet44 17,18,19,20 fortyGigE0/44 -Ethernet48 49,50,51,52 fortyGigE0/48 -Ethernet52 53,54,55,56 fortyGigE0/52 -Ethernet56 61,62,63,64 fortyGigE0/56 -Ethernet60 57,58,59,60 fortyGigE0/60 -Ethernet64 65,66,67,68 fortyGigE0/64 -Ethernet68 69,70,71,72 fortyGigE0/68 -Ethernet72 77,78,79,80 fortyGigE0/72 -Ethernet76 73,74,75,76 fortyGigE0/76 -Ethernet80 105,106,107,108 fortyGigE0/80 -Ethernet84 109,110,111,112 fortyGigE0/84 -Ethernet88 117,118,119,120 fortyGigE0/88 -Ethernet92 113,114,115,116 fortyGigE0/92 -Ethernet96 121,122,123,124 fortyGigE0/96 -Ethernet100 125,126,127,128 fortyGigE0/100 -Ethernet104 85,86,87,88 fortyGigE0/104 -Ethernet108 81,82,83,84 fortyGigE0/108 -Ethernet112 89,90,91,92 fortyGigE0/112 -Ethernet116 93,94,95,96 fortyGigE0/116 -Ethernet120 97,98,99,100 fortyGigE0/120 -Ethernet124 101,102,103,104 fortyGigE0/124 +# name lanes alias mode +Ethernet0 29,30,31,32 fortyGigE0/0 trunk +Ethernet4 25,26,27,28 fortyGigE0/4 trunk +Ethernet8 37,38,39,40 fortyGigE0/8 trunk +Ethernet12 33,34,35,36 fortyGigE0/12 trunk +Ethernet16 41,42,43,44 fortyGigE0/16 trunk +Ethernet20 45,46,47,48 fortyGigE0/20 trunk +Ethernet24 5,6,7,8 fortyGigE0/24 trunk +Ethernet28 1,2,3,4 fortyGigE0/28 trunk +Ethernet32 9,10,11,12 fortyGigE0/32 trunk +Ethernet36 13,14,15,16 fortyGigE0/36 trunk +Ethernet40 21,22,23,24 fortyGigE0/40 trunk +Ethernet44 17,18,19,20 fortyGigE0/44 trunk +Ethernet48 49,50,51,52 fortyGigE0/48 trunk +Ethernet52 53,54,55,56 fortyGigE0/52 trunk +Ethernet56 61,62,63,64 fortyGigE0/56 trunk +Ethernet60 57,58,59,60 fortyGigE0/60 trunk +Ethernet64 65,66,67,68 fortyGigE0/64 trunk +Ethernet68 69,70,71,72 fortyGigE0/68 trunk +Ethernet72 77,78,79,80 fortyGigE0/72 trunk +Ethernet76 73,74,75,76 fortyGigE0/76 trunk +Ethernet80 105,106,107,108 fortyGigE0/80 trunk +Ethernet84 109,110,111,112 fortyGigE0/84 trunk +Ethernet88 117,118,119,120 fortyGigE0/88 trunk +Ethernet92 113,114,115,116 fortyGigE0/92 trunk +Ethernet96 121,122,123,124 fortyGigE0/96 trunk +Ethernet100 125,126,127,128 fortyGigE0/100 trunk +Ethernet104 85,86,87,88 fortyGigE0/104 trunk +Ethernet108 81,82,83,84 fortyGigE0/108 trunk +Ethernet112 89,90,91,92 fortyGigE0/112 trunk +Ethernet116 93,94,95,96 fortyGigE0/116 trunk +Ethernet120 97,98,99,100 fortyGigE0/120 trunk +Ethernet124 101,102,103,104 fortyGigE0/124 trunk diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index 7018dc7db3bf..512a6cefb260 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -335,15 +335,14 @@ def test_minigraph_portchannels(self, **kwargs): output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'PortChannel1': {'admin_status': 'up', 'min_links': '1', 'mtu': '9100', 'tpid': '0x8100', 'lacp_key': 'auto'}}") - ) + utils.to_dict("{'PortChannel1': {'admin_status': 'up', 'min_links': '1', 'mtu': '9100', 'tpid': '0x8100', 'lacp_key': 'auto', 'mode': 'routed'}}")) def test_minigraph_portchannel_with_more_member(self): argument = ['-m', self.sample_graph_pc_test, '-p', self.port_config, '-v', 'PORTCHANNEL'] output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'PortChannel01': {'admin_status': 'up', 'min_links': '3', 'mtu': '9100', 'tpid': '0x8100', 'lacp_key': 'auto'}}")) + utils.to_dict("{'PortChannel01': {'admin_status': 'up', 'min_links': '3', 'mtu': '9100', 'tpid': '0x8100', 'lacp_key': 'auto', 'mode': 'routed'}}")) def test_minigraph_portchannel_members(self): argument = ['-m', self.sample_graph_pc_test, '-p', self.port_config, '-v', "PORTCHANNEL_MEMBER.keys()|list"] @@ -391,7 +390,7 @@ def test_minigraph_port_description(self): output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/124', 'admin_status': 'up', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1'}") + utils.to_dict("{'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100','mode' : 'trunk', 'alias': 'fortyGigE0/124', 'admin_status': 'up', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1'}") ) def test_minigraph_port_fec_disabled(self): @@ -400,7 +399,7 @@ def test_minigraph_port_fec_disabled(self): output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'lanes': '25,26,27,28', 'description': 'Servers0:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '100000', 'autoneg': 'on', 'fec': 'none'}") + utils.to_dict("{'lanes': '25,26,27,28', 'description': 'Servers0:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '100000', 'autoneg': 'on', 'fec': 'none'}") ) def test_minigraph_port_autonegotiation(self): @@ -410,38 +409,38 @@ def test_minigraph_port_autonegotiation(self): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'alias': 'fortyGigE0/0', 'pfc_asym': 'off', 'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'mtu': '9100', 'tpid': '0x8100', 'speed': '40000'}, " - "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'Servers0:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'autoneg': 'on', 'speed': '100000', 'fec': 'none'}, " - "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'fortyGigE0/8', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'autoneg': 'off', 'fec': 'none', 'speed': '40000'}, " - "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'fortyGigE0/12', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet16': {'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/16', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet20': {'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/20', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet24': {'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/24', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet28': {'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/28', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet32': {'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/32', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet36': {'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/36', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet40': {'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/40', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet44': {'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/44', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet48': {'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/48', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet52': {'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/52', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet56': {'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/56', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet60': {'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/60', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet64': {'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/64', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet68': {'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/68', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet72': {'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/72', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet76': {'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/76', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet80': {'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/80', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet84': {'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/84', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet88': {'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/88', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet92': {'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/92', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet96': {'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/96', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet100': {'lanes': '125,126,127,128', 'description': 'Servers100:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/100', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'speed': '40000'}, " - "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'speed': '40000'}, " - "'Ethernet112': {'lanes': '89,90,91,92', 'description': 'ARISTA01T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/112', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet116': {'lanes': '93,94,95,96', 'description': 'ARISTA02T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/116', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet120': {'lanes': '97,98,99,100', 'description': 'ARISTA03T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/120', 'admin_status': 'up', 'speed': '40000'}, " - "'Ethernet124': {'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/124', 'admin_status': 'up', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1'}}" + "{'Ethernet0': {'alias': 'fortyGigE0/0', 'pfc_asym': 'off', 'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk', 'speed': '40000'}, " + "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'Servers0:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/4', 'admin_status': 'up', 'autoneg': 'on', 'speed': '100000', 'fec': 'none'}, " + "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'fortyGigE0/8', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'autoneg': 'off', 'fec': 'none', 'speed': '40000'}, " + "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'fortyGigE0/12', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet16': {'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/16', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet20': {'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/20', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet24': {'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/24', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet28': {'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/28', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet32': {'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/32', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet36': {'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/36', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet40': {'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/40', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet44': {'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/44', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet48': {'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/48', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet52': {'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'mode': 'trunk','alias': 'fortyGigE0/52', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet56': {'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/56', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet60': {'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/60', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet64': {'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/64', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet68': {'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/68', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet72': {'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/72', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet76': {'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/76', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet80': {'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/80', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet84': {'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/84', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet88': {'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/88', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet92': {'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/92', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet96': {'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/96', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet100': {'lanes': '125,126,127,128', 'description': 'Servers100:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/100', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'speed': '40000'}, " + "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'speed': '40000'}, " + "'Ethernet112': {'lanes': '89,90,91,92', 'description': 'ARISTA01T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/112', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet116': {'lanes': '93,94,95,96', 'description': 'ARISTA02T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/116', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet120': {'lanes': '97,98,99,100', 'description': 'ARISTA03T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/120', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet124': {'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/124', 'admin_status': 'up', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1'}}" ) ) @@ -451,38 +450,38 @@ def test_minigraph_port_autonegotiation(self): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/0', 'pfc_asym': 'off', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'Servers0:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'autoneg': 'on', 'speed': '100000', 'fec': 'none'}, " - "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'fortyGigE0/8', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'autoneg': 'off', 'fec': 'none', 'speed': '40000'}, " - "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'fortyGigE0/12', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet16': {'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/16', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet20': {'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/20', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet24': {'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/24', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet28': {'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/28', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet32': {'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/32', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet36': {'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/36', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet40': {'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/40', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet44': {'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/44', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet48': {'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/48', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet52': {'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/52', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet56': {'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/56', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet60': {'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/60', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet64': {'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/64', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet68': {'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/68', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet72': {'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/72', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet76': {'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/76', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet80': {'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/80', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet84': {'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/84', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet88': {'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/88', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet92': {'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/92', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet96': {'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/96', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet100': {'lanes': '125,126,127,128', 'description': 'Servers100:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/100', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet104': {'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet108': {'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'autoneg': 'off', 'speed': '40000'}, " - "'Ethernet112': {'lanes': '89,90,91,92', 'description': 'ARISTA01T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/112', 'admin_status': 'up', 'autoneg': 'on', 'speed': '40000'}, " - "'Ethernet116': {'lanes': '93,94,95,96', 'description': 'ARISTA02T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/116', 'admin_status': 'up', 'autoneg': 'on', 'speed': '40000'}, " - "'Ethernet120': {'lanes': '97,98,99,100', 'description': 'ARISTA03T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/120', 'admin_status': 'up', 'autoneg': 'on', 'speed': '40000'}, " - "'Ethernet124': {'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/124', 'admin_status': 'up', 'autoneg': 'on', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1', 'speed': '100000'}}" + "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','alias': 'fortyGigE0/0', 'pfc_asym': 'off', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'Servers0:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'autoneg': 'on', 'speed': '100000', 'fec': 'none'}, " + "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'fortyGigE0/8', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/8', 'admin_status': 'up', 'autoneg': 'off', 'fec': 'none', 'speed': '40000'}, " + "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'fortyGigE0/12', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet16': {'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/16', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet20': {'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/20', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet24': {'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/24', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet28': {'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/28', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet32': {'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/32', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet36': {'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/36', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet40': {'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/40', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet44': {'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/44', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet48': {'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/48', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet52': {'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/52', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet56': {'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/56', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet60': {'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/60', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet64': {'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/64', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet68': {'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/68', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet72': {'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/72', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet76': {'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/76', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet80': {'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/80', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet84': {'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/84', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet88': {'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/88', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet92': {'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/92', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet96': {'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/96', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet100': {'lanes': '125,126,127,128', 'description': 'Servers100:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/100', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet104': {'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet108': {'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet112': {'lanes': '89,90,91,92', 'description': 'ARISTA01T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/112', 'admin_status': 'up', 'autoneg': 'on', 'speed': '40000'}, " + "'Ethernet116': {'lanes': '93,94,95,96', 'description': 'ARISTA02T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/116', 'admin_status': 'up', 'autoneg': 'on', 'speed': '40000'}, " + "'Ethernet120': {'lanes': '97,98,99,100', 'description': 'ARISTA03T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/120', 'admin_status': 'up', 'autoneg': 'on', 'speed': '40000'}, " + "'Ethernet124': {'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','alias': 'fortyGigE0/124', 'admin_status': 'up', 'autoneg': 'on', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1', 'speed': '100000'}}" ) ) @@ -491,7 +490,7 @@ def test_minigraph_port_rs(self): output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/124', 'admin_status': 'up', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1'}") + utils.to_dict("{'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode' : 'trunk', 'alias': 'fortyGigE0/124', 'admin_status': 'up', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1'}") ) def test_minigraph_default_vxlan(self): @@ -542,54 +541,53 @@ def test_minigraph_ethernet_interfaces(self, **kwargs): output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'lanes': '37,38,39,40', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'speed': '1000', 'tpid': '0x8100'}") + utils.to_dict("{'lanes': '37,38,39,40', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'speed': '1000', 'tpid': '0x8100', 'mode': 'trunk' }") ) argument = ['-m', graph_file, '-p', self.port_config, '-v', "PORT[\'Ethernet12\']"] output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'lanes': '33,34,35,36', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '100000', 'description': 'Interface description'}") + utils.to_dict("{'lanes': '33,34,35,36', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '100000', 'description': 'Interface description'}") ) def test_minigraph_neighbor_interfaces(self): argument = ['-m', self.sample_graph_simple_case, '-p', self.port_config, '-v', "PORT"] output = self.run_script(argument) - self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'switch-01t1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/0', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}, " - "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'server1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '25000', 'autoneg': 'on', 'mux_cable': 'true'}, " - "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'speed': '40000', 'autoneg': 'on', 'mux_cable': 'true'}, " - "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}, " - "'Ethernet16': {'alias': 'fortyGigE0/16', 'pfc_asym': 'off', 'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet20': {'alias': 'fortyGigE0/20', 'pfc_asym': 'off', 'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet24': {'alias': 'fortyGigE0/24', 'pfc_asym': 'off', 'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet28': {'alias': 'fortyGigE0/28', 'pfc_asym': 'off', 'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet32': {'alias': 'fortyGigE0/32', 'pfc_asym': 'off', 'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet36': {'alias': 'fortyGigE0/36', 'pfc_asym': 'off', 'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet40': {'alias': 'fortyGigE0/40', 'pfc_asym': 'off', 'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet44': {'alias': 'fortyGigE0/44', 'pfc_asym': 'off', 'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet48': {'alias': 'fortyGigE0/48', 'pfc_asym': 'off', 'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet52': {'alias': 'fortyGigE0/52', 'pfc_asym': 'off', 'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet56': {'alias': 'fortyGigE0/56', 'pfc_asym': 'off', 'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet60': {'alias': 'fortyGigE0/60', 'pfc_asym': 'off', 'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet64': {'alias': 'fortyGigE0/64', 'pfc_asym': 'off', 'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet68': {'alias': 'fortyGigE0/68', 'pfc_asym': 'off', 'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet72': {'alias': 'fortyGigE0/72', 'pfc_asym': 'off', 'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet76': {'alias': 'fortyGigE0/76', 'pfc_asym': 'off', 'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet80': {'alias': 'fortyGigE0/80', 'pfc_asym': 'off', 'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet84': {'alias': 'fortyGigE0/84', 'pfc_asym': 'off', 'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet88': {'alias': 'fortyGigE0/88', 'pfc_asym': 'off', 'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet92': {'alias': 'fortyGigE0/92', 'pfc_asym': 'off', 'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet96': {'alias': 'fortyGigE0/96', 'pfc_asym': 'off', 'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet100': {'alias': 'fortyGigE0/100', 'pfc_asym': 'off', 'lanes': '125,126,127,128', 'description': 'fortyGigE0/100', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet112': {'alias': 'fortyGigE0/112', 'pfc_asym': 'off', 'lanes': '89,90,91,92', 'description': 'fortyGigE0/112', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet116': {'alias': 'fortyGigE0/116', 'pfc_asym': 'off', 'lanes': '93,94,95,96', 'description': 'fortyGigE0/116', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet120': {'alias': 'fortyGigE0/120', 'pfc_asym': 'off', 'lanes': '97,98,99,100', 'description': 'fortyGigE0/120', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet124': {'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'lanes': '101,102,103,104', 'description': 'fortyGigE0/124', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}}" + "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'switch-01t1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' ,'alias': 'fortyGigE0/0', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}," + "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'server1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '25000', 'autoneg': 'on', 'mux_cable': 'true'}, " + "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'speed': '40000', 'autoneg': 'on', 'mux_cable': 'true'}, " + "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}, " + "'Ethernet16': {'alias': 'fortyGigE0/16', 'pfc_asym': 'off', 'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet20': {'alias': 'fortyGigE0/20', 'pfc_asym': 'off', 'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet24': {'alias': 'fortyGigE0/24', 'pfc_asym': 'off', 'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet28': {'alias': 'fortyGigE0/28', 'pfc_asym': 'off', 'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet32': {'alias': 'fortyGigE0/32', 'pfc_asym': 'off', 'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet36': {'alias': 'fortyGigE0/36', 'pfc_asym': 'off', 'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet40': {'alias': 'fortyGigE0/40', 'pfc_asym': 'off', 'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet44': {'alias': 'fortyGigE0/44', 'pfc_asym': 'off', 'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet48': {'alias': 'fortyGigE0/48', 'pfc_asym': 'off', 'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet52': {'alias': 'fortyGigE0/52', 'pfc_asym': 'off', 'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet56': {'alias': 'fortyGigE0/56', 'pfc_asym': 'off', 'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet60': {'alias': 'fortyGigE0/60', 'pfc_asym': 'off', 'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet64': {'alias': 'fortyGigE0/64', 'pfc_asym': 'off', 'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet68': {'alias': 'fortyGigE0/68', 'pfc_asym': 'off', 'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet72': {'alias': 'fortyGigE0/72', 'pfc_asym': 'off', 'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet76': {'alias': 'fortyGigE0/76', 'pfc_asym': 'off', 'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet80': {'alias': 'fortyGigE0/80', 'pfc_asym': 'off', 'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet84': {'alias': 'fortyGigE0/84', 'pfc_asym': 'off', 'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet88': {'alias': 'fortyGigE0/88', 'pfc_asym': 'off', 'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet92': {'alias': 'fortyGigE0/92', 'pfc_asym': 'off', 'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet96': {'alias': 'fortyGigE0/96', 'pfc_asym': 'off', 'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet100': {'alias': 'fortyGigE0/100', 'pfc_asym': 'off', 'lanes': '125,126,127,128', 'description': 'fortyGigE0/100', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet112': {'alias': 'fortyGigE0/112', 'pfc_asym': 'off', 'lanes': '89,90,91,92', 'description': 'fortyGigE0/112', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet116': {'alias': 'fortyGigE0/116', 'pfc_asym': 'off', 'lanes': '93,94,95,96', 'description': 'fortyGigE0/116', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet120': {'alias': 'fortyGigE0/120', 'pfc_asym': 'off', 'lanes': '97,98,99,100', 'description': 'fortyGigE0/120', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet124': {'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'lanes': '101,102,103,104', 'description': 'fortyGigE0/124', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}}" ) ) @@ -601,38 +599,38 @@ def test_minigraph_neighbor_interfaces_config_db(self): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'switch-01t1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/0', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}, " - "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'server1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '25000', 'autoneg': 'on', 'mux_cable': 'true'}, " - "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'speed': '40000', 'autoneg': 'on', 'mux_cable': 'true'}, " - "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}, " - "'Ethernet16': {'alias': 'fortyGigE0/16', 'pfc_asym': 'off', 'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet20': {'alias': 'fortyGigE0/20', 'pfc_asym': 'off', 'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet24': {'alias': 'fortyGigE0/24', 'pfc_asym': 'off', 'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet28': {'alias': 'fortyGigE0/28', 'pfc_asym': 'off', 'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet32': {'alias': 'fortyGigE0/32', 'pfc_asym': 'off', 'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet36': {'alias': 'fortyGigE0/36', 'pfc_asym': 'off', 'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet40': {'alias': 'fortyGigE0/40', 'pfc_asym': 'off', 'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet44': {'alias': 'fortyGigE0/44', 'pfc_asym': 'off', 'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet48': {'alias': 'fortyGigE0/48', 'pfc_asym': 'off', 'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet52': {'alias': 'fortyGigE0/52', 'pfc_asym': 'off', 'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet56': {'alias': 'fortyGigE0/56', 'pfc_asym': 'off', 'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet60': {'alias': 'fortyGigE0/60', 'pfc_asym': 'off', 'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet64': {'alias': 'fortyGigE0/64', 'pfc_asym': 'off', 'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet68': {'alias': 'fortyGigE0/68', 'pfc_asym': 'off', 'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet72': {'alias': 'fortyGigE0/72', 'pfc_asym': 'off', 'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet76': {'alias': 'fortyGigE0/76', 'pfc_asym': 'off', 'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet80': {'alias': 'fortyGigE0/80', 'pfc_asym': 'off', 'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet84': {'alias': 'fortyGigE0/84', 'pfc_asym': 'off', 'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet88': {'alias': 'fortyGigE0/88', 'pfc_asym': 'off', 'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet92': {'alias': 'fortyGigE0/92', 'pfc_asym': 'off', 'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet96': {'alias': 'fortyGigE0/96', 'pfc_asym': 'off', 'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet100': {'alias': 'fortyGigE0/100', 'pfc_asym': 'off', 'lanes': '125,126,127,128', 'description': 'fortyGigE0/100', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet112': {'alias': 'fortyGigE0/112', 'pfc_asym': 'off', 'lanes': '89,90,91,92', 'description': 'fortyGigE0/112', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet116': {'alias': 'fortyGigE0/116', 'pfc_asym': 'off', 'lanes': '93,94,95,96', 'description': 'fortyGigE0/116', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet120': {'alias': 'fortyGigE0/120', 'pfc_asym': 'off', 'lanes': '97,98,99,100', 'description': 'fortyGigE0/120', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet124': {'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'lanes': '101,102,103,104', 'description': 'fortyGigE0/124', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}}" + "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'switch-01t1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'alias': 'fortyGigE0/0', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}, " + "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'server1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '25000', 'autoneg': 'on', 'mux_cable': 'true'}, " + "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'alias': 'fortyGigE0/8', 'admin_status': 'up', 'speed': '40000', 'autoneg': 'on', 'mux_cable': 'true'}, " + "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}, " + "'Ethernet16': {'alias': 'fortyGigE0/16', 'pfc_asym': 'off', 'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet20': {'alias': 'fortyGigE0/20', 'pfc_asym': 'off', 'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet24': {'alias': 'fortyGigE0/24', 'pfc_asym': 'off', 'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet28': {'alias': 'fortyGigE0/28', 'pfc_asym': 'off', 'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet32': {'alias': 'fortyGigE0/32', 'pfc_asym': 'off', 'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet36': {'alias': 'fortyGigE0/36', 'pfc_asym': 'off', 'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet40': {'alias': 'fortyGigE0/40', 'pfc_asym': 'off', 'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet44': {'alias': 'fortyGigE0/44', 'pfc_asym': 'off', 'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet48': {'alias': 'fortyGigE0/48', 'pfc_asym': 'off', 'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet52': {'alias': 'fortyGigE0/52', 'pfc_asym': 'off', 'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet56': {'alias': 'fortyGigE0/56', 'pfc_asym': 'off', 'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet60': {'alias': 'fortyGigE0/60', 'pfc_asym': 'off', 'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet64': {'alias': 'fortyGigE0/64', 'pfc_asym': 'off', 'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet68': {'alias': 'fortyGigE0/68', 'pfc_asym': 'off', 'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet72': {'alias': 'fortyGigE0/72', 'pfc_asym': 'off', 'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet76': {'alias': 'fortyGigE0/76', 'pfc_asym': 'off', 'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet80': {'alias': 'fortyGigE0/80', 'pfc_asym': 'off', 'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet84': {'alias': 'fortyGigE0/84', 'pfc_asym': 'off', 'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet88': {'alias': 'fortyGigE0/88', 'pfc_asym': 'off', 'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet92': {'alias': 'fortyGigE0/92', 'pfc_asym': 'off', 'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet96': {'alias': 'fortyGigE0/96', 'pfc_asym': 'off', 'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet100': {'alias': 'fortyGigE0/100', 'pfc_asym': 'off', 'lanes': '125,126,127,128', 'description': 'fortyGigE0/100', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet112': {'alias': 'fortyGigE0/112', 'pfc_asym': 'off', 'lanes': '89,90,91,92', 'description': 'fortyGigE0/112', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet116': {'alias': 'fortyGigE0/116', 'pfc_asym': 'off', 'lanes': '93,94,95,96', 'description': 'fortyGigE0/116', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet120': {'alias': 'fortyGigE0/120', 'pfc_asym': 'off', 'lanes': '97,98,99,100', 'description': 'fortyGigE0/120', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet124': {'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'lanes': '101,102,103,104', 'description': 'fortyGigE0/124', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}}" ) ) @@ -644,41 +642,40 @@ def test_minigraph_extra_ethernet_interfaces(self, **kwargs): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/0', 'admin_status': 'up', 'speed': '10000'}, " - "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'fortyGigE0/4', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '25000'}, " - "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'speed': '1000'}, " - "'Ethernet12': {'lanes': '33,34,35,36', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '100000', 'description': 'Interface description'}, " - "'Ethernet16': {'lanes': '41,42,43,44', 'pfc_asym': 'off', 'description': 'fortyGigE0/16', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/16', 'speed': '1000'}, " - "'Ethernet20': {'alias': 'fortyGigE0/20', 'pfc_asym': 'off', 'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet24': {'alias': 'fortyGigE0/24', 'pfc_asym': 'off', 'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet28': {'alias': 'fortyGigE0/28', 'pfc_asym': 'off', 'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet32': {'alias': 'fortyGigE0/32', 'pfc_asym': 'off', 'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet36': {'alias': 'fortyGigE0/36', 'pfc_asym': 'off', 'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet40': {'alias': 'fortyGigE0/40', 'pfc_asym': 'off', 'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet44': {'alias': 'fortyGigE0/44', 'pfc_asym': 'off', 'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet48': {'alias': 'fortyGigE0/48', 'pfc_asym': 'off', 'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet52': {'alias': 'fortyGigE0/52', 'pfc_asym': 'off', 'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet56': {'alias': 'fortyGigE0/56', 'pfc_asym': 'off', 'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet60': {'alias': 'fortyGigE0/60', 'pfc_asym': 'off', 'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet64': {'alias': 'fortyGigE0/64', 'pfc_asym': 'off', 'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet68': {'alias': 'fortyGigE0/68', 'pfc_asym': 'off', 'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet72': {'alias': 'fortyGigE0/72', 'pfc_asym': 'off', 'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet76': {'alias': 'fortyGigE0/76', 'pfc_asym': 'off', 'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet80': {'alias': 'fortyGigE0/80', 'pfc_asym': 'off', 'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet84': {'alias': 'fortyGigE0/84', 'pfc_asym': 'off', 'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet88': {'alias': 'fortyGigE0/88', 'pfc_asym': 'off', 'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet92': {'alias': 'fortyGigE0/92', 'pfc_asym': 'off', 'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet96': {'alias': 'fortyGigE0/96', 'pfc_asym': 'off', 'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet100': {'alias': 'fortyGigE0/100', 'pfc_asym': 'off', 'lanes': '125,126,127,128', 'description': 'fortyGigE0/100', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet112': {'alias': 'fortyGigE0/112', 'pfc_asym': 'off', 'lanes': '89,90,91,92', 'description': 'fortyGigE0/112', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet116': {'alias': 'fortyGigE0/116', 'pfc_asym': 'off', 'lanes': '93,94,95,96', 'description': 'fortyGigE0/116', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet120': {'alias': 'fortyGigE0/120', 'pfc_asym': 'off', 'lanes': '97,98,99,100', 'description': 'fortyGigE0/120', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " - "'Ethernet124': {'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'lanes': '101,102,103,104', 'description': 'fortyGigE0/124', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}}" + "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'alias': 'fortyGigE0/0', 'admin_status': 'up', 'speed': '10000'}, " + "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'fortyGigE0/4', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '25000'}, " + "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'alias': 'fortyGigE0/8', 'admin_status': 'up', 'speed': '1000'}, " + "'Ethernet12': {'lanes': '33,34,35,36', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '100000', 'description': 'Interface description'}, " + "'Ethernet16': {'lanes': '41,42,43,44', 'pfc_asym': 'off', 'description': 'fortyGigE0/16', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'alias': 'fortyGigE0/16', 'speed': '1000'}, " + "'Ethernet20': {'alias': 'fortyGigE0/20', 'pfc_asym': 'off', 'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet24': {'alias': 'fortyGigE0/24', 'pfc_asym': 'off', 'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet28': {'alias': 'fortyGigE0/28', 'pfc_asym': 'off', 'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet32': {'alias': 'fortyGigE0/32', 'pfc_asym': 'off', 'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet36': {'alias': 'fortyGigE0/36', 'pfc_asym': 'off', 'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet40': {'alias': 'fortyGigE0/40', 'pfc_asym': 'off', 'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet44': {'alias': 'fortyGigE0/44', 'pfc_asym': 'off', 'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet48': {'alias': 'fortyGigE0/48', 'pfc_asym': 'off', 'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet52': {'alias': 'fortyGigE0/52', 'pfc_asym': 'off', 'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet56': {'alias': 'fortyGigE0/56', 'pfc_asym': 'off', 'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet60': {'alias': 'fortyGigE0/60', 'pfc_asym': 'off', 'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet64': {'alias': 'fortyGigE0/64', 'pfc_asym': 'off', 'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet68': {'alias': 'fortyGigE0/68', 'pfc_asym': 'off', 'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet72': {'alias': 'fortyGigE0/72', 'pfc_asym': 'off', 'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet76': {'alias': 'fortyGigE0/76', 'pfc_asym': 'off', 'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet80': {'alias': 'fortyGigE0/80', 'pfc_asym': 'off', 'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet84': {'alias': 'fortyGigE0/84', 'pfc_asym': 'off', 'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet88': {'alias': 'fortyGigE0/88', 'pfc_asym': 'off', 'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet92': {'alias': 'fortyGigE0/92', 'pfc_asym': 'off', 'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet96': {'alias': 'fortyGigE0/96', 'pfc_asym': 'off', 'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet100': {'alias': 'fortyGigE0/100', 'pfc_asym': 'off', 'lanes': '125,126,127,128', 'description': 'fortyGigE0/100', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet112': {'alias': 'fortyGigE0/112', 'pfc_asym': 'off', 'lanes': '89,90,91,92', 'description': 'fortyGigE0/112', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet116': {'alias': 'fortyGigE0/116', 'pfc_asym': 'off', 'lanes': '93,94,95,96', 'description': 'fortyGigE0/116', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet120': {'alias': 'fortyGigE0/120', 'pfc_asym': 'off', 'lanes': '97,98,99,100', 'description': 'fortyGigE0/120', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'fec': 'rs', 'speed': '100000'}, " + "'Ethernet124': {'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'lanes': '101,102,103,104', 'description': 'fortyGigE0/124', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}}" ) ) - # everflow portion is not used # def test_metadata_everflow(self): # argument = '-m "' + self.sample_graph_metadata + '" -p "' + self.port_config + '" -v "MIRROR_SESSION"' @@ -720,7 +717,7 @@ def test_minigraph_bgp_mon(self): output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'10.20.30.40': {'rrclient': 0, 'name': 'BGPMonitor', 'local_addr': '10.1.0.32', 'nhopself': 0, 'holdtime': '10', 'asn': '0', 'keepalive': '3'}}") + utils.to_dict("{'10.20.30.40': {'rrclient': 0, 'name': 'BGPMonitor', 'local_addr': '10.1.0.32', 'nhopself': 0, 'holdtime': '10', 'asn': '1', 'keepalive': '3'}}") ) def test_minigraph_bgp_voq_chassis_peer(self): @@ -950,7 +947,7 @@ def test_minigraph_voq_port_macsec_enabled(self): output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'lanes': '6,7', 'fec': 'rs', 'alias': 'Ethernet1/1', 'index': '1', 'role': 'Ext', 'speed': '100000', 'macsec': 'macsec-profile', 'description': 'Ethernet1/1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}") + utils.to_dict("{'lanes': '6,7', 'fec': 'rs', 'alias': 'Ethernet1/1', 'index': '1', 'role': 'Ext', 'speed': '100000', 'macsec': 'macsec-profile', 'description': 'Ethernet1/1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed' , 'pfc_asym': 'off'}") ) def test_minigraph_voq_inband_interface_port(self): @@ -980,6 +977,7 @@ def test_minigraph_voq_inband_port(self): "description": "Recirc0/1", "mtu": "9100", "tpid": "0x8100", + "mode": "routed", "pfc_asym": "off", "admin_status": "up" }) @@ -998,6 +996,7 @@ def test_minigraph_voq_recirc_ports(self): "description": "Recirc0/0", "mtu": "9100", "tpid": "0x8100", + "mode": "routed", "pfc_asym": "off", "admin_status": "up" }) @@ -1043,7 +1042,6 @@ def test_minigraph_bgp_packet_chassis_peer(self): utils.to_dict(output.strip()), utils.to_dict("{'rrclient': 0, 'name': 'str2-8808-lc0-ASIC1', 'local_addr': '8.0.0.3', 'nhopself': 0, 'admin_status': 'up', 'holdtime': '0', 'asn': '65100', 'keepalive': '0'}") ) - def test_minigraph_bgp_packet_chassis_static_route(self): argument = ['-m', self.packet_chassis_graph, '-p', self.packet_chassis_port_ini, '-v', "STATIC_ROUTE"] output = self.run_script(argument) @@ -1087,29 +1085,28 @@ def test_minigraph_400g_to_100G_speed(self): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'lanes': '72,73,74,75', 'alias': 'Ethernet1/1', 'index': '1', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth0-ASIC0', 'fec': 'rs', 'description': 'ARISTA01T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet8': {'lanes': '80,81,82,83', 'alias': 'Ethernet2/1', 'index': '2', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth8-ASIC0', 'fec': 'rs', 'description': 'ARISTA01T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet16': {'lanes': '88,89,90,91', 'alias': 'Ethernet3/1', 'index': '3', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth16-ASIC0', 'fec': 'rs', 'description': 'ARISTA03T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet24': {'lanes': '96,97,98,99,100,101,102,103', 'alias': 'Ethernet4/1', 'index': '4', 'role': 'Ext', 'speed': '400000', 'asic_port_name': 'Eth24-ASIC0', 'description': 'ARISTA03T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet32': {'lanes': '104,105,106,107,108,109,110,111', 'alias': 'Ethernet5/1', 'index': '5', 'role': 'Ext', 'speed': '400000', 'asic_port_name': 'Eth32-ASIC0', 'description': 'ARISTA05T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet40': {'lanes': '112,113,114,115,116,117,118,119', 'alias': 'Ethernet6/1', 'index': '6', 'role': 'Ext', 'speed': '400000', 'asic_port_name': 'Eth40-ASIC0', 'description': 'ARISTA05T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet48': {'lanes': '120,121,122,123,124,125,126,127', 'alias': 'Ethernet7/1', 'index': '7', 'role': 'Ext', 'speed': '400000', 'asic_port_name': 'Eth48-ASIC0', 'description': 'ARISTA07T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet56': {'lanes': '128,129,130,131', 'alias': 'Ethernet8/1', 'index': '8', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth56-ASIC0', 'fec': 'rs', 'description': 'ARISTA07T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet64': {'lanes': '136,137,138,139', 'alias': 'Ethernet9/1', 'index': '9', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth64-ASIC0', 'fec': 'rs', 'description': 'ARISTA09T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet72': {'lanes': '64,65,66,67', 'alias': 'Ethernet10/1', 'index': '10', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth72-ASIC0', 'fec': 'rs', 'description': 'ARISTA09T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet80': {'lanes': '56,57,58,59', 'alias': 'Ethernet11/1', 'index': '11', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth80-ASIC0', 'fec': 'rs', 'description': 'ARISTA11T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet88': {'lanes': '48,49,50,51', 'alias': 'Ethernet12/1', 'index': '12', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth88-ASIC0', 'fec': 'rs', 'description': 'ARISTA11T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet96': {'lanes': '40,41,42,43', 'alias': 'Ethernet13/1', 'index': '13', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth96-ASIC0', 'fec': 'rs', 'description': 'ARISTA13T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet104': {'lanes': '32,33,34,35', 'alias': 'Ethernet14/1', 'index': '14', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth104-ASIC0', 'fec': 'rs', 'description': 'ARISTA15T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet112': {'lanes': '24,25,26,27', 'alias': 'Ethernet15/1', 'index': '15', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth112-ASIC0', 'fec': 'rs', 'description': 'ARISTA15T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet120': {'lanes': '16,17,18,19', 'alias': 'Ethernet16/1', 'index': '16', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth120-ASIC0', 'fec': 'rs', 'description': 'ARISTA17T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet128': {'lanes': '8,9,10,11', 'alias': 'Ethernet17/1', 'index': '17', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth128-ASIC0', 'fec': 'rs', 'description': 'ARISTA18T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet136': {'lanes': '0,1,2,3', 'alias': 'Ethernet18/1', 'index': '18', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth136-ASIC0', 'fec': 'rs', 'description': 'ARISTA18T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, " - "'Ethernet-Rec0': {'lanes': '221', 'alias': 'Recirc0/0', 'index': '37', 'role': 'Rec', 'speed': '400000', 'asic_port_name': 'Rcy0-ASIC0', 'description': 'Recirc0/0', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}," - "'Ethernet-IB0': {'lanes': '222', 'alias': 'Recirc0/1', 'index': '38', 'role': 'Inb', 'speed': '400000', 'asic_port_name': 'Rcy1-ASIC0', 'description': 'Recirc0/1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}}" + "{'Ethernet0': {'lanes': '72,73,74,75', 'alias': 'Ethernet1/1', 'index': '1', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth0-ASIC0', 'fec': 'rs', 'description': 'ARISTA01T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet8': {'lanes': '80,81,82,83', 'alias': 'Ethernet2/1', 'index': '2', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth8-ASIC0', 'fec': 'rs', 'description': 'ARISTA01T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet16': {'lanes': '88,89,90,91', 'alias': 'Ethernet3/1', 'index': '3', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth16-ASIC0', 'fec': 'rs', 'description': 'ARISTA03T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet24': {'lanes': '96,97,98,99,100,101,102,103', 'alias': 'Ethernet4/1', 'index': '4', 'role': 'Ext', 'speed': '400000', 'asic_port_name': 'Eth24-ASIC0', 'description': 'ARISTA03T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet32': {'lanes': '104,105,106,107,108,109,110,111', 'alias': 'Ethernet5/1', 'index': '5', 'role': 'Ext', 'speed': '400000', 'asic_port_name': 'Eth32-ASIC0', 'description': 'ARISTA05T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet40': {'lanes': '112,113,114,115,116,117,118,119', 'alias': 'Ethernet6/1', 'index': '6', 'role': 'Ext', 'speed': '400000', 'asic_port_name': 'Eth40-ASIC0', 'description': 'ARISTA05T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet48': {'lanes': '120,121,122,123,124,125,126,127', 'alias': 'Ethernet7/1', 'index': '7', 'role': 'Ext', 'speed': '400000', 'asic_port_name': 'Eth48-ASIC0', 'description': 'ARISTA07T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet56': {'lanes': '128,129,130,131', 'alias': 'Ethernet8/1', 'index': '8', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth56-ASIC0', 'fec': 'rs', 'description': 'ARISTA07T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet64': {'lanes': '136,137,138,139', 'alias': 'Ethernet9/1', 'index': '9', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth64-ASIC0', 'fec': 'rs', 'description': 'ARISTA09T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet72': {'lanes': '64,65,66,67', 'alias': 'Ethernet10/1', 'index': '10', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth72-ASIC0', 'fec': 'rs', 'description': 'ARISTA09T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet80': {'lanes': '56,57,58,59', 'alias': 'Ethernet11/1', 'index': '11', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth80-ASIC0', 'fec': 'rs', 'description': 'ARISTA11T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet88': {'lanes': '48,49,50,51', 'alias': 'Ethernet12/1', 'index': '12', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth88-ASIC0', 'fec': 'rs', 'description': 'ARISTA11T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet96': {'lanes': '40,41,42,43', 'alias': 'Ethernet13/1', 'index': '13', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth96-ASIC0', 'fec': 'rs', 'description': 'ARISTA13T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet104': {'lanes': '32,33,34,35', 'alias': 'Ethernet14/1', 'index': '14', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth104-ASIC0', 'fec': 'rs', 'description': 'ARISTA15T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet112': {'lanes': '24,25,26,27', 'alias': 'Ethernet15/1', 'index': '15', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth112-ASIC0', 'fec': 'rs', 'description': 'ARISTA15T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet120': {'lanes': '16,17,18,19', 'alias': 'Ethernet16/1', 'index': '16', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth120-ASIC0', 'fec': 'rs', 'description': 'ARISTA17T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet128': {'lanes': '8,9,10,11', 'alias': 'Ethernet17/1', 'index': '17', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth128-ASIC0', 'fec': 'rs', 'description': 'ARISTA18T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet136': {'lanes': '0,1,2,3', 'alias': 'Ethernet18/1', 'index': '18', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth136-ASIC0', 'fec': 'rs', 'description': 'ARISTA18T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, " + "'Ethernet-Rec0': {'lanes': '221', 'alias': 'Recirc0/0', 'index': '37', 'role': 'Rec', 'speed': '400000', 'asic_port_name': 'Rcy0-ASIC0', 'description': 'Recirc0/0', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}," + "'Ethernet-IB0': {'lanes': '222', 'alias': 'Recirc0/1', 'index': '38', 'role': 'Inb', 'speed': '400000', 'asic_port_name': 'Rcy1-ASIC0', 'description': 'Recirc0/1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}}" ) ) - def test_minigraph_cisco_400g_to_100G_speed(self): argument = ["-m", self.sample_cisco_100_graph, "-p", self.sample_cisco_port_config_400g, "-v", "PORT"] self.assertTrue(self.yang.validate(argument)) @@ -1117,19 +1114,16 @@ def test_minigraph_cisco_400g_to_100G_speed(self): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'lanes': '2304,2305,2306,2307', 'alias': 'etp0a', 'index': '0', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA01T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet4': {'lanes': '2308,2309,2310,2311', 'alias': 'etp0b', 'index': '0', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA02T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet8': {'lanes': '2320,2321,2322,2323', 'alias': 'etp1a', 'index': '1', 'speed': '100000', 'fec': 'rs', 'description': 'etp1a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet12': {'lanes': '2324,2325,2326,2327', 'alias': 'etp1b', 'index': '1', 'speed': '100000', 'fec': 'rs', 'description': 'etp1b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet16': {'lanes': '2312,2313,2314,2315', 'alias': 'etp2a', 'index': '2', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA03T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet20': {'lanes': '2316,2317,2318,2319', 'alias': 'etp2b', 'index': '2', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA04T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet24': {'lanes': '2056,2057,2058,2059', 'alias': 'etp3a', 'index': '3', 'speed': '100000', 'fec': 'rs', 'description': 'etp3a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet28': {'lanes': '2060,2061,2062,2063', 'alias': 'etp3b', 'index': '3', 'speed': '100000', 'fec': 'rs', 'description': 'etp3b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet32': {'lanes': '1792,1793,1794,1795', 'alias': 'etp4a', 'index': '4', 'speed': '100000', 'fec': 'rs', 'description': 'etp4a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet36': {'lanes': '1796,1797,1798,1799', 'alias': 'etp4b', 'index': '4', 'speed': '100000', 'fec': 'rs', 'description': 'etp4b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet40': {'lanes': '2048,2049,2050,2051', 'alias': 'etp5a', 'index': '5', 'speed': '100000', 'fec': 'rs', 'description': 'etp5a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet44': {'lanes': '2052,2053,2054,2055', 'alias': 'etp5b', 'index': '5', 'speed': '100000', 'fec': 'rs', 'description': 'etp5b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet48': {'lanes': '2560,2561,2562,2563', 'alias': 'etp6a', 'index': '6', 'speed': '100000', 'fec': 'rs', 'description': 'etp6a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet52': {'lanes': '2564,2565,2566,2567', 'alias': 'etp6b', 'index': '6', 'speed': '100000', 'fec': 'rs', 'description': 'etp6b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet56': {'lanes': '2824,2825,2826,2827', 'alias': 'etp7a', 'index': '7', 'speed': '100000', 'fec': 'rs', 'description': 'etp7a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet60': {'lanes': '2828,2829,2830,2831', 'alias': 'etp7b', 'index': '7', 'speed': '100000', 'fec': 'rs', 'description': 'etp7b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet64': {'lanes': '2832,2833,2834,2835', 'alias': 'etp8a', 'index': '8', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA05T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet68': {'lanes': '2836,2837,2838,2839', 'alias': 'etp8b', 'index': '8', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA06T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet72': {'lanes': '2816,2817,2818,2819', 'alias': 'etp9a', 'index': '9', 'speed': '100000', 'fec': 'rs', 'description': 'etp9a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet76': {'lanes': '2820,2821,2822,2823', 'alias': 'etp9b', 'index': '9', 'speed': '100000', 'fec': 'rs', 'description': 'etp9b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet80': {'lanes': '2568,2569,2570,2571', 'alias': 'etp10a', 'index': '10', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA07T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet84': {'lanes': '2572,2573,2574,2575', 'alias': 'etp10b', 'index': '10', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA08T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet88': {'lanes': '2576,2577,2578,2579', 'alias': 'etp11a', 'index': '11', 'speed': '100000', 'fec': 'rs', 'description': 'etp11a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet92': {'lanes': '2580,2581,2582,2583', 'alias': 'etp11b', 'index': '11', 'speed': '100000', 'fec': 'rs', 'description': 'etp11b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet96': {'lanes': '1536,1537,1538,1539', 'alias': 'etp12', 'index': '12', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA01T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet104': {'lanes': '1800,1801,1802,1803', 'alias': 'etp13', 'index': '13', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA01T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet112': {'lanes': '1552,1553,1554,1555', 'alias': 'etp14', 'index': '14', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA03T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet120': {'lanes': '1544,1545,1546,1547', 'alias': 'etp15', 'index': '15', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA03T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet128': {'lanes': '1296,1297,1298,1299', 'alias': 'etp16', 'index': '16', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA05T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet136': {'lanes': '1288,1289,1290,1291', 'alias': 'etp17', 'index': '17', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA05T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet144': {'lanes': '1280,1281,1282,1283', 'alias': 'etp18', 'index': '18', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA07T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet152': {'lanes': '1032,1033,1034,1035', 'alias': 'etp19', 'index': '19', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA07T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet160': {'lanes': '264,265,266,267', 'alias': 'etp20a', 'index': '20', 'speed': '100000', 'fec': 'rs', 'description': 'etp20a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet164': {'lanes': '268,269,270,271', 'alias': 'etp20b', 'index': '20', 'speed': '100000', 'fec': 'rs', 'description': 'etp20b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet168': {'lanes': '272,273,274,275', 'alias': 'etp21a', 'index': '21', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA09T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet172': {'lanes': '276,277,278,279', 'alias': 'etp21b', 'index': '21', 'speed': '100000', 'fec': 'rs', 'description': 'etp21b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet176': {'lanes': '16,17,18,19', 'alias': 'etp22a', 'index': '22', 'speed': '100000', 'fec': 'rs', 'description': 'etp22a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet180': {'lanes': '20,21,22,23', 'alias': 'etp22b', 'index': '22', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA10T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet184': {'lanes': '0,1,2,3', 'alias': 'etp23a', 'index': '23', 'speed': '100000', 'fec': 'rs', 'description': 'etp23a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet188': {'lanes': '4,5,6,7', 'alias': 'etp23b', 'index': '23', 'speed': '100000', 'fec': 'rs', 'description': 'etp23b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet192': {'lanes': '256,257,258,259', 'alias': 'etp24a', 'index': '24', 'speed': '100000', 'fec': 'rs', 'description': 'etp24a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet196': {'lanes': '260,261,262,263', 'alias': 'etp24b', 'index': '24', 'speed': '100000', 'fec': 'rs', 'description': 'etp24b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet200': {'lanes': '8,9,10,11', 'alias': 'etp25a', 'index': '25', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA11T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet204': {'lanes': '12,13,14,15', 'alias': 'etp25b', 'index': '25', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA12T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet208': {'lanes': '1024,1025,1026,1027', 'alias': 'etp26a', 'index': '26', 'speed': '100000', 'fec': 'rs', 'description': 'etp26a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet212': {'lanes': '1028,1029,1030,1031', 'alias': 'etp26b', 'index': '26', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA13T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet216': {'lanes': '768,769,770,771', 'alias': 'etp27a', 'index': '27', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA14T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet220': {'lanes': '772,773,774,775', 'alias': 'etp27b', 'index': '27', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA15T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet224': {'lanes': '524,525,526,527', 'alias': 'etp28a', 'index': '28', 'speed': '100000', 'fec': 'rs', 'description': 'etp28a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet228': {'lanes': '520,521,522,523', 'alias': 'etp28b', 'index': '28', 'speed': '100000', 'fec': 'rs', 'description': 'etp28b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet232': {'lanes': '776,777,778,779', 'alias': 'etp29a', 'index': '29', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA16T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet236': {'lanes': '780,781,782,783', 'alias': 'etp29b', 'index': '29', 'speed': '100000', 'fec': 'rs', 'description': 'etp29b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet240': {'lanes': '516,517,518,519', 'alias': 'etp30a', 'index': '30', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA17T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet244': {'lanes': '512,513,514,515', 'alias': 'etp30b', 'index': '30', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA18T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet248': {'lanes': '528,529,530,531', 'alias': 'etp31a', 'index': '31', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA19T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet252': {'lanes': '532,533,534,535', 'alias': 'etp31b', 'index': '31', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA20T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}}" + "{'Ethernet0': {'lanes': '2304,2305,2306,2307', 'alias': 'etp0a', 'index': '0', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA01T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet4': {'lanes': '2308,2309,2310,2311', 'alias': 'etp0b', 'index': '0', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA02T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet8': {'lanes': '2320,2321,2322,2323', 'alias': 'etp1a', 'index': '1', 'speed': '100000', 'fec': 'rs', 'description': 'etp1a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet12': {'lanes': '2324,2325,2326,2327', 'alias': 'etp1b', 'index': '1', 'speed': '100000', 'fec': 'rs', 'description': 'etp1b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet16': {'lanes': '2312,2313,2314,2315', 'alias': 'etp2a', 'index': '2', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA03T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet20': {'lanes': '2316,2317,2318,2319', 'alias': 'etp2b', 'index': '2', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA04T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet24': {'lanes': '2056,2057,2058,2059', 'alias': 'etp3a', 'index': '3', 'speed': '100000', 'fec': 'rs', 'description': 'etp3a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet28': {'lanes': '2060,2061,2062,2063', 'alias': 'etp3b', 'index': '3', 'speed': '100000', 'fec': 'rs', 'description': 'etp3b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet32': {'lanes': '1792,1793,1794,1795', 'alias': 'etp4a', 'index': '4', 'speed': '100000', 'fec': 'rs', 'description': 'etp4a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet36': {'lanes': '1796,1797,1798,1799', 'alias': 'etp4b', 'index': '4', 'speed': '100000', 'fec': 'rs', 'description': 'etp4b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet40': {'lanes': '2048,2049,2050,2051', 'alias': 'etp5a', 'index': '5', 'speed': '100000', 'fec': 'rs', 'description': 'etp5a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet44': {'lanes': '2052,2053,2054,2055', 'alias': 'etp5b', 'index': '5', 'speed': '100000', 'fec': 'rs', 'description': 'etp5b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet48': {'lanes': '2560,2561,2562,2563', 'alias': 'etp6a', 'index': '6', 'speed': '100000', 'fec': 'rs', 'description': 'etp6a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet52': {'lanes': '2564,2565,2566,2567', 'alias': 'etp6b', 'index': '6', 'speed': '100000', 'fec': 'rs', 'description': 'etp6b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet56': {'lanes': '2824,2825,2826,2827', 'alias': 'etp7a', 'index': '7', 'speed': '100000', 'fec': 'rs', 'description': 'etp7a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet60': {'lanes': '2828,2829,2830,2831', 'alias': 'etp7b', 'index': '7', 'speed': '100000', 'fec': 'rs', 'description': 'etp7b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet64': {'lanes': '2832,2833,2834,2835', 'alias': 'etp8a', 'index': '8', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA05T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet68': {'lanes': '2836,2837,2838,2839', 'alias': 'etp8b', 'index': '8', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA06T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet72': {'lanes': '2816,2817,2818,2819', 'alias': 'etp9a', 'index': '9', 'speed': '100000', 'fec': 'rs', 'description': 'etp9a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet76': {'lanes': '2820,2821,2822,2823', 'alias': 'etp9b', 'index': '9', 'speed': '100000', 'fec': 'rs', 'description': 'etp9b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet80': {'lanes': '2568,2569,2570,2571', 'alias': 'etp10a', 'index': '10', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA07T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet84': {'lanes': '2572,2573,2574,2575', 'alias': 'etp10b', 'index': '10', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA08T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet88': {'lanes': '2576,2577,2578,2579', 'alias': 'etp11a', 'index': '11', 'speed': '100000', 'fec': 'rs', 'description': 'etp11a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet92': {'lanes': '2580,2581,2582,2583', 'alias': 'etp11b', 'index': '11', 'speed': '100000', 'fec': 'rs', 'description': 'etp11b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet96': {'lanes': '1536,1537,1538,1539', 'alias': 'etp12', 'index': '12', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA01T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet104': {'lanes': '1800,1801,1802,1803', 'alias': 'etp13', 'index': '13', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA01T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet112': {'lanes': '1552,1553,1554,1555', 'alias': 'etp14', 'index': '14', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA03T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet120': {'lanes': '1544,1545,1546,1547', 'alias': 'etp15', 'index': '15', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA03T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet128': {'lanes': '1296,1297,1298,1299', 'alias': 'etp16', 'index': '16', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA05T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet136': {'lanes': '1288,1289,1290,1291', 'alias': 'etp17', 'index': '17', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA05T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet144': {'lanes': '1280,1281,1282,1283', 'alias': 'etp18', 'index': '18', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA07T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet152': {'lanes': '1032,1033,1034,1035', 'alias': 'etp19', 'index': '19', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA07T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet160': {'lanes': '264,265,266,267', 'alias': 'etp20a', 'index': '20', 'speed': '100000', 'fec': 'rs', 'description': 'etp20a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet164': {'lanes': '268,269,270,271', 'alias': 'etp20b', 'index': '20', 'speed': '100000', 'fec': 'rs', 'description': 'etp20b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet168': {'lanes': '272,273,274,275', 'alias': 'etp21a', 'index': '21', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA09T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet172': {'lanes': '276,277,278,279', 'alias': 'etp21b', 'index': '21', 'speed': '100000', 'fec': 'rs', 'description': 'etp21b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet176': {'lanes': '16,17,18,19', 'alias': 'etp22a', 'index': '22', 'speed': '100000', 'fec': 'rs', 'description': 'etp22a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet180': {'lanes': '20,21,22,23', 'alias': 'etp22b', 'index': '22', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA10T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet184': {'lanes': '0,1,2,3', 'alias': 'etp23a', 'index': '23', 'speed': '100000', 'fec': 'rs', 'description': 'etp23a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet188': {'lanes': '4,5,6,7', 'alias': 'etp23b', 'index': '23', 'speed': '100000', 'fec': 'rs', 'description': 'etp23b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet192': {'lanes': '256,257,258,259', 'alias': 'etp24a', 'index': '24', 'speed': '100000', 'fec': 'rs', 'description': 'etp24a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet196': {'lanes': '260,261,262,263', 'alias': 'etp24b', 'index': '24', 'speed': '100000', 'fec': 'rs', 'description': 'etp24b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet200': {'lanes': '8,9,10,11', 'alias': 'etp25a', 'index': '25', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA11T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet204': {'lanes': '12,13,14,15', 'alias': 'etp25b', 'index': '25', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA12T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet208': {'lanes': '1024,1025,1026,1027', 'alias': 'etp26a', 'index': '26', 'speed': '100000', 'fec': 'rs', 'description': 'etp26a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet212': {'lanes': '1028,1029,1030,1031', 'alias': 'etp26b', 'index': '26', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA13T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet216': {'lanes': '768,769,770,771', 'alias': 'etp27a', 'index': '27', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA14T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet220': {'lanes': '772,773,774,775', 'alias': 'etp27b', 'index': '27', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA15T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet224': {'lanes': '524,525,526,527', 'alias': 'etp28a', 'index': '28', 'speed': '100000', 'fec': 'rs', 'description': 'etp28a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet228': {'lanes': '520,521,522,523', 'alias': 'etp28b', 'index': '28', 'speed': '100000', 'fec': 'rs', 'description': 'etp28b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet232': {'lanes': '776,777,778,779', 'alias': 'etp29a', 'index': '29', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA16T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet236': {'lanes': '780,781,782,783', 'alias': 'etp29b', 'index': '29', 'speed': '100000', 'fec': 'rs', 'description': 'etp29b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet240': {'lanes': '516,517,518,519', 'alias': 'etp30a', 'index': '30', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA17T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet244': {'lanes': '512,513,514,515', 'alias': 'etp30b', 'index': '30', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA18T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet248': {'lanes': '528,529,530,531', 'alias': 'etp31a', 'index': '31', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA19T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet252': {'lanes': '532,533,534,535', 'alias': 'etp31b', 'index': '31', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA20T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}}" ) ) - - - def test_minigraph_cisco_400G_to_400G_speed(self): argument = ["-m", self.sample_cisco_400_graph, "-p", self.sample_cisco_port_config_400g, "-v", "PORT"] output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'lanes': '2304,2305,2306,2307', 'alias': 'etp0a', 'index': '0', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA01T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet4': {'lanes': '2308,2309,2310,2311', 'alias': 'etp0b', 'index': '0', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA02T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet8': {'lanes': '2320,2321,2322,2323', 'alias': 'etp1a', 'index': '1', 'speed': '100000', 'fec': 'rs', 'description': 'etp1a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet12': {'lanes': '2324,2325,2326,2327', 'alias': 'etp1b', 'index': '1', 'speed': '100000', 'fec': 'rs', 'description': 'etp1b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet16': {'lanes': '2312,2313,2314,2315', 'alias': 'etp2a', 'index': '2', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA03T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet20': {'lanes': '2316,2317,2318,2319', 'alias': 'etp2b', 'index': '2', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA04T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet24': {'lanes': '2056,2057,2058,2059', 'alias': 'etp3a', 'index': '3', 'speed': '100000', 'fec': 'rs', 'description': 'etp3a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet28': {'lanes': '2060,2061,2062,2063', 'alias': 'etp3b', 'index': '3', 'speed': '100000', 'fec': 'rs', 'description': 'etp3b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet32': {'lanes': '1792,1793,1794,1795', 'alias': 'etp4a', 'index': '4', 'speed': '100000', 'fec': 'rs', 'description': 'etp4a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet36': {'lanes': '1796,1797,1798,1799', 'alias': 'etp4b', 'index': '4', 'speed': '100000', 'fec': 'rs', 'description': 'etp4b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet40': {'lanes': '2048,2049,2050,2051', 'alias': 'etp5a', 'index': '5', 'speed': '100000', 'fec': 'rs', 'description': 'etp5a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet44': {'lanes': '2052,2053,2054,2055', 'alias': 'etp5b', 'index': '5', 'speed': '100000', 'fec': 'rs', 'description': 'etp5b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet48': {'lanes': '2560,2561,2562,2563', 'alias': 'etp6a', 'index': '6', 'speed': '100000', 'fec': 'rs', 'description': 'etp6a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet52': {'lanes': '2564,2565,2566,2567', 'alias': 'etp6b', 'index': '6', 'speed': '100000', 'fec': 'rs', 'description': 'etp6b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet56': {'lanes': '2824,2825,2826,2827', 'alias': 'etp7a', 'index': '7', 'speed': '100000', 'fec': 'rs', 'description': 'etp7a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet60': {'lanes': '2828,2829,2830,2831', 'alias': 'etp7b', 'index': '7', 'speed': '100000', 'fec': 'rs', 'description': 'etp7b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet64': {'lanes': '2832,2833,2834,2835', 'alias': 'etp8a', 'index': '8', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA05T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet68': {'lanes': '2836,2837,2838,2839', 'alias': 'etp8b', 'index': '8', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA06T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet72': {'lanes': '2816,2817,2818,2819', 'alias': 'etp9a', 'index': '9', 'speed': '100000', 'fec': 'rs', 'description': 'etp9a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet76': {'lanes': '2820,2821,2822,2823', 'alias': 'etp9b', 'index': '9', 'speed': '100000', 'fec': 'rs', 'description': 'etp9b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet80': {'lanes': '2568,2569,2570,2571', 'alias': 'etp10a', 'index': '10', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA07T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet84': {'lanes': '2572,2573,2574,2575', 'alias': 'etp10b', 'index': '10', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA08T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet88': {'lanes': '2576,2577,2578,2579', 'alias': 'etp11a', 'index': '11', 'speed': '100000', 'fec': 'rs', 'description': 'etp11a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet92': {'lanes': '2580,2581,2582,2583', 'alias': 'etp11b', 'index': '11', 'speed': '100000', 'fec': 'rs', 'description': 'etp11b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet96': {'lanes': '1536,1537,1538,1539,1540,1541,1542,1543', 'alias': 'etp12', 'index': '12', 'speed': '400000', 'description': 'ARISTA01T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet104': {'lanes': '1800,1801,1802,1803,1804,1805,1806,1807', 'alias': 'etp13', 'index': '13', 'speed': '400000', 'description': 'ARISTA01T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet112': {'lanes': '1552,1553,1554,1555,1556,1557,1558,1559', 'alias': 'etp14', 'index': '14', 'speed': '400000', 'description': 'ARISTA03T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet120': {'lanes': '1544,1545,1546,1547,1548,1549,1550,1551', 'alias': 'etp15', 'index': '15', 'speed': '400000', 'description': 'ARISTA03T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet128': {'lanes': '1296,1297,1298,1299,1300,1301,1302,1303', 'alias': 'etp16', 'index': '16', 'speed': '400000', 'description': 'ARISTA05T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet136': {'lanes': '1288,1289,1290,1291,1292,1293,1294,1295', 'alias': 'etp17', 'index': '17', 'speed': '400000', 'description': 'ARISTA05T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet144': {'lanes': '1280,1281,1282,1283,1284,1285,1286,1287', 'alias': 'etp18', 'index': '18', 'speed': '400000', 'description': 'ARISTA07T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet152': {'lanes': '1032,1033,1034,1035,1036,1037,1038,1039', 'alias': 'etp19', 'index': '19', 'speed': '400000', 'description': 'ARISTA07T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet160': {'lanes': '264,265,266,267', 'alias': 'etp20a', 'index': '20', 'speed': '100000', 'fec': 'rs', 'description': 'etp20a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet164': {'lanes': '268,269,270,271', 'alias': 'etp20b', 'index': '20', 'speed': '100000', 'fec': 'rs', 'description': 'etp20b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet168': {'lanes': '272,273,274,275', 'alias': 'etp21a', 'index': '21', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA09T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet172': {'lanes': '276,277,278,279', 'alias': 'etp21b', 'index': '21', 'speed': '100000', 'fec': 'rs', 'description': 'etp21b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet176': {'lanes': '16,17,18,19', 'alias': 'etp22a', 'index': '22', 'speed': '100000', 'fec': 'rs', 'description': 'etp22a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet180': {'lanes': '20,21,22,23', 'alias': 'etp22b', 'index': '22', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA10T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet184': {'lanes': '0,1,2,3', 'alias': 'etp23a', 'index': '23', 'speed': '100000', 'fec': 'rs', 'description': 'etp23a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet188': {'lanes': '4,5,6,7', 'alias': 'etp23b', 'index': '23', 'speed': '100000', 'fec': 'rs', 'description': 'etp23b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet192': {'lanes': '256,257,258,259', 'alias': 'etp24a', 'index': '24', 'speed': '100000', 'fec': 'rs', 'description': 'etp24a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet196': {'lanes': '260,261,262,263', 'alias': 'etp24b', 'index': '24', 'speed': '100000', 'fec': 'rs', 'description': 'etp24b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet200': {'lanes': '8,9,10,11', 'alias': 'etp25a', 'index': '25', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA11T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet204': {'lanes': '12,13,14,15', 'alias': 'etp25b', 'index': '25', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA12T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet208': {'lanes': '1024,1025,1026,1027', 'alias': 'etp26a', 'index': '26', 'speed': '100000', 'fec': 'rs', 'description': 'etp26a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet212': {'lanes': '1028,1029,1030,1031', 'alias': 'etp26b', 'index': '26', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA13T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet216': {'lanes': '768,769,770,771', 'alias': 'etp27a', 'index': '27', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA14T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet220': {'lanes': '772,773,774,775', 'alias': 'etp27b', 'index': '27', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA15T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet224': {'lanes': '524,525,526,527', 'alias': 'etp28a', 'index': '28', 'speed': '100000', 'fec': 'rs', 'description': 'etp28a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet228': {'lanes': '520,521,522,523', 'alias': 'etp28b', 'index': '28', 'speed': '100000', 'fec': 'rs', 'description': 'etp28b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet232': {'lanes': '776,777,778,779', 'alias': 'etp29a', 'index': '29', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA16T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet236': {'lanes': '780,781,782,783', 'alias': 'etp29b', 'index': '29', 'speed': '100000', 'fec': 'rs', 'description': 'etp29b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet240': {'lanes': '516,517,518,519', 'alias': 'etp30a', 'index': '30', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA17T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet244': {'lanes': '512,513,514,515', 'alias': 'etp30b', 'index': '30', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA18T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet248': {'lanes': '528,529,530,531', 'alias': 'etp31a', 'index': '31', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA19T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet252': {'lanes': '532,533,534,535', 'alias': 'etp31b', 'index': '31', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA20T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}}" + "{'Ethernet0': {'lanes': '2304,2305,2306,2307', 'alias': 'etp0a', 'index': '0', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA01T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet4': {'lanes': '2308,2309,2310,2311', 'alias': 'etp0b', 'index': '0', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA02T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet8': {'lanes': '2320,2321,2322,2323', 'alias': 'etp1a', 'index': '1', 'speed': '100000', 'fec': 'rs', 'description': 'etp1a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet12': {'lanes': '2324,2325,2326,2327', 'alias': 'etp1b', 'index': '1', 'speed': '100000', 'fec': 'rs', 'description': 'etp1b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet16': {'lanes': '2312,2313,2314,2315', 'alias': 'etp2a', 'index': '2', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA03T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet20': {'lanes': '2316,2317,2318,2319', 'alias': 'etp2b', 'index': '2', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA04T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet24': {'lanes': '2056,2057,2058,2059', 'alias': 'etp3a', 'index': '3', 'speed': '100000', 'fec': 'rs', 'description': 'etp3a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet28': {'lanes': '2060,2061,2062,2063', 'alias': 'etp3b', 'index': '3', 'speed': '100000', 'fec': 'rs', 'description': 'etp3b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet32': {'lanes': '1792,1793,1794,1795', 'alias': 'etp4a', 'index': '4', 'speed': '100000', 'fec': 'rs', 'description': 'etp4a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet36': {'lanes': '1796,1797,1798,1799', 'alias': 'etp4b', 'index': '4', 'speed': '100000', 'fec': 'rs', 'description': 'etp4b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet40': {'lanes': '2048,2049,2050,2051', 'alias': 'etp5a', 'index': '5', 'speed': '100000', 'fec': 'rs', 'description': 'etp5a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet44': {'lanes': '2052,2053,2054,2055', 'alias': 'etp5b', 'index': '5', 'speed': '100000', 'fec': 'rs', 'description': 'etp5b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet48': {'lanes': '2560,2561,2562,2563', 'alias': 'etp6a', 'index': '6', 'speed': '100000', 'fec': 'rs', 'description': 'etp6a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet52': {'lanes': '2564,2565,2566,2567', 'alias': 'etp6b', 'index': '6', 'speed': '100000', 'fec': 'rs', 'description': 'etp6b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet56': {'lanes': '2824,2825,2826,2827', 'alias': 'etp7a', 'index': '7', 'speed': '100000', 'fec': 'rs', 'description': 'etp7a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet60': {'lanes': '2828,2829,2830,2831', 'alias': 'etp7b', 'index': '7', 'speed': '100000', 'fec': 'rs', 'description': 'etp7b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet64': {'lanes': '2832,2833,2834,2835', 'alias': 'etp8a', 'index': '8', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA05T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet68': {'lanes': '2836,2837,2838,2839', 'alias': 'etp8b', 'index': '8', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA06T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet72': {'lanes': '2816,2817,2818,2819', 'alias': 'etp9a', 'index': '9', 'speed': '100000', 'fec': 'rs', 'description': 'etp9a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet76': {'lanes': '2820,2821,2822,2823', 'alias': 'etp9b', 'index': '9', 'speed': '100000', 'fec': 'rs', 'description': 'etp9b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet80': {'lanes': '2568,2569,2570,2571', 'alias': 'etp10a', 'index': '10', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA07T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet84': {'lanes': '2572,2573,2574,2575', 'alias': 'etp10b', 'index': '10', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA08T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet88': {'lanes': '2576,2577,2578,2579', 'alias': 'etp11a', 'index': '11', 'speed': '100000', 'fec': 'rs', 'description': 'etp11a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet92': {'lanes': '2580,2581,2582,2583', 'alias': 'etp11b', 'index': '11', 'speed': '100000', 'fec': 'rs', 'description': 'etp11b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet96': {'lanes': '1536,1537,1538,1539,1540,1541,1542,1543', 'alias': 'etp12', 'index': '12', 'speed': '400000', 'description': 'ARISTA01T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet104': {'lanes': '1800,1801,1802,1803,1804,1805,1806,1807', 'alias': 'etp13', 'index': '13', 'speed': '400000', 'description': 'ARISTA01T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet112': {'lanes': '1552,1553,1554,1555,1556,1557,1558,1559', 'alias': 'etp14', 'index': '14', 'speed': '400000', 'description': 'ARISTA03T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet120': {'lanes': '1544,1545,1546,1547,1548,1549,1550,1551', 'alias': 'etp15', 'index': '15', 'speed': '400000', 'description': 'ARISTA03T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet128': {'lanes': '1296,1297,1298,1299,1300,1301,1302,1303', 'alias': 'etp16', 'index': '16', 'speed': '400000', 'description': 'ARISTA05T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet136': {'lanes': '1288,1289,1290,1291,1292,1293,1294,1295', 'alias': 'etp17', 'index': '17', 'speed': '400000', 'description': 'ARISTA05T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet144': {'lanes': '1280,1281,1282,1283,1284,1285,1286,1287', 'alias': 'etp18', 'index': '18', 'speed': '400000', 'description': 'ARISTA07T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet152': {'lanes': '1032,1033,1034,1035,1036,1037,1038,1039', 'alias': 'etp19', 'index': '19', 'speed': '400000', 'description': 'ARISTA07T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet160': {'lanes': '264,265,266,267', 'alias': 'etp20a', 'index': '20', 'speed': '100000', 'fec': 'rs', 'description': 'etp20a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet164': {'lanes': '268,269,270,271', 'alias': 'etp20b', 'index': '20', 'speed': '100000', 'fec': 'rs', 'description': 'etp20b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet168': {'lanes': '272,273,274,275', 'alias': 'etp21a', 'index': '21', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA09T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet172': {'lanes': '276,277,278,279', 'alias': 'etp21b', 'index': '21', 'speed': '100000', 'fec': 'rs', 'description': 'etp21b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet176': {'lanes': '16,17,18,19', 'alias': 'etp22a', 'index': '22', 'speed': '100000', 'fec': 'rs', 'description': 'etp22a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet180': {'lanes': '20,21,22,23', 'alias': 'etp22b', 'index': '22', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA10T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet184': {'lanes': '0,1,2,3', 'alias': 'etp23a', 'index': '23', 'speed': '100000', 'fec': 'rs', 'description': 'etp23a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet188': {'lanes': '4,5,6,7', 'alias': 'etp23b', 'index': '23', 'speed': '100000', 'fec': 'rs', 'description': 'etp23b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet192': {'lanes': '256,257,258,259', 'alias': 'etp24a', 'index': '24', 'speed': '100000', 'fec': 'rs', 'description': 'etp24a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet196': {'lanes': '260,261,262,263', 'alias': 'etp24b', 'index': '24', 'speed': '100000', 'fec': 'rs', 'description': 'etp24b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet200': {'lanes': '8,9,10,11', 'alias': 'etp25a', 'index': '25', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA11T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet204': {'lanes': '12,13,14,15', 'alias': 'etp25b', 'index': '25', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA12T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet208': {'lanes': '1024,1025,1026,1027', 'alias': 'etp26a', 'index': '26', 'speed': '100000', 'fec': 'rs', 'description': 'etp26a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet212': {'lanes': '1028,1029,1030,1031', 'alias': 'etp26b', 'index': '26', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA13T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet216': {'lanes': '768,769,770,771', 'alias': 'etp27a', 'index': '27', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA14T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet220': {'lanes': '772,773,774,775', 'alias': 'etp27b', 'index': '27', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA15T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet224': {'lanes': '524,525,526,527', 'alias': 'etp28a', 'index': '28', 'speed': '100000', 'fec': 'rs', 'description': 'etp28a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet228': {'lanes': '520,521,522,523', 'alias': 'etp28b', 'index': '28', 'speed': '100000', 'fec': 'rs', 'description': 'etp28b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet232': {'lanes': '776,777,778,779', 'alias': 'etp29a', 'index': '29', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA16T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet236': {'lanes': '780,781,782,783', 'alias': 'etp29b', 'index': '29', 'speed': '100000', 'fec': 'rs', 'description': 'etp29b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet240': {'lanes': '516,517,518,519', 'alias': 'etp30a', 'index': '30', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA17T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet244': {'lanes': '512,513,514,515', 'alias': 'etp30b', 'index': '30', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA18T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet248': {'lanes': '528,529,530,531', 'alias': 'etp31a', 'index': '31', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA19T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet252': {'lanes': '532,533,534,535', 'alias': 'etp31b', 'index': '31', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA20T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}}" ) ) @@ -1141,7 +1135,7 @@ def test_minigraph_cisco_400g_to_100G_speed_no_lane_change(self): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'lanes': '2304,2305,2306,2307', 'alias': 'etp0a', 'index': '0', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA01T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet4': {'lanes': '2308,2309,2310,2311', 'alias': 'etp0b', 'index': '0', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA02T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet8': {'lanes': '2320,2321,2322,2323', 'alias': 'etp1a', 'index': '1', 'speed': '100000', 'fec': 'rs', 'description': 'etp1a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet12': {'lanes': '2324,2325,2326,2327', 'alias': 'etp1b', 'index': '1', 'speed': '100000', 'fec': 'rs', 'description': 'etp1b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet16': {'lanes': '2312,2313,2314,2315', 'alias': 'etp2a', 'index': '2', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA03T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet20': {'lanes': '2316,2317,2318,2319', 'alias': 'etp2b', 'index': '2', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA04T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet24': {'lanes': '2056,2057,2058,2059', 'alias': 'etp3a', 'index': '3', 'speed': '100000', 'fec': 'rs', 'description': 'etp3a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet28': {'lanes': '2060,2061,2062,2063', 'alias': 'etp3b', 'index': '3', 'speed': '100000', 'fec': 'rs', 'description': 'etp3b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet32': {'lanes': '1792,1793,1794,1795', 'alias': 'etp4a', 'index': '4', 'speed': '100000', 'fec': 'rs', 'description': 'etp4a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet36': {'lanes': '1796,1797,1798,1799', 'alias': 'etp4b', 'index': '4', 'speed': '100000', 'fec': 'rs', 'description': 'etp4b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet40': {'lanes': '2048,2049,2050,2051', 'alias': 'etp5a', 'index': '5', 'speed': '100000', 'fec': 'rs', 'description': 'etp5a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet44': {'lanes': '2052,2053,2054,2055', 'alias': 'etp5b', 'index': '5', 'speed': '100000', 'fec': 'rs', 'description': 'etp5b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet48': {'lanes': '2560,2561,2562,2563', 'alias': 'etp6a', 'index': '6', 'speed': '100000', 'fec': 'rs', 'description': 'etp6a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet52': {'lanes': '2564,2565,2566,2567', 'alias': 'etp6b', 'index': '6', 'speed': '100000', 'fec': 'rs', 'description': 'etp6b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet56': {'lanes': '2824,2825,2826,2827', 'alias': 'etp7a', 'index': '7', 'speed': '100000', 'fec': 'rs', 'description': 'etp7a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet60': {'lanes': '2828,2829,2830,2831', 'alias': 'etp7b', 'index': '7', 'speed': '100000', 'fec': 'rs', 'description': 'etp7b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet64': {'lanes': '2832,2833,2834,2835', 'alias': 'etp8a', 'index': '8', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA05T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet68': {'lanes': '2836,2837,2838,2839', 'alias': 'etp8b', 'index': '8', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA06T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet72': {'lanes': '2816,2817,2818,2819', 'alias': 'etp9a', 'index': '9', 'speed': '100000', 'fec': 'rs', 'description': 'etp9a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet76': {'lanes': '2820,2821,2822,2823', 'alias': 'etp9b', 'index': '9', 'speed': '100000', 'fec': 'rs', 'description': 'etp9b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet80': {'lanes': '2568,2569,2570,2571', 'alias': 'etp10a', 'index': '10', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA07T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet84': {'lanes': '2572,2573,2574,2575', 'alias': 'etp10b', 'index': '10', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA08T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet88': {'lanes': '2576,2577,2578,2579', 'alias': 'etp11a', 'index': '11', 'speed': '100000', 'fec': 'rs', 'description': 'etp11a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet92': {'lanes': '2580,2581,2582,2583', 'alias': 'etp11b', 'index': '11', 'speed': '100000', 'fec': 'rs', 'description': 'etp11b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet96': {'lanes': '1536,1537,1538,1539', 'alias': 'etp12', 'index': '12', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA01T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet104': {'lanes': '1800,1801,1802,1803', 'alias': 'etp13', 'index': '13', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA01T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet112': {'lanes': '1552,1553,1554,1555', 'alias': 'etp14', 'index': '14', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA03T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet120': {'lanes': '1544,1545,1546,1547', 'alias': 'etp15', 'index': '15', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA03T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet128': {'lanes': '1296,1297,1298,1299', 'alias': 'etp16', 'index': '16', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA05T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet136': {'lanes': '1288,1289,1290,1291', 'alias': 'etp17', 'index': '17', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA05T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet144': {'lanes': '1280,1281,1282,1283', 'alias': 'etp18', 'index': '18', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA07T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet152': {'lanes': '1032,1033,1034,1035', 'alias': 'etp19', 'index': '19', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA07T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet160': {'lanes': '264,265,266,267', 'alias': 'etp20a', 'index': '20', 'speed': '100000', 'fec': 'rs', 'description': 'etp20a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet164': {'lanes': '268,269,270,271', 'alias': 'etp20b', 'index': '20', 'speed': '100000', 'fec': 'rs', 'description': 'etp20b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet168': {'lanes': '272,273,274,275', 'alias': 'etp21a', 'index': '21', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA09T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet172': {'lanes': '276,277,278,279', 'alias': 'etp21b', 'index': '21', 'speed': '100000', 'fec': 'rs', 'description': 'etp21b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet176': {'lanes': '16,17,18,19', 'alias': 'etp22a', 'index': '22', 'speed': '100000', 'fec': 'rs', 'description': 'etp22a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet180': {'lanes': '20,21,22,23', 'alias': 'etp22b', 'index': '22', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA10T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet184': {'lanes': '0,1,2,3', 'alias': 'etp23a', 'index': '23', 'speed': '100000', 'fec': 'rs', 'description': 'etp23a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet188': {'lanes': '4,5,6,7', 'alias': 'etp23b', 'index': '23', 'speed': '100000', 'fec': 'rs', 'description': 'etp23b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet192': {'lanes': '256,257,258,259', 'alias': 'etp24a', 'index': '24', 'speed': '100000', 'fec': 'rs', 'description': 'etp24a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet196': {'lanes': '260,261,262,263', 'alias': 'etp24b', 'index': '24', 'speed': '100000', 'fec': 'rs', 'description': 'etp24b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet200': {'lanes': '8,9,10,11', 'alias': 'etp25a', 'index': '25', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA11T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet204': {'lanes': '12,13,14,15', 'alias': 'etp25b', 'index': '25', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA12T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet208': {'lanes': '1024,1025,1026,1027', 'alias': 'etp26a', 'index': '26', 'speed': '100000', 'fec': 'rs', 'description': 'etp26a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet212': {'lanes': '1028,1029,1030,1031', 'alias': 'etp26b', 'index': '26', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA13T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet216': {'lanes': '768,769,770,771', 'alias': 'etp27a', 'index': '27', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA14T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet220': {'lanes': '772,773,774,775', 'alias': 'etp27b', 'index': '27', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA15T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet224': {'lanes': '524,525,526,527', 'alias': 'etp28a', 'index': '28', 'speed': '100000', 'fec': 'rs', 'description': 'etp28a', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet228': {'lanes': '520,521,522,523', 'alias': 'etp28b', 'index': '28', 'speed': '100000', 'fec': 'rs', 'description': 'etp28b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet232': {'lanes': '776,777,778,779', 'alias': 'etp29a', 'index': '29', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA16T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet236': {'lanes': '780,781,782,783', 'alias': 'etp29b', 'index': '29', 'speed': '100000', 'fec': 'rs', 'description': 'etp29b', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}, 'Ethernet240': {'lanes': '516,517,518,519', 'alias': 'etp30a', 'index': '30', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA17T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet244': {'lanes': '512,513,514,515', 'alias': 'etp30b', 'index': '30', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA18T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet248': {'lanes': '528,529,530,531', 'alias': 'etp31a', 'index': '31', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA19T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet252': {'lanes': '532,533,534,535', 'alias': 'etp31b', 'index': '31', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA20T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', 'admin_status': 'up'}}" + "{'Ethernet0': {'lanes': '2304,2305,2306,2307', 'alias': 'etp0a', 'index': '0', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA01T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet4': {'lanes': '2308,2309,2310,2311', 'alias': 'etp0b', 'index': '0', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA02T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet8': {'lanes': '2320,2321,2322,2323', 'alias': 'etp1a', 'index': '1', 'speed': '100000', 'fec': 'rs', 'description': 'etp1a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet12': {'lanes': '2324,2325,2326,2327', 'alias': 'etp1b', 'index': '1', 'speed': '100000', 'fec': 'rs', 'description': 'etp1b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet16': {'lanes': '2312,2313,2314,2315', 'alias': 'etp2a', 'index': '2', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA03T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet20': {'lanes': '2316,2317,2318,2319', 'alias': 'etp2b', 'index': '2', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA04T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet24': {'lanes': '2056,2057,2058,2059', 'alias': 'etp3a', 'index': '3', 'speed': '100000', 'fec': 'rs', 'description': 'etp3a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet28': {'lanes': '2060,2061,2062,2063', 'alias': 'etp3b', 'index': '3', 'speed': '100000', 'fec': 'rs', 'description': 'etp3b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet32': {'lanes': '1792,1793,1794,1795', 'alias': 'etp4a', 'index': '4', 'speed': '100000', 'fec': 'rs', 'description': 'etp4a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet36': {'lanes': '1796,1797,1798,1799', 'alias': 'etp4b', 'index': '4', 'speed': '100000', 'fec': 'rs', 'description': 'etp4b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet40': {'lanes': '2048,2049,2050,2051', 'alias': 'etp5a', 'index': '5', 'speed': '100000', 'fec': 'rs', 'description': 'etp5a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet44': {'lanes': '2052,2053,2054,2055', 'alias': 'etp5b', 'index': '5', 'speed': '100000', 'fec': 'rs', 'description': 'etp5b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet48': {'lanes': '2560,2561,2562,2563', 'alias': 'etp6a', 'index': '6', 'speed': '100000', 'fec': 'rs', 'description': 'etp6a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet52': {'lanes': '2564,2565,2566,2567', 'alias': 'etp6b', 'index': '6', 'speed': '100000', 'fec': 'rs', 'description': 'etp6b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet56': {'lanes': '2824,2825,2826,2827', 'alias': 'etp7a', 'index': '7', 'speed': '100000', 'fec': 'rs', 'description': 'etp7a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet60': {'lanes': '2828,2829,2830,2831', 'alias': 'etp7b', 'index': '7', 'speed': '100000', 'fec': 'rs', 'description': 'etp7b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet64': {'lanes': '2832,2833,2834,2835', 'alias': 'etp8a', 'index': '8', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA05T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet68': {'lanes': '2836,2837,2838,2839', 'alias': 'etp8b', 'index': '8', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA06T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet72': {'lanes': '2816,2817,2818,2819', 'alias': 'etp9a', 'index': '9', 'speed': '100000', 'fec': 'rs', 'description': 'etp9a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet76': {'lanes': '2820,2821,2822,2823', 'alias': 'etp9b', 'index': '9', 'speed': '100000', 'fec': 'rs', 'description': 'etp9b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet80': {'lanes': '2568,2569,2570,2571', 'alias': 'etp10a', 'index': '10', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA07T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet84': {'lanes': '2572,2573,2574,2575', 'alias': 'etp10b', 'index': '10', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA08T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet88': {'lanes': '2576,2577,2578,2579', 'alias': 'etp11a', 'index': '11', 'speed': '100000', 'fec': 'rs', 'description': 'etp11a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet92': {'lanes': '2580,2581,2582,2583', 'alias': 'etp11b', 'index': '11', 'speed': '100000', 'fec': 'rs', 'description': 'etp11b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet96': {'lanes': '1536,1537,1538,1539', 'alias': 'etp12', 'index': '12', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA01T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet104': {'lanes': '1800,1801,1802,1803', 'alias': 'etp13', 'index': '13', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA01T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet112': {'lanes': '1552,1553,1554,1555', 'alias': 'etp14', 'index': '14', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA03T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet120': {'lanes': '1544,1545,1546,1547', 'alias': 'etp15', 'index': '15', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA03T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet128': {'lanes': '1296,1297,1298,1299', 'alias': 'etp16', 'index': '16', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA05T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet136': {'lanes': '1288,1289,1290,1291', 'alias': 'etp17', 'index': '17', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA05T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet144': {'lanes': '1280,1281,1282,1283', 'alias': 'etp18', 'index': '18', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA07T2:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet152': {'lanes': '1032,1033,1034,1035', 'alias': 'etp19', 'index': '19', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA07T2:Ethernet2', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet160': {'lanes': '264,265,266,267', 'alias': 'etp20a', 'index': '20', 'speed': '100000', 'fec': 'rs', 'description': 'etp20a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet164': {'lanes': '268,269,270,271', 'alias': 'etp20b', 'index': '20', 'speed': '100000', 'fec': 'rs', 'description': 'etp20b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet168': {'lanes': '272,273,274,275', 'alias': 'etp21a', 'index': '21', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA09T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet172': {'lanes': '276,277,278,279', 'alias': 'etp21b', 'index': '21', 'speed': '100000', 'fec': 'rs', 'description': 'etp21b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet176': {'lanes': '16,17,18,19', 'alias': 'etp22a', 'index': '22', 'speed': '100000', 'fec': 'rs', 'description': 'etp22a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet180': {'lanes': '20,21,22,23', 'alias': 'etp22b', 'index': '22', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA10T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet184': {'lanes': '0,1,2,3', 'alias': 'etp23a', 'index': '23', 'speed': '100000', 'fec': 'rs', 'description': 'etp23a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet188': {'lanes': '4,5,6,7', 'alias': 'etp23b', 'index': '23', 'speed': '100000', 'fec': 'rs', 'description': 'etp23b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet192': {'lanes': '256,257,258,259', 'alias': 'etp24a', 'index': '24', 'speed': '100000', 'fec': 'rs', 'description': 'etp24a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet196': {'lanes': '260,261,262,263', 'alias': 'etp24b', 'index': '24', 'speed': '100000', 'fec': 'rs', 'description': 'etp24b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet200': {'lanes': '8,9,10,11', 'alias': 'etp25a', 'index': '25', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA11T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet204': {'lanes': '12,13,14,15', 'alias': 'etp25b', 'index': '25', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA12T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet208': {'lanes': '1024,1025,1026,1027', 'alias': 'etp26a', 'index': '26', 'speed': '100000', 'fec': 'rs', 'description': 'etp26a', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet212': {'lanes': '1028,1029,1030,1031', 'alias': 'etp26b', 'index': '26', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA13T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet216': {'lanes': '768,769,770,771', 'alias': 'etp27a', 'index': '27', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA14T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet220': {'lanes': '772,773,774,775', 'alias': 'etp27b', 'index': '27', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA15T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet224': {'lanes': '524,525,526,527', 'alias': 'etp28a', 'index': '28', 'speed': '100000', 'fec': 'rs', 'description': 'etp28a', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet228': {'lanes': '520,521,522,523', 'alias': 'etp28b', 'index': '28', 'speed': '100000', 'fec': 'rs', 'description': 'etp28b', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off'}, 'Ethernet232': {'lanes': '776,777,778,779', 'alias': 'etp29a', 'index': '29', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA16T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet236': {'lanes': '780,781,782,783', 'alias': 'etp29b', 'index': '29', 'speed': '100000', 'fec': 'rs', 'description': 'etp29b', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off'}, 'Ethernet240': {'lanes': '516,517,518,519', 'alias': 'etp30a', 'index': '30', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA17T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet244': {'lanes': '512,513,514,515', 'alias': 'etp30b', 'index': '30', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA18T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet248': {'lanes': '528,529,530,531', 'alias': 'etp31a', 'index': '31', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA19T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, 'Ethernet252': {'lanes': '532,533,534,535', 'alias': 'etp31b', 'index': '31', 'speed': '100000', 'fec': 'rs', 'description': 'ARISTA20T0:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}}" ) ) @@ -1150,4 +1144,4 @@ def testsnmp_agent_address_config(self): output = self.run_script(argument) self.assertEqual( utils.liststr_to_dict(output.strip()), - utils.liststr_to_dict("['192.168.200.15|161|', '100.0.0.6|161|', '100.0.0.7|161|']")) + utils.liststr_to_dict("['192.168.200.15|161|', '100.0.0.6|161|', '100.0.0.7|161|']")) \ No newline at end of file diff --git a/src/sonic-config-engine/tests/test_cfggen_platformJson.py b/src/sonic-config-engine/tests/test_cfggen_platformJson.py index 5d39fd2f3660..8626341e039e 100644 --- a/src/sonic-config-engine/tests/test_cfggen_platformJson.py +++ b/src/sonic-config-engine/tests/test_cfggen_platformJson.py @@ -79,19 +79,19 @@ def test_platform_json_specific_ethernet_interfaces(self): argument = ['-m', self.platform_sample_graph, '-p', self.platform_json, '-S', self.hwsku_json, '-v', "PORT[\'Ethernet8\']"] output = self.run_script(argument) self.maxDiff = None - expected = "{'index': '3', 'lanes': '8', 'description': 'Eth3/1', 'mtu': '9100', 'alias': 'Eth3/1', 'pfc_asym': 'off', 'speed': '25000', 'tpid': '0x8100'}" + expected = "{'index': '3', 'lanes': '8', 'description': 'Eth3/1', 'mtu': '9100', 'alias': 'Eth3/1', 'pfc_asym': 'off', 'speed': '25000', 'tpid': '0x8100','mode': 'routed'}" self.assertEqual(utils.to_dict(output.strip()), utils.to_dict(expected)) argument = ['-m', self.platform_sample_graph, '-p', self.platform_json, '-S', self.hwsku_json, '-v', "PORT[\'Ethernet112\']"] output = self.run_script(argument) self.maxDiff = None - expected = "{'index': '29', 'lanes': '112', 'description': 'Eth29/1', 'mtu': '9100', 'alias': 'Eth29/1', 'pfc_asym': 'off', 'speed': '25000', 'tpid': '0x8100'}" + expected = "{'index': '29', 'lanes': '112', 'description': 'Eth29/1', 'mtu': '9100', 'alias': 'Eth29/1', 'pfc_asym': 'off', 'speed': '25000', 'tpid': '0x8100','mode': 'routed'}" self.assertEqual(utils.to_dict(output.strip()), utils.to_dict(expected)) argument = ['-m', self.platform_sample_graph, '-p', self.platform_json, '-S', self.hwsku_json, '-v', "PORT[\'Ethernet4\']"] output = self.run_script(argument) self.maxDiff = None - expected = "{'index': '2', 'lanes': '4,5', 'description': 'Eth2/1', 'admin_status': 'up', 'mtu': '9100', 'alias': 'Eth2/1', 'pfc_asym': 'off', 'speed': '50000', 'tpid': '0x8100'}" + expected = "{'index': '2', 'lanes': '4,5', 'description': 'Eth2/1', 'admin_status': 'up', 'mtu': '9100', 'alias': 'Eth2/1', 'pfc_asym': 'off', 'speed': '50000', 'tpid': '0x8100','mode': 'routed'}" print(output.strip()) self.assertEqual(utils.to_dict(output.strip()), utils.to_dict(expected)) @@ -115,4 +115,4 @@ def test_platform_json_all_ethernet_interfaces(self): def test_platform_json_no_interfaces(self): (ports, _, _) = get_port_config(port_config_file=self.platform_json) self.assertNotEqual(ports, None) - self.assertEqual(ports, {}) + self.assertEqual(ports, {}) \ No newline at end of file diff --git a/src/sonic-config-engine/tests/test_minigraph_case.py b/src/sonic-config-engine/tests/test_minigraph_case.py index 8bad0f5f3560..563cba1aa52d 100644 --- a/src/sonic-config-engine/tests/test_minigraph_case.py +++ b/src/sonic-config-engine/tests/test_minigraph_case.py @@ -164,7 +164,7 @@ def test_minigraph_portchannels(self): output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'PortChannel01': {'admin_status': 'up', 'min_links': '1', 'mtu': '9100', 'tpid': '0x8100', 'lacp_key': 'auto'}}") + utils.to_dict("{'PortChannel01': {'admin_status': 'up', 'min_links': '1', 'mtu': '9100', 'tpid': '0x8100', 'lacp_key': 'auto','mode': 'routed'}}") ) def test_minigraph_console_mgmt_feature(self): @@ -528,7 +528,7 @@ def test_minigraph_acl_type_bmcdata(self): } # TC1: Minigraph contains acl table type BmcData sample_mx_graph = os.path.join(self.test_dir,'simple-sample-graph-mx.xml') - result = minigraph.parse_xml(sample_mx_graph, port_config_file=self.port_config) + result = minigraph.parse_xml(sample_mx_graph) self.assertIn('ACL_TABLE_TYPE', result) self.assertIn('BMCDATA', result['ACL_TABLE_TYPE']) self.assertIn('BMCDATAV6', result['ACL_TABLE_TYPE']) @@ -537,7 +537,7 @@ def test_minigraph_acl_type_bmcdata(self): self.assertDictEqual(result['ACL_TABLE']['BMC_ACL_NORTHBOUND'], expected_acl_table_bmc_acl_northbound) self.assertDictEqual(result['ACL_TABLE']['BMC_ACL_NORTHBOUND_V6'], expected_acl_table_bmc_acl_northbound_v6) # TC2: Minigraph doesn't contain acl table type BmcData - result = minigraph.parse_xml(self.sample_graph, port_config_file=self.port_config) + result = minigraph.parse_xml(self.sample_graph) self.assertNotIn('ACL_TABLE_TYPE', result) def test_parse_device_desc_xml_mgmt_interface(self): @@ -564,7 +564,7 @@ def test_mgmt_device_disable_counters(self): mgmt_graphs = ['simple-sample-graph-mx.xml', 'simple-sample-graph-m0.xml'] for graph in mgmt_graphs: graph_path = os.path.join(self.test_dir, graph) - result = minigraph.parse_xml(graph_path, port_config_file=self.port_config) + result = minigraph.parse_xml(graph_path) self.assertIn('FLEX_COUNTER_TABLE', result) for counter in expected_mgmt_disabled_counters: self.assertIn(counter, result['FLEX_COUNTER_TABLE']) @@ -573,5 +573,5 @@ def test_mgmt_device_disable_counters(self): if counter in result['FLEX_COUNTER_TABLE']: self.assertDictEqual(result['FLEX_COUNTER_TABLE'][counter], {'FLEX_COUNTER_STATUS': 'enable'}) # TC2: For other minigraph, result should not contain FLEX_COUNTER_TABLE - result = minigraph.parse_xml(self.sample_graph, port_config_file=self.port_config) - self.assertNotIn('FLEX_COUNTER_TABLE', result) + result = minigraph.parse_xml(self.sample_graph) + self.assertNotIn('FLEX_COUNTER_TABLE', result) \ No newline at end of file diff --git a/src/sonic-config-engine/tests/test_multinpu_cfggen.py b/src/sonic-config-engine/tests/test_multinpu_cfggen.py index bc4227f85d52..9606baaf3429 100644 --- a/src/sonic-config-engine/tests/test_multinpu_cfggen.py +++ b/src/sonic-config-engine/tests/test_multinpu_cfggen.py @@ -163,16 +163,16 @@ def test_frontend_asic_portchannels(self): argument = ["-m", self.sample_graph, "-p", self.port_config[0], "-n", "asic0", "--var-json", "PORTCHANNEL"] output = json.loads(self.run_script(argument)) self.assertDictEqual(output, \ - {'PortChannel0002': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'lacp_key': 'auto'}, - 'PortChannel4001': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'lacp_key': 'auto'}, - 'PortChannel4002': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'lacp_key': 'auto'}}) + {'PortChannel0002': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'lacp_key': 'auto'}, + 'PortChannel4001': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'lacp_key': 'auto'}, + 'PortChannel4002': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'lacp_key': 'auto'}}) def test_backend_asic_portchannels(self): argument = ["-m", self.sample_graph, "-p", self.port_config[3], "-n", "asic3", "--var-json", "PORTCHANNEL"] output = json.loads(self.run_script(argument)) self.assertDictEqual(output, \ - {'PortChannel4013': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'lacp_key': 'auto'}, - 'PortChannel4014': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'lacp_key': 'auto'}}) + {'PortChannel4013': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed' , 'lacp_key': 'auto'}, + 'PortChannel4014': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed' , 'lacp_key': 'auto'}}) def test_frontend_asic_portchannel_mem(self): argument = ["-m", self.sample_graph, "-p", self.port_config[0], "-n", "asic0", "-v", "PORTCHANNEL_MEMBER.keys()|list"] @@ -218,27 +218,27 @@ def test_frontend_asic_ports(self): argument = ["-m", self.sample_graph, "-p", self.port_config[0], "-n", "asic0", "--var-json", "PORT"] output = json.loads(self.run_script(argument)) self.assertDictEqual(output, - {"Ethernet0": { "admin_status": "up", "alias": "Ethernet1/1", "asic_port_name": "Eth0-ASIC0", "description": "01T2:Ethernet1", "index": "0", "lanes": "33,34,35,36", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on" }, - "Ethernet4": { "admin_status": "up", "alias": "Ethernet1/2", "asic_port_name": "Eth1-ASIC0", "description": "01T2:Ethernet2", "index": "1", "lanes": "29,30,31,32", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on" }, - "Ethernet8": { "alias": "Ethernet1/3", "asic_port_name": "Eth2-ASIC0", "description": "Ethernet1/3", "index": "2", "lanes": "41,42,43,44", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000" }, - "Ethernet12": { "alias": "Ethernet1/4", "asic_port_name": "Eth3-ASIC0", "description": "Ethernet1/4", "index": "3", "lanes": "37,38,39,40", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000" }, - "Ethernet-BP0": { "admin_status": "up", "alias": "Eth4-ASIC0", "asic_port_name": "Eth4-ASIC0", "description": "ASIC2:Eth0-ASIC2", "index": "0", "lanes": "13,14,15,16", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }, - "Ethernet-BP4": { "admin_status": "up", "alias": "Eth5-ASIC0", "asic_port_name": "Eth5-ASIC0", "description": "ASIC2:Eth1-ASIC2", "index": "1", "lanes": "17,18,19,20", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }, - "Ethernet-BP8": { "admin_status": "up", "alias": "Eth6-ASIC0", "asic_port_name": "Eth6-ASIC0", "description": "ASIC3:Eth0-ASIC3", "index": "2", "lanes": "21,22,23,24", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }, - "Ethernet-BP12": { "admin_status": "up", "alias": "Eth7-ASIC0", "asic_port_name": "Eth7-ASIC0", "description": "ASIC3:Eth1-ASIC3", "index": "3", "lanes": "25,26,27,28", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }}) + {"Ethernet0": { "admin_status": "up", "alias": "Ethernet1/1", "asic_port_name": "Eth0-ASIC0", "description": "01T2:Ethernet1", "index": "0", "lanes": "33,34,35,36", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on", "mode": "routed"}, + "Ethernet4": { "admin_status": "up", "alias": "Ethernet1/2", "asic_port_name": "Eth1-ASIC0", "description": "01T2:Ethernet2", "index": "1", "lanes": "29,30,31,32", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on" , "mode": "routed"}, + "Ethernet8": { "alias": "Ethernet1/3", "asic_port_name": "Eth2-ASIC0", "description": "Ethernet1/3", "index": "2", "lanes": "41,42,43,44", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "mode": "routed"}, + "Ethernet12": { "alias": "Ethernet1/4", "asic_port_name": "Eth3-ASIC0", "description": "Ethernet1/4", "index": "3", "lanes": "37,38,39,40", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "mode": "routed"}, + "Ethernet-BP0": { "admin_status": "up", "alias": "Eth4-ASIC0", "asic_port_name": "Eth4-ASIC0", "description": "ASIC2:Eth0-ASIC2", "index": "0", "lanes": "13,14,15,16", "mtu": "9100", "tpid": "0x8100","pfc_asym": "off", "role": "Int", "speed": "40000", "mode": "routed"}, + "Ethernet-BP4": { "admin_status": "up", "alias": "Eth5-ASIC0", "asic_port_name": "Eth5-ASIC0", "description": "ASIC2:Eth1-ASIC2", "index": "1", "lanes": "17,18,19,20", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000", "mode": "routed"}, + "Ethernet-BP8": { "admin_status": "up", "alias": "Eth6-ASIC0", "asic_port_name": "Eth6-ASIC0", "description": "ASIC3:Eth0-ASIC3", "index": "2", "lanes": "21,22,23,24", "mtu": "9100", "tpid": "0x8100","pfc_asym": "off", "role": "Int", "speed": "40000" , "mode": "routed"}, + "Ethernet-BP12": { "admin_status": "up", "alias": "Eth7-ASIC0", "asic_port_name": "Eth7-ASIC0", "description": "ASIC3:Eth1-ASIC3", "index": "3", "lanes": "25,26,27,28", "mtu": "9100", "tpid": "0x8100","pfc_asym": "off", "role": "Int", "speed": "40000" , "mode": "routed"}}) def test_frontend_asic_ports_config_db(self): argument = ["-m", self.sample_graph, "-p", self.port_config[0], "-n", "asic0", "--var-json", "PORT"] output = json.loads(self.run_script(argument)) self.assertDictEqual(output, - {"Ethernet0": { "admin_status": "up", "alias": "Ethernet1/1", "asic_port_name": "Eth0-ASIC0", "description": "01T2:Ethernet1", "index": "0", "lanes": "33,34,35,36", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on" }, - "Ethernet4": { "admin_status": "up", "alias": "Ethernet1/2", "asic_port_name": "Eth1-ASIC0", "description": "01T2:Ethernet2", "index": "1", "lanes": "29,30,31,32", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on" }, - "Ethernet8": { "alias": "Ethernet1/3", "asic_port_name": "Eth2-ASIC0", "description": "Ethernet1/3", "index": "2", "lanes": "41,42,43,44", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000" }, - "Ethernet12": { "alias": "Ethernet1/4", "asic_port_name": "Eth3-ASIC0", "description": "Ethernet1/4", "index": "3", "lanes": "37,38,39,40", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000" }, - "Ethernet-BP0": { "admin_status": "up", "alias": "Eth4-ASIC0", "asic_port_name": "Eth4-ASIC0", "description": "ASIC2:Eth0-ASIC2", "index": "0", "lanes": "13,14,15,16", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }, - "Ethernet-BP4": { "admin_status": "up", "alias": "Eth5-ASIC0", "asic_port_name": "Eth5-ASIC0", "description": "ASIC2:Eth1-ASIC2", "index": "1", "lanes": "17,18,19,20", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }, - "Ethernet-BP8": { "admin_status": "up", "alias": "Eth6-ASIC0", "asic_port_name": "Eth6-ASIC0", "description": "ASIC3:Eth0-ASIC3", "index": "2", "lanes": "21,22,23,24", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }, - "Ethernet-BP12": { "admin_status": "up", "alias": "Eth7-ASIC0", "asic_port_name": "Eth7-ASIC0", "description": "ASIC3:Eth1-ASIC3", "index": "3", "lanes": "25,26,27,28", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }}) + {"Ethernet0": { "admin_status": "up", "alias": "Ethernet1/1", "asic_port_name": "Eth0-ASIC0", "description": "01T2:Ethernet1", "index": "0", "lanes": "33,34,35,36", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on", "mode": "routed"}, + "Ethernet4": { "admin_status": "up", "alias": "Ethernet1/2", "asic_port_name": "Eth1-ASIC0", "description": "01T2:Ethernet2", "index": "1", "lanes": "29,30,31,32", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on" , "mode": "routed"}, + "Ethernet8": { "alias": "Ethernet1/3", "asic_port_name": "Eth2-ASIC0", "description": "Ethernet1/3", "index": "2", "lanes": "41,42,43,44", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000" , "mode": "routed"}, + "Ethernet12": { "alias": "Ethernet1/4", "asic_port_name": "Eth3-ASIC0", "description": "Ethernet1/4", "index": "3", "lanes": "37,38,39,40", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000" , "mode": "routed"}, + "Ethernet-BP0": { "admin_status": "up", "alias": "Eth4-ASIC0", "asic_port_name": "Eth4-ASIC0", "description": "ASIC2:Eth0-ASIC2", "index": "0", "lanes": "13,14,15,16", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000", "mode": "routed"}, + "Ethernet-BP4": { "admin_status": "up", "alias": "Eth5-ASIC0", "asic_port_name": "Eth5-ASIC0", "description": "ASIC2:Eth1-ASIC2", "index": "1", "lanes": "17,18,19,20", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000", "mode": "routed" }, + "Ethernet-BP8": { "admin_status": "up", "alias": "Eth6-ASIC0", "asic_port_name": "Eth6-ASIC0", "description": "ASIC3:Eth0-ASIC3", "index": "2", "lanes": "21,22,23,24", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" , "mode": "routed"}, + "Ethernet-BP12": { "admin_status": "up", "alias": "Eth7-ASIC0", "asic_port_name": "Eth7-ASIC0", "description": "ASIC3:Eth1-ASIC3", "index": "3", "lanes": "25,26,27,28", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000", "mode": "routed"}}) def test_frontend_asic_device_neigh(self): argument = ["-m", self.sample_graph, "-p", self.port_config[0], "-n", "asic0", "--var-json", "DEVICE_NEIGHBOR"] @@ -550,4 +550,4 @@ def test_no_asic_in_graph(self): self.assertDictEqual(output, {}) def tearDown(self): - os.environ["CFGGEN_UNIT_TESTING"] = "" + os.environ["CFGGEN_UNIT_TESTING"] = "" \ No newline at end of file From 3868d3677f2733c688a1265c1dacf19ec62c6c78 Mon Sep 17 00:00:00 2001 From: Rida Hanif <61490193+ridahanif96@users.noreply.github.com> Date: Tue, 19 Mar 2024 09:39:28 +0000 Subject: [PATCH 2/5] MS Conflict reslove --- src/sonic-config-engine/minigraph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index 15020bd1ebda..e68dd4695734 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -1986,7 +1986,7 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw pc['tpid'] = '0x8100' pc['admin_status'] = 'up' - # mode check for vlan membership in portchannel and default mode is routed and mode is trunk when port channel has vlan membership + # mode check for vlan membership in portchannel and default mode is routed and mode is trunk when portchannel has vlan membership with it for pc_name, pc in pcs.items(): if 'mode' not in pc: if pc_name in [key[1] for key in vlan_members.keys()]: From 0bf040f0955105af4c7b28ee134af57cc85a95f3 Mon Sep 17 00:00:00 2001 From: Rida Hanif <61490193+ridahanif96@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:05:57 +0000 Subject: [PATCH 3/5] Fix for BGP --- src/sonic-config-engine/tests/test_cfggen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index 512a6cefb260..19c0d38b9c54 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -717,7 +717,7 @@ def test_minigraph_bgp_mon(self): output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'10.20.30.40': {'rrclient': 0, 'name': 'BGPMonitor', 'local_addr': '10.1.0.32', 'nhopself': 0, 'holdtime': '10', 'asn': '1', 'keepalive': '3'}}") + utils.to_dict("{'10.20.30.40': {'rrclient': 0, 'name': 'BGPMonitor', 'local_addr': '10.1.0.32', 'nhopself': 0, 'holdtime': '10', 'asn': '0', 'keepalive': '3'}}") ) def test_minigraph_bgp_voq_chassis_peer(self): From 5a9050668dea393af24b291b712bb64cd62b9328 Mon Sep 17 00:00:00 2001 From: Rida Hanif <61490193+ridahanif96@users.noreply.github.com> Date: Wed, 20 Mar 2024 08:09:27 +0000 Subject: [PATCH 4/5] Test --- src/sonic-config-engine/tests/test_cfggen.py | 20 ++++++++++++------- .../tests/test_minigraph_case.py | 9 +++++---- .../tests/test_multinpu_cfggen.py | 14 ++++++------- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index 19c0d38b9c54..426271d50726 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -400,6 +400,7 @@ def test_minigraph_port_fec_disabled(self): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict("{'lanes': '25,26,27,28', 'description': 'Servers0:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '100000', 'autoneg': 'on', 'fec': 'none'}") + ) def test_minigraph_port_autonegotiation(self): @@ -409,7 +410,7 @@ def test_minigraph_port_autonegotiation(self): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'alias': 'fortyGigE0/0', 'pfc_asym': 'off', 'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk', 'speed': '40000'}, " + "{'Ethernet0': {'alias': 'fortyGigE0/0', 'pfc_asym': 'off', 'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk', 'speed': '40000'}, " "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'Servers0:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/4', 'admin_status': 'up', 'autoneg': 'on', 'speed': '100000', 'fec': 'none'}, " "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'fortyGigE0/8', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'autoneg': 'off', 'fec': 'none', 'speed': '40000'}, " "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'fortyGigE0/12', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '40000'}, " @@ -442,6 +443,7 @@ def test_minigraph_port_autonegotiation(self): "'Ethernet120': {'lanes': '97,98,99,100', 'description': 'ARISTA03T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/120', 'admin_status': 'up', 'speed': '40000'}, " "'Ethernet124': {'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/124', 'admin_status': 'up', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1'}}" ) + ) ) # Test with a port_config.ini file which has an 'autoneg' column @@ -490,7 +492,7 @@ def test_minigraph_port_rs(self): output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode' : 'trunk', 'alias': 'fortyGigE0/124', 'admin_status': 'up', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1'}") + utils.to_dict("{'lanes': '33,34,35,36', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '100000', 'description': 'Interface description'}") ) def test_minigraph_default_vxlan(self): @@ -553,10 +555,11 @@ def test_minigraph_ethernet_interfaces(self, **kwargs): def test_minigraph_neighbor_interfaces(self): argument = ['-m', self.sample_graph_simple_case, '-p', self.port_config, '-v', "PORT"] output = self.run_script(argument) + self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'switch-01t1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' ,'alias': 'fortyGigE0/0', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}," + "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'switch-01t1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' ,'alias': 'fortyGigE0/0', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}," "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'server1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '25000', 'autoneg': 'on', 'mux_cable': 'true'}, " "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'speed': '40000', 'autoneg': 'on', 'mux_cable': 'true'}, " "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}, " @@ -642,7 +645,7 @@ def test_minigraph_extra_ethernet_interfaces(self, **kwargs): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'alias': 'fortyGigE0/0', 'admin_status': 'up', 'speed': '10000'}, " + "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'alias': 'fortyGigE0/0', 'admin_status': 'up', 'speed': '10000'}, " "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'fortyGigE0/4', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '25000'}, " "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'alias': 'fortyGigE0/8', 'admin_status': 'up', 'speed': '1000'}, " "'Ethernet12': {'lanes': '33,34,35,36', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk' ,'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '100000', 'description': 'Interface description'}, " @@ -676,6 +679,7 @@ def test_minigraph_extra_ethernet_interfaces(self, **kwargs): "'Ethernet124': {'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'lanes': '101,102,103,104', 'description': 'fortyGigE0/124', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk' , 'fec': 'rs', 'speed': '100000'}}" ) ) + # everflow portion is not used # def test_metadata_everflow(self): # argument = '-m "' + self.sample_graph_metadata + '" -p "' + self.port_config + '" -v "MIRROR_SESSION"' @@ -947,7 +951,7 @@ def test_minigraph_voq_port_macsec_enabled(self): output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'lanes': '6,7', 'fec': 'rs', 'alias': 'Ethernet1/1', 'index': '1', 'role': 'Ext', 'speed': '100000', 'macsec': 'macsec-profile', 'description': 'Ethernet1/1', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed' , 'pfc_asym': 'off'}") + utils.to_dict("{'lanes': '6,7', 'fec': 'rs', 'alias': 'Ethernet1/1', 'index': '1', 'role': 'Ext', 'speed': '100000', 'macsec': 'macsec-profile', 'description': 'Ethernet1/1', 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off'}") ) def test_minigraph_voq_inband_interface_port(self): @@ -1042,6 +1046,7 @@ def test_minigraph_bgp_packet_chassis_peer(self): utils.to_dict(output.strip()), utils.to_dict("{'rrclient': 0, 'name': 'str2-8808-lc0-ASIC1', 'local_addr': '8.0.0.3', 'nhopself': 0, 'admin_status': 'up', 'holdtime': '0', 'asn': '65100', 'keepalive': '0'}") ) + def test_minigraph_bgp_packet_chassis_static_route(self): argument = ['-m', self.packet_chassis_graph, '-p', self.packet_chassis_port_ini, '-v', "STATIC_ROUTE"] output = self.run_script(argument) @@ -1085,7 +1090,7 @@ def test_minigraph_400g_to_100G_speed(self): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'lanes': '72,73,74,75', 'alias': 'Ethernet1/1', 'index': '1', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth0-ASIC0', 'fec': 'rs', 'description': 'ARISTA01T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, " + "{'Ethernet0': {'lanes': '72,73,74,75', 'alias': 'Ethernet1/1', 'index': '1', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth0-ASIC0', 'fec': 'rs', 'description': 'ARISTA01T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, " "'Ethernet8': {'lanes': '80,81,82,83', 'alias': 'Ethernet2/1', 'index': '2', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth8-ASIC0', 'fec': 'rs', 'description': 'ARISTA01T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, " "'Ethernet16': {'lanes': '88,89,90,91', 'alias': 'Ethernet3/1', 'index': '3', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth16-ASIC0', 'fec': 'rs', 'description': 'ARISTA03T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, " "'Ethernet24': {'lanes': '96,97,98,99,100,101,102,103', 'alias': 'Ethernet4/1', 'index': '4', 'role': 'Ext', 'speed': '400000', 'asic_port_name': 'Eth24-ASIC0', 'description': 'ARISTA03T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, " @@ -1104,9 +1109,10 @@ def test_minigraph_400g_to_100G_speed(self): "'Ethernet128': {'lanes': '8,9,10,11', 'alias': 'Ethernet17/1', 'index': '17', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth128-ASIC0', 'fec': 'rs', 'description': 'ARISTA18T3:Ethernet1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}, " "'Ethernet136': {'lanes': '0,1,2,3', 'alias': 'Ethernet18/1', 'index': '18', 'role': 'Ext', 'speed': '100000', 'asic_port_name': 'Eth136-ASIC0', 'fec': 'rs', 'description': 'ARISTA18T3:Ethernet2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','pfc_asym': 'off', 'admin_status': 'up'}, " "'Ethernet-Rec0': {'lanes': '221', 'alias': 'Recirc0/0', 'index': '37', 'role': 'Rec', 'speed': '400000', 'asic_port_name': 'Rcy0-ASIC0', 'description': 'Recirc0/0', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}," - "'Ethernet-IB0': {'lanes': '222', 'alias': 'Recirc0/1', 'index': '38', 'role': 'Inb', 'speed': '400000', 'asic_port_name': 'Rcy1-ASIC0', 'description': 'Recirc0/1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}}" + "'Ethernet-IB0': {'lanes': '222', 'alias': 'Recirc0/1', 'index': '38', 'role': 'Inb', 'speed': '400000', 'asic_port_name': 'Rcy1-ASIC0', 'description': 'Recirc0/1', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'pfc_asym': 'off', 'admin_status': 'up'}}" ) ) + def test_minigraph_cisco_400g_to_100G_speed(self): argument = ["-m", self.sample_cisco_100_graph, "-p", self.sample_cisco_port_config_400g, "-v", "PORT"] self.assertTrue(self.yang.validate(argument)) diff --git a/src/sonic-config-engine/tests/test_minigraph_case.py b/src/sonic-config-engine/tests/test_minigraph_case.py index 563cba1aa52d..8f5e868f552e 100644 --- a/src/sonic-config-engine/tests/test_minigraph_case.py +++ b/src/sonic-config-engine/tests/test_minigraph_case.py @@ -165,6 +165,7 @@ def test_minigraph_portchannels(self): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict("{'PortChannel01': {'admin_status': 'up', 'min_links': '1', 'mtu': '9100', 'tpid': '0x8100', 'lacp_key': 'auto','mode': 'routed'}}") + ) def test_minigraph_console_mgmt_feature(self): @@ -528,7 +529,7 @@ def test_minigraph_acl_type_bmcdata(self): } # TC1: Minigraph contains acl table type BmcData sample_mx_graph = os.path.join(self.test_dir,'simple-sample-graph-mx.xml') - result = minigraph.parse_xml(sample_mx_graph) + result = minigraph.parse_xml(sample_mx_graph, port_config_file=self.port_config) self.assertIn('ACL_TABLE_TYPE', result) self.assertIn('BMCDATA', result['ACL_TABLE_TYPE']) self.assertIn('BMCDATAV6', result['ACL_TABLE_TYPE']) @@ -537,7 +538,7 @@ def test_minigraph_acl_type_bmcdata(self): self.assertDictEqual(result['ACL_TABLE']['BMC_ACL_NORTHBOUND'], expected_acl_table_bmc_acl_northbound) self.assertDictEqual(result['ACL_TABLE']['BMC_ACL_NORTHBOUND_V6'], expected_acl_table_bmc_acl_northbound_v6) # TC2: Minigraph doesn't contain acl table type BmcData - result = minigraph.parse_xml(self.sample_graph) + result = minigraph.parse_xml(self.sample_graph, port_config_file=self.port_config) self.assertNotIn('ACL_TABLE_TYPE', result) def test_parse_device_desc_xml_mgmt_interface(self): @@ -564,7 +565,7 @@ def test_mgmt_device_disable_counters(self): mgmt_graphs = ['simple-sample-graph-mx.xml', 'simple-sample-graph-m0.xml'] for graph in mgmt_graphs: graph_path = os.path.join(self.test_dir, graph) - result = minigraph.parse_xml(graph_path) + result = minigraph.parse_xml(graph_path, port_config_file=self.port_config) self.assertIn('FLEX_COUNTER_TABLE', result) for counter in expected_mgmt_disabled_counters: self.assertIn(counter, result['FLEX_COUNTER_TABLE']) @@ -573,5 +574,5 @@ def test_mgmt_device_disable_counters(self): if counter in result['FLEX_COUNTER_TABLE']: self.assertDictEqual(result['FLEX_COUNTER_TABLE'][counter], {'FLEX_COUNTER_STATUS': 'enable'}) # TC2: For other minigraph, result should not contain FLEX_COUNTER_TABLE - result = minigraph.parse_xml(self.sample_graph) + result = minigraph.parse_xml(self.sample_graph, port_config_file=self.port_config) self.assertNotIn('FLEX_COUNTER_TABLE', result) \ No newline at end of file diff --git a/src/sonic-config-engine/tests/test_multinpu_cfggen.py b/src/sonic-config-engine/tests/test_multinpu_cfggen.py index 9606baaf3429..5d17c7566ea4 100644 --- a/src/sonic-config-engine/tests/test_multinpu_cfggen.py +++ b/src/sonic-config-engine/tests/test_multinpu_cfggen.py @@ -163,16 +163,16 @@ def test_frontend_asic_portchannels(self): argument = ["-m", self.sample_graph, "-p", self.port_config[0], "-n", "asic0", "--var-json", "PORTCHANNEL"] output = json.loads(self.run_script(argument)) self.assertDictEqual(output, \ - {'PortChannel0002': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'lacp_key': 'auto'}, - 'PortChannel4001': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'lacp_key': 'auto'}, - 'PortChannel4002': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed', 'lacp_key': 'auto'}}) + {'PortChannel0002': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'lacp_key': 'auto'}, + 'PortChannel4001': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','lacp_key': 'auto'}, + 'PortChannel4002': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','lacp_key': 'auto'}}) def test_backend_asic_portchannels(self): argument = ["-m", self.sample_graph, "-p", self.port_config[3], "-n", "asic3", "--var-json", "PORTCHANNEL"] output = json.loads(self.run_script(argument)) self.assertDictEqual(output, \ - {'PortChannel4013': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed' , 'lacp_key': 'auto'}, - 'PortChannel4014': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed' , 'lacp_key': 'auto'}}) + {'PortChannel4013': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100','mode': 'routed', 'lacp_key': 'auto'}, + 'PortChannel4014': {'admin_status': 'up', 'min_links': '2', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'routed','lacp_key': 'auto'}}) def test_frontend_asic_portchannel_mem(self): argument = ["-m", self.sample_graph, "-p", self.port_config[0], "-n", "asic0", "-v", "PORTCHANNEL_MEMBER.keys()|list"] @@ -218,7 +218,7 @@ def test_frontend_asic_ports(self): argument = ["-m", self.sample_graph, "-p", self.port_config[0], "-n", "asic0", "--var-json", "PORT"] output = json.loads(self.run_script(argument)) self.assertDictEqual(output, - {"Ethernet0": { "admin_status": "up", "alias": "Ethernet1/1", "asic_port_name": "Eth0-ASIC0", "description": "01T2:Ethernet1", "index": "0", "lanes": "33,34,35,36", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on", "mode": "routed"}, + {"Ethernet0": { "admin_status": "up", "alias": "Ethernet1/1", "asic_port_name": "Eth0-ASIC0", "description": "01T2:Ethernet1", "index": "0", "lanes": "33,34,35,36", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on", "mode": "routed"}, "Ethernet4": { "admin_status": "up", "alias": "Ethernet1/2", "asic_port_name": "Eth1-ASIC0", "description": "01T2:Ethernet2", "index": "1", "lanes": "29,30,31,32", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on" , "mode": "routed"}, "Ethernet8": { "alias": "Ethernet1/3", "asic_port_name": "Eth2-ASIC0", "description": "Ethernet1/3", "index": "2", "lanes": "41,42,43,44", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "mode": "routed"}, "Ethernet12": { "alias": "Ethernet1/4", "asic_port_name": "Eth3-ASIC0", "description": "Ethernet1/4", "index": "3", "lanes": "37,38,39,40", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "mode": "routed"}, @@ -231,7 +231,7 @@ def test_frontend_asic_ports_config_db(self): argument = ["-m", self.sample_graph, "-p", self.port_config[0], "-n", "asic0", "--var-json", "PORT"] output = json.loads(self.run_script(argument)) self.assertDictEqual(output, - {"Ethernet0": { "admin_status": "up", "alias": "Ethernet1/1", "asic_port_name": "Eth0-ASIC0", "description": "01T2:Ethernet1", "index": "0", "lanes": "33,34,35,36", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on", "mode": "routed"}, + {"Ethernet0": { "admin_status": "up", "alias": "Ethernet1/1", "asic_port_name": "Eth0-ASIC0", "description": "01T2:Ethernet1", "index": "0", "lanes": "33,34,35,36", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on", "mode": "routed"}, "Ethernet4": { "admin_status": "up", "alias": "Ethernet1/2", "asic_port_name": "Eth1-ASIC0", "description": "01T2:Ethernet2", "index": "1", "lanes": "29,30,31,32", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on" , "mode": "routed"}, "Ethernet8": { "alias": "Ethernet1/3", "asic_port_name": "Eth2-ASIC0", "description": "Ethernet1/3", "index": "2", "lanes": "41,42,43,44", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000" , "mode": "routed"}, "Ethernet12": { "alias": "Ethernet1/4", "asic_port_name": "Eth3-ASIC0", "description": "Ethernet1/4", "index": "3", "lanes": "37,38,39,40", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000" , "mode": "routed"}, From 8c68b075d33f03d3f89e11c3fbc3791dba18abcc Mon Sep 17 00:00:00 2001 From: Rida Hanif <61490193+ridahanif96@users.noreply.github.com> Date: Wed, 20 Mar 2024 19:53:21 +0000 Subject: [PATCH 5/5] Fix for error --- src/sonic-config-engine/tests/test_cfggen.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index 426271d50726..ac9a523fc6d6 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -410,7 +410,7 @@ def test_minigraph_port_autonegotiation(self): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'alias': 'fortyGigE0/0', 'pfc_asym': 'off', 'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk', 'speed': '40000'}, " + "{'Ethernet0': {'alias': 'fortyGigE0/0', 'pfc_asym': 'off', 'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'mtu': '9100', 'tpid': '0x8100','mode': 'trunk', 'speed': '40000'}, " "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'Servers0:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/4', 'admin_status': 'up', 'autoneg': 'on', 'speed': '100000', 'fec': 'none'}, " "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'fortyGigE0/8', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'autoneg': 'off', 'fec': 'none', 'speed': '40000'}, " "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'fortyGigE0/12', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk','alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '40000'}, " @@ -444,7 +444,6 @@ def test_minigraph_port_autonegotiation(self): "'Ethernet124': {'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'mode': 'trunk', 'alias': 'fortyGigE0/124', 'admin_status': 'up', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1'}}" ) ) - ) # Test with a port_config.ini file which has an 'autoneg' column argument = ['-m', self.sample_graph_t0, '-p', self.port_config_autoneg, '-v', "PORT"]