From 86525557db2440330d2aa5a3553c88991230eed9 Mon Sep 17 00:00:00 2001 From: jingwenxie Date: Tue, 17 Dec 2024 04:41:10 +0000 Subject: [PATCH 1/7] [sonic-cfggen] Fix init t1 config to align with YANG --- src/sonic-config-engine/config_samples.py | 6 +- .../tests/sample_output/t1-smartswitch.json | 131 +++++++++++++----- 2 files changed, 103 insertions(+), 34 deletions(-) diff --git a/src/sonic-config-engine/config_samples.py b/src/sonic-config-engine/config_samples.py index cc71145df1ec..0b611d9ca3d9 100644 --- a/src/sonic-config-engine/config_samples.py +++ b/src/sonic-config-engine/config_samples.py @@ -50,7 +50,8 @@ def generate_t1_sample_config(data): data['DEVICE_METADATA']['localhost']['hostname'] = 'sonic' data['DEVICE_METADATA']['localhost']['type'] = 'LeafRouter' data['DEVICE_METADATA']['localhost']['bgp_asn'] = '65100' - data['LOOPBACK_INTERFACE'] = {"Loopback0|10.1.0.1/32": {}} + data['LOOPBACK_INTERFACE'] = {"Loopback0": {}, + "Loopback0|10.1.0.1/32": {}} data['BGP_NEIGHBOR'] = {} data['DEVICE_NEIGHBOR'] = {} data['INTERFACE'] = {} @@ -59,10 +60,13 @@ def generate_t1_sample_config(data): for port in natsorted(data['PORT']): data['PORT'][port]['admin_status'] = 'up' data['PORT'][port]['mtu'] = '9100' + if 'speed' not in data['PORT'][port]: + data['PORT'][port]['speed'] = '100000' local_addr = '10.0.{}.{}'.format(2 * port_count // 256, 2 * port_count % 256) peer_addr = '10.0.{}.{}'.format(2 * port_count // 256, 2 * port_count % 256 + 1) peer_name='ARISTA{0:02d}{1}'.format(1+port_count%(total_port_amount // 2), 'T2' if port_count < (total_port_amount // 2) else 'T0') peer_asn = 65200 if port_count < (total_port_amount // 2) else 64001 + port_count - (total_port_amount // 2) + data['INTERFACE']['{}'.format(port)] = {} data['INTERFACE']['{}|{}/31'.format(port, local_addr)] = {} data['BGP_NEIGHBOR'][peer_addr] = { 'rrclient': 0, diff --git a/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json b/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json index b7a93d530a13..87036e755b96 100644 --- a/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json +++ b/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json @@ -375,6 +375,38 @@ } }, "INTERFACE": { + "Ethernet0":{}, + "Ethernet104": {}, + "Ethernet112": {}, + "Ethernet120": {}, + "Ethernet128": {}, + "Ethernet136": {}, + "Ethernet144": {}, + "Ethernet152": {}, + "Ethernet160": {}, + "Ethernet168": {}, + "Ethernet16": {}, + "Ethernet176": {}, + "Ethernet184": {}, + "Ethernet192": {}, + "Ethernet200": {}, + "Ethernet208": {}, + "Ethernet216": {}, + "Ethernet224": {}, + "Ethernet232": {}, + "Ethernet240": {}, + "Ethernet248": {}, + "Ethernet24": {}, + "Ethernet32": {}, + "Ethernet40": {}, + "Ethernet48": {}, + "Ethernet56": {}, + "Ethernet64": {}, + "Ethernet72": {}, + "Ethernet80": {}, + "Ethernet88": {}, + "Ethernet8": {}, + "Ethernet96": {}, "Ethernet0|10.0.0.0/31": {}, "Ethernet104|10.0.0.26/31": {}, "Ethernet112|10.0.0.28/31": {}, @@ -409,6 +441,7 @@ "Ethernet96|10.0.0.24/31": {} }, "LOOPBACK_INTERFACE": { + "Loopback0": {}, "Loopback0|10.1.0.1/32": {} }, "MID_PLANE_BRIDGE": { @@ -422,193 +455,225 @@ "admin_status": "up", "alias": "etp1", "lanes": "0,1,2,3,4,5,6,7", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet104": { "admin_status": "up", "alias": "etp14", "lanes": "104,105,106,107,108,109,110,111", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet112": { "admin_status": "up", "alias": "etp15", "lanes": "112,113,114,115,116,117,118,119", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet120": { "admin_status": "up", "alias": "etp16", "lanes": "120,121,122,123,124,125,126,127", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet128": { "admin_status": "up", "alias": "etp17", "lanes": "128,129,130,131,132,133,134,135", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet136": { "admin_status": "up", "alias": "etp18", "lanes": "136,137,138,139,140,141,142,143", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet144": { "admin_status": "up", "alias": "etp19", "lanes": "144,145,146,147,148,149,150,151", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet152": { "admin_status": "up", "alias": "etp20", "lanes": "152,153,154,155,156,157,158,159", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet16": { "admin_status": "up", "alias": "etp3", "lanes": "16,17,18,19,20,21,22,23", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet160": { "admin_status": "up", "alias": "etp21", "lanes": "160,161,162,163,164,165,166,167", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet168": { "admin_status": "up", "alias": "etp22", "lanes": "168,169,170,171,172,173,174,175", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet176": { "admin_status": "up", "alias": "etp23", "lanes": "176,177,178,179,180,181,182,183", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet184": { "admin_status": "up", "alias": "etp24", "lanes": "184,185,186,187,188,189,190,191", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet192": { "admin_status": "up", "alias": "etp25", "lanes": "192,193,194,195,196,197,198,199", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet200": { "admin_status": "up", "alias": "etp26", "lanes": "200,201,202,203,204,205,206,207", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet208": { "admin_status": "up", "alias": "etp27", "lanes": "208,209,210,211,212,213,214,215", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet216": { "admin_status": "up", "alias": "etp28", "lanes": "216,217,218,219,220,221,222,223", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet224": { "admin_status": "up", "alias": "etp29", "lanes": "224,225,226,227,228,229,230,231", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet232": { "admin_status": "up", "alias": "etp30", "lanes": "232,233,234,235,236,237,238,239", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet24": { "admin_status": "up", "alias": "etp4", "lanes": "24,25,26,27,28,29,30,31", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet240": { "admin_status": "up", "alias": "etp31", "lanes": "240,241,242,243,244,245,246,247", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet248": { "admin_status": "up", "alias": "etp32", "lanes": "248,249,250,251,252,253,254,255", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet32": { "admin_status": "up", "alias": "etp5", "lanes": "32,33,34,35,36,37,38,39", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet40": { "admin_status": "up", "alias": "etp6", "lanes": "40,41,42,43,44,45,46,47", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet48": { "admin_status": "up", "alias": "etp7", "lanes": "48,49,50,51,52,53,54,55", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet56": { "admin_status": "up", "alias": "etp8", "lanes": "56,57,58,59,60,61,62,63", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet64": { "admin_status": "up", "alias": "etp9", "lanes": "64,65,66,67,68,69,70,71", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet72": { "admin_status": "up", "alias": "etp10", "lanes": "72,73,74,75,76,77,78,79", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet8": { "admin_status": "up", "alias": "etp2", "lanes": "8,9,10,11,12,13,14,15", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet80": { "admin_status": "up", "alias": "etp11", "lanes": "80,81,82,83,84,85,86,87", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet88": { "admin_status": "up", "alias": "etp12", "lanes": "88,89,90,91,92,93,94,95", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" }, "Ethernet96": { "admin_status": "up", "alias": "etp13", "lanes": "96,97,98,99,100,101,102,103", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" } } -} \ No newline at end of file +} From 32692ead1ab7aae23000a73e250daed65f46123b Mon Sep 17 00:00:00 2001 From: jingwenxie Date: Tue, 17 Dec 2024 04:56:35 +0000 Subject: [PATCH 2/7] yang --- src/sonic-config-engine/tests/test_j2files.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py index 3ff70d40ae83..ec5a3276f349 100644 --- a/src/sonic-config-engine/tests/test_j2files.py +++ b/src/sonic-config-engine/tests/test_j2files.py @@ -11,6 +11,7 @@ class TestJ2Files(TestCase): def setUp(self): + self.yang = utils.YangWrapper() self.test_dir = os.path.dirname(os.path.realpath(__file__)) self.script_file = [utils.PYTHON_INTERPRETTER, os.path.join(self.test_dir, '..', 'sonic-cfggen')] self.simple_minigraph = os.path.join(self.test_dir, 'simple-sample-graph.xml') @@ -322,6 +323,7 @@ def test_l2switch_template_dualtor(self): def test_t1_smartswitch_template(self): argument = ['-k', 'SSwitch-32x1000Gb', '--preset', 't1-smartswitch', '-p', self.t1_ss_port_config] + self.assertTrue(self.yang.validate(argument)) output = self.run_script(argument) output_json = json.loads(output) From 62c8350f47a4f5f78146ece0f7eac50b5d8cc5c0 Mon Sep 17 00:00:00 2001 From: jingwenxie Date: Tue, 17 Dec 2024 06:54:21 +0000 Subject: [PATCH 3/7] Revert "yang" This reverts commit 32692ead1ab7aae23000a73e250daed65f46123b. --- src/sonic-config-engine/tests/test_j2files.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py index ec5a3276f349..3ff70d40ae83 100644 --- a/src/sonic-config-engine/tests/test_j2files.py +++ b/src/sonic-config-engine/tests/test_j2files.py @@ -11,7 +11,6 @@ class TestJ2Files(TestCase): def setUp(self): - self.yang = utils.YangWrapper() self.test_dir = os.path.dirname(os.path.realpath(__file__)) self.script_file = [utils.PYTHON_INTERPRETTER, os.path.join(self.test_dir, '..', 'sonic-cfggen')] self.simple_minigraph = os.path.join(self.test_dir, 'simple-sample-graph.xml') @@ -323,7 +322,6 @@ def test_l2switch_template_dualtor(self): def test_t1_smartswitch_template(self): argument = ['-k', 'SSwitch-32x1000Gb', '--preset', 't1-smartswitch', '-p', self.t1_ss_port_config] - self.assertTrue(self.yang.validate(argument)) output = self.run_script(argument) output_json = json.loads(output) From 051a6ee2bdcc42e12185c2a20f5250b3000541cf Mon Sep 17 00:00:00 2001 From: jingwenxie Date: Tue, 17 Dec 2024 23:43:50 +0000 Subject: [PATCH 4/7] trigger --- src/sonic-config-engine/tests/sample_output/t1-smartswitch.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json b/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json index 87036e755b96..c7dff7eb78da 100644 --- a/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json +++ b/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json @@ -677,3 +677,4 @@ } } } + From 41590f2d59ece57ca3838a348b2b33909d90d3e9 Mon Sep 17 00:00:00 2001 From: jingwenxie Date: Tue, 7 Jan 2025 09:06:07 +0000 Subject: [PATCH 5/7] updated all to yang --- src/sonic-config-engine/config_samples.py | 6 +- .../tests/sample_output/py2/l2switch.json | 96 ++++++++++++------- .../sample_output/py2/l2switch_dualtor.json | 2 +- .../tests/sample_output/py3/l2switch.json | 96 ++++++++++++------- .../sample_output/py3/l2switch_dualtor.json | 2 +- .../sample_output/t1-smartswitch-dpu.json | 3 +- .../tests/sample_output/t1-smartswitch.json | 1 - 7 files changed, 137 insertions(+), 69 deletions(-) diff --git a/src/sonic-config-engine/config_samples.py b/src/sonic-config-engine/config_samples.py index 0b611d9ca3d9..b4ed25804641 100644 --- a/src/sonic-config-engine/config_samples.py +++ b/src/sonic-config-engine/config_samples.py @@ -154,6 +154,8 @@ def generate_t1_smartswitch_dpu_sample_config(data, ss_config): for port in natsorted(data['PORT']): data['PORT'][port]['admin_status'] = 'up' data['PORT'][port]['mtu'] = '9100' + if 'speed' not in data['PORT'][port]: + data['PORT'][port]['speed'] = '100000' dash_crm_resources = ["vnet", "eni", "eni_ether_address_map", "ipv4_inbound_routing", "ipv6_inbound_routing", "ipv4_outbound_routing", "ipv6_outbound_routing", "ipv4_pa_validation", "ipv6_pa_validation", "ipv4_outbound_ca_to_pa", "ipv6_outbound_ca_to_pa", @@ -189,7 +191,7 @@ def generate_global_dualtor_tables(): data = defaultdict(lambda: defaultdict(dict)) data['LOOPBACK_INTERFACE'] = { 'Loopback2': {}, - 'Loopback2|3.3.3.3': {} + 'Loopback2|3.3.3.3/32': {} } data['MUX_CABLE'] = {} data['PEER_SWITCH'] = { @@ -242,6 +244,7 @@ def generate_l2_config(data): # Ports in use should be admin up, unused ports default to admin down if port in downlinks or port in uplinks: data['PORT'][port].setdefault('admin_status', 'up') + data['PORT'][port].setdefault('speed', '50000') data['VLAN_MEMBER']['Vlan1000|{}'.format(port)] = {'tagging_mode': 'untagged'} # Downlinks (connected to mux cable) need a MUX_CABLE entry @@ -257,6 +260,7 @@ def generate_l2_config(data): data['PORT'][port]['mux_cable'] = 'true' else: data['PORT'][port].setdefault('admin_status', 'up') + data['PORT'][port].setdefault('speed', '50000') data['VLAN_MEMBER']['Vlan1000|{}'.format(port)] = {'tagging_mode': 'untagged'} return data 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 de774b0ae58d..28824c17d19c 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", + "speed": "50000" }, "Ethernet0": { "alias": "fortyGigE0/0", "lanes": "29,30,31,32", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet4": { "alias": "fortyGigE0/4", "lanes": "25,26,27,28", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet108": { "alias": "fortyGigE0/108", "lanes": "81,82,83,84", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet100": { "alias": "fortyGigE0/100", "lanes": "125,126,127,128", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet104": { "alias": "fortyGigE0/104", "lanes": "85,86,87,88", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet68": { "alias": "fortyGigE0/68", "lanes": "69,70,71,72", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet96": { "alias": "fortyGigE0/96", "lanes": "121,122,123,124", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet124": { "alias": "fortyGigE0/124", "lanes": "101,102,103,104", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet92": { "alias": "fortyGigE0/92", "lanes": "113,114,115,116", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet120": { "alias": "fortyGigE0/120", "lanes": "97,98,99,100", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet52": { "alias": "fortyGigE0/52", "lanes": "53,54,55,56", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet56": { "alias": "fortyGigE0/56", "lanes": "61,62,63,64", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet76": { "alias": "fortyGigE0/76", "lanes": "73,74,75,76", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet72": { "alias": "fortyGigE0/72", "lanes": "77,78,79,80", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet64": { "alias": "fortyGigE0/64", "lanes": "65,66,67,68", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet32": { "alias": "fortyGigE0/32", "lanes": "9,10,11,12", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet16": { "alias": "fortyGigE0/16", "lanes": "41,42,43,44", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet36": { "alias": "fortyGigE0/36", "lanes": "13,14,15,16", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet12": { "alias": "fortyGigE0/12", "lanes": "33,34,35,36", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet88": { "alias": "fortyGigE0/88", "lanes": "117,118,119,120", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet116": { "alias": "fortyGigE0/116", "lanes": "93,94,95,96", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet80": { "alias": "fortyGigE0/80", "lanes": "105,106,107,108", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet112": { "alias": "fortyGigE0/112", "lanes": "89,90,91,92", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet84": { "alias": "fortyGigE0/84", "lanes": "109,110,111,112", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet48": { "alias": "fortyGigE0/48", "lanes": "49,50,51,52", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet44": { "alias": "fortyGigE0/44", "lanes": "17,18,19,20", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet40": { "alias": "fortyGigE0/40", "lanes": "21,22,23,24", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet28": { "alias": "fortyGigE0/28", "lanes": "1,2,3,4", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet60": { "alias": "fortyGigE0/60", "lanes": "57,58,59,60", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet20": { "alias": "fortyGigE0/20", "lanes": "45,46,47,48", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet24": { "alias": "fortyGigE0/24", "lanes": "5,6,7,8", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" } }, "VLAN": { diff --git a/src/sonic-config-engine/tests/sample_output/py2/l2switch_dualtor.json b/src/sonic-config-engine/tests/sample_output/py2/l2switch_dualtor.json index f09874d6e645..5aa60f22c484 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/l2switch_dualtor.json +++ b/src/sonic-config-engine/tests/sample_output/py2/l2switch_dualtor.json @@ -520,7 +520,7 @@ }, "LOOPBACK_INTERFACE": { "Loopback2": {}, - "Loopback2|3.3.3.3": {} + "Loopback2|3.3.3.3/32": {} }, "MUX_CABLE": { "Ethernet0": { 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 0ed50c624b25..48b7bf4a34a6 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", + "speed": "50000" }, "Ethernet4": { "alias": "fortyGigE0/4", "lanes": "25,26,27,28", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet8": { "alias": "fortyGigE0/8", "lanes": "37,38,39,40", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet12": { "alias": "fortyGigE0/12", "lanes": "33,34,35,36", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet16": { "alias": "fortyGigE0/16", "lanes": "41,42,43,44", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet20": { "alias": "fortyGigE0/20", "lanes": "45,46,47,48", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet24": { "alias": "fortyGigE0/24", "lanes": "5,6,7,8", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet28": { "alias": "fortyGigE0/28", "lanes": "1,2,3,4", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet32": { "alias": "fortyGigE0/32", "lanes": "9,10,11,12", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet36": { "alias": "fortyGigE0/36", "lanes": "13,14,15,16", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet40": { "alias": "fortyGigE0/40", "lanes": "21,22,23,24", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet44": { "alias": "fortyGigE0/44", "lanes": "17,18,19,20", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet48": { "alias": "fortyGigE0/48", "lanes": "49,50,51,52", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet52": { "alias": "fortyGigE0/52", "lanes": "53,54,55,56", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet56": { "alias": "fortyGigE0/56", "lanes": "61,62,63,64", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet60": { "alias": "fortyGigE0/60", "lanes": "57,58,59,60", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet64": { "alias": "fortyGigE0/64", "lanes": "65,66,67,68", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet68": { "alias": "fortyGigE0/68", "lanes": "69,70,71,72", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet72": { "alias": "fortyGigE0/72", "lanes": "77,78,79,80", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet76": { "alias": "fortyGigE0/76", "lanes": "73,74,75,76", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet80": { "alias": "fortyGigE0/80", "lanes": "105,106,107,108", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet84": { "alias": "fortyGigE0/84", "lanes": "109,110,111,112", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet88": { "alias": "fortyGigE0/88", "lanes": "117,118,119,120", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet92": { "alias": "fortyGigE0/92", "lanes": "113,114,115,116", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet96": { "alias": "fortyGigE0/96", "lanes": "121,122,123,124", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet100": { "alias": "fortyGigE0/100", "lanes": "125,126,127,128", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet104": { "alias": "fortyGigE0/104", "lanes": "85,86,87,88", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet108": { "alias": "fortyGigE0/108", "lanes": "81,82,83,84", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet112": { "alias": "fortyGigE0/112", "lanes": "89,90,91,92", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet116": { "alias": "fortyGigE0/116", "lanes": "93,94,95,96", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet120": { "alias": "fortyGigE0/120", "lanes": "97,98,99,100", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" }, "Ethernet124": { "alias": "fortyGigE0/124", "lanes": "101,102,103,104", - "admin_status": "up" + "admin_status": "up", + "speed": "50000" } }, "VLAN": { diff --git a/src/sonic-config-engine/tests/sample_output/py3/l2switch_dualtor.json b/src/sonic-config-engine/tests/sample_output/py3/l2switch_dualtor.json index f09874d6e645..5aa60f22c484 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/l2switch_dualtor.json +++ b/src/sonic-config-engine/tests/sample_output/py3/l2switch_dualtor.json @@ -520,7 +520,7 @@ }, "LOOPBACK_INTERFACE": { "Loopback2": {}, - "Loopback2|3.3.3.3": {} + "Loopback2|3.3.3.3/32": {} }, "MUX_CABLE": { "Ethernet0": { diff --git a/src/sonic-config-engine/tests/sample_output/t1-smartswitch-dpu.json b/src/sonic-config-engine/tests/sample_output/t1-smartswitch-dpu.json index 400d36127a7a..3bd84f20aa88 100644 --- a/src/sonic-config-engine/tests/sample_output/t1-smartswitch-dpu.json +++ b/src/sonic-config-engine/tests/sample_output/t1-smartswitch-dpu.json @@ -14,7 +14,8 @@ "lanes": "0,1,2,3,4,5,6,7", "alias": "etp1", "admin_status": "up", - "mtu": "9100" + "mtu": "9100", + "speed": "100000" } }, "FLEX_COUNTER_TABLE": { diff --git a/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json b/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json index c7dff7eb78da..87036e755b96 100644 --- a/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json +++ b/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json @@ -677,4 +677,3 @@ } } } - From 4b436c56682ca80656140d25c35c21d8598700b4 Mon Sep 17 00:00:00 2001 From: jingwenxie Date: Tue, 7 Jan 2025 11:12:13 +0000 Subject: [PATCH 6/7] ut --- src/sonic-config-engine/data/l2switch.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sonic-config-engine/data/l2switch.j2 b/src/sonic-config-engine/data/l2switch.j2 index 359525763f71..a78e89aff243 100644 --- a/src/sonic-config-engine/data/l2switch.j2 +++ b/src/sonic-config-engine/data/l2switch.j2 @@ -17,7 +17,8 @@ {% if keyPort != "admin_status" %}"{{ keyPort }}": "{{ valuePort }}",{% endif %} {%- endfor %} - "admin_status": "{{ value.admin_status|default("up") }}" + "admin_status": "{{ value.admin_status|default("up") }}", + "speed": "50000" } {%- if ns.update({'firstPrinted': True}) %}{% endif -%} {%- endfor %} From b1c3535f2687a900f8c4ba15dae63cc6ee017224 Mon Sep 17 00:00:00 2001 From: jingwenxie Date: Tue, 14 Jan 2025 08:00:31 +0000 Subject: [PATCH 7/7] limit to t1 --- src/sonic-config-engine/config_samples.py | 6 -- src/sonic-config-engine/data/l2switch.j2 | 3 +- .../tests/sample_output/py2/l2switch.json | 96 +++++++------------ .../tests/sample_output/py3/l2switch.json | 96 +++++++------------ .../sample_output/t1-smartswitch-dpu.json | 3 +- .../tests/sample_output/t1-smartswitch.json | 96 +++++++------------ 6 files changed, 98 insertions(+), 202 deletions(-) diff --git a/src/sonic-config-engine/config_samples.py b/src/sonic-config-engine/config_samples.py index b4ed25804641..aef6969d7131 100644 --- a/src/sonic-config-engine/config_samples.py +++ b/src/sonic-config-engine/config_samples.py @@ -60,8 +60,6 @@ def generate_t1_sample_config(data): for port in natsorted(data['PORT']): data['PORT'][port]['admin_status'] = 'up' data['PORT'][port]['mtu'] = '9100' - if 'speed' not in data['PORT'][port]: - data['PORT'][port]['speed'] = '100000' local_addr = '10.0.{}.{}'.format(2 * port_count // 256, 2 * port_count % 256) peer_addr = '10.0.{}.{}'.format(2 * port_count // 256, 2 * port_count % 256 + 1) peer_name='ARISTA{0:02d}{1}'.format(1+port_count%(total_port_amount // 2), 'T2' if port_count < (total_port_amount // 2) else 'T0') @@ -154,8 +152,6 @@ def generate_t1_smartswitch_dpu_sample_config(data, ss_config): for port in natsorted(data['PORT']): data['PORT'][port]['admin_status'] = 'up' data['PORT'][port]['mtu'] = '9100' - if 'speed' not in data['PORT'][port]: - data['PORT'][port]['speed'] = '100000' dash_crm_resources = ["vnet", "eni", "eni_ether_address_map", "ipv4_inbound_routing", "ipv6_inbound_routing", "ipv4_outbound_routing", "ipv6_outbound_routing", "ipv4_pa_validation", "ipv6_pa_validation", "ipv4_outbound_ca_to_pa", "ipv6_outbound_ca_to_pa", @@ -244,7 +240,6 @@ def generate_l2_config(data): # Ports in use should be admin up, unused ports default to admin down if port in downlinks or port in uplinks: data['PORT'][port].setdefault('admin_status', 'up') - data['PORT'][port].setdefault('speed', '50000') data['VLAN_MEMBER']['Vlan1000|{}'.format(port)] = {'tagging_mode': 'untagged'} # Downlinks (connected to mux cable) need a MUX_CABLE entry @@ -260,7 +255,6 @@ def generate_l2_config(data): data['PORT'][port]['mux_cable'] = 'true' else: data['PORT'][port].setdefault('admin_status', 'up') - data['PORT'][port].setdefault('speed', '50000') data['VLAN_MEMBER']['Vlan1000|{}'.format(port)] = {'tagging_mode': 'untagged'} return data diff --git a/src/sonic-config-engine/data/l2switch.j2 b/src/sonic-config-engine/data/l2switch.j2 index a78e89aff243..359525763f71 100644 --- a/src/sonic-config-engine/data/l2switch.j2 +++ b/src/sonic-config-engine/data/l2switch.j2 @@ -17,8 +17,7 @@ {% if keyPort != "admin_status" %}"{{ keyPort }}": "{{ valuePort }}",{% endif %} {%- endfor %} - "admin_status": "{{ value.admin_status|default("up") }}", - "speed": "50000" + "admin_status": "{{ value.admin_status|default("up") }}" } {%- if ns.update({'firstPrinted': True}) %}{% endif -%} {%- endfor %} 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 28824c17d19c..de774b0ae58d 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/l2switch.json +++ b/src/sonic-config-engine/tests/sample_output/py2/l2switch.json @@ -4,194 +4,162 @@ "Ethernet8": { "alias": "fortyGigE0/8", "lanes": "37,38,39,40", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet0": { "alias": "fortyGigE0/0", "lanes": "29,30,31,32", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet4": { "alias": "fortyGigE0/4", "lanes": "25,26,27,28", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet108": { "alias": "fortyGigE0/108", "lanes": "81,82,83,84", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet100": { "alias": "fortyGigE0/100", "lanes": "125,126,127,128", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet104": { "alias": "fortyGigE0/104", "lanes": "85,86,87,88", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet68": { "alias": "fortyGigE0/68", "lanes": "69,70,71,72", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet96": { "alias": "fortyGigE0/96", "lanes": "121,122,123,124", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet124": { "alias": "fortyGigE0/124", "lanes": "101,102,103,104", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet92": { "alias": "fortyGigE0/92", "lanes": "113,114,115,116", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet120": { "alias": "fortyGigE0/120", "lanes": "97,98,99,100", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet52": { "alias": "fortyGigE0/52", "lanes": "53,54,55,56", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet56": { "alias": "fortyGigE0/56", "lanes": "61,62,63,64", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet76": { "alias": "fortyGigE0/76", "lanes": "73,74,75,76", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet72": { "alias": "fortyGigE0/72", "lanes": "77,78,79,80", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet64": { "alias": "fortyGigE0/64", "lanes": "65,66,67,68", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet32": { "alias": "fortyGigE0/32", "lanes": "9,10,11,12", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet16": { "alias": "fortyGigE0/16", "lanes": "41,42,43,44", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet36": { "alias": "fortyGigE0/36", "lanes": "13,14,15,16", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet12": { "alias": "fortyGigE0/12", "lanes": "33,34,35,36", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet88": { "alias": "fortyGigE0/88", "lanes": "117,118,119,120", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet116": { "alias": "fortyGigE0/116", "lanes": "93,94,95,96", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet80": { "alias": "fortyGigE0/80", "lanes": "105,106,107,108", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet112": { "alias": "fortyGigE0/112", "lanes": "89,90,91,92", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet84": { "alias": "fortyGigE0/84", "lanes": "109,110,111,112", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet48": { "alias": "fortyGigE0/48", "lanes": "49,50,51,52", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet44": { "alias": "fortyGigE0/44", "lanes": "17,18,19,20", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet40": { "alias": "fortyGigE0/40", "lanes": "21,22,23,24", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet28": { "alias": "fortyGigE0/28", "lanes": "1,2,3,4", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet60": { "alias": "fortyGigE0/60", "lanes": "57,58,59,60", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet20": { "alias": "fortyGigE0/20", "lanes": "45,46,47,48", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet24": { "alias": "fortyGigE0/24", "lanes": "5,6,7,8", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" } }, "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 48b7bf4a34a6..0ed50c624b25 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/l2switch.json +++ b/src/sonic-config-engine/tests/sample_output/py3/l2switch.json @@ -4,194 +4,162 @@ "Ethernet0": { "alias": "fortyGigE0/0", "lanes": "29,30,31,32", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet4": { "alias": "fortyGigE0/4", "lanes": "25,26,27,28", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet8": { "alias": "fortyGigE0/8", "lanes": "37,38,39,40", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet12": { "alias": "fortyGigE0/12", "lanes": "33,34,35,36", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet16": { "alias": "fortyGigE0/16", "lanes": "41,42,43,44", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet20": { "alias": "fortyGigE0/20", "lanes": "45,46,47,48", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet24": { "alias": "fortyGigE0/24", "lanes": "5,6,7,8", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet28": { "alias": "fortyGigE0/28", "lanes": "1,2,3,4", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet32": { "alias": "fortyGigE0/32", "lanes": "9,10,11,12", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet36": { "alias": "fortyGigE0/36", "lanes": "13,14,15,16", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet40": { "alias": "fortyGigE0/40", "lanes": "21,22,23,24", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet44": { "alias": "fortyGigE0/44", "lanes": "17,18,19,20", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet48": { "alias": "fortyGigE0/48", "lanes": "49,50,51,52", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet52": { "alias": "fortyGigE0/52", "lanes": "53,54,55,56", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet56": { "alias": "fortyGigE0/56", "lanes": "61,62,63,64", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet60": { "alias": "fortyGigE0/60", "lanes": "57,58,59,60", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet64": { "alias": "fortyGigE0/64", "lanes": "65,66,67,68", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet68": { "alias": "fortyGigE0/68", "lanes": "69,70,71,72", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet72": { "alias": "fortyGigE0/72", "lanes": "77,78,79,80", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet76": { "alias": "fortyGigE0/76", "lanes": "73,74,75,76", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet80": { "alias": "fortyGigE0/80", "lanes": "105,106,107,108", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet84": { "alias": "fortyGigE0/84", "lanes": "109,110,111,112", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet88": { "alias": "fortyGigE0/88", "lanes": "117,118,119,120", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet92": { "alias": "fortyGigE0/92", "lanes": "113,114,115,116", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet96": { "alias": "fortyGigE0/96", "lanes": "121,122,123,124", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet100": { "alias": "fortyGigE0/100", "lanes": "125,126,127,128", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet104": { "alias": "fortyGigE0/104", "lanes": "85,86,87,88", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet108": { "alias": "fortyGigE0/108", "lanes": "81,82,83,84", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet112": { "alias": "fortyGigE0/112", "lanes": "89,90,91,92", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet116": { "alias": "fortyGigE0/116", "lanes": "93,94,95,96", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet120": { "alias": "fortyGigE0/120", "lanes": "97,98,99,100", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" }, "Ethernet124": { "alias": "fortyGigE0/124", "lanes": "101,102,103,104", - "admin_status": "up", - "speed": "50000" + "admin_status": "up" } }, "VLAN": { diff --git a/src/sonic-config-engine/tests/sample_output/t1-smartswitch-dpu.json b/src/sonic-config-engine/tests/sample_output/t1-smartswitch-dpu.json index 3bd84f20aa88..400d36127a7a 100644 --- a/src/sonic-config-engine/tests/sample_output/t1-smartswitch-dpu.json +++ b/src/sonic-config-engine/tests/sample_output/t1-smartswitch-dpu.json @@ -14,8 +14,7 @@ "lanes": "0,1,2,3,4,5,6,7", "alias": "etp1", "admin_status": "up", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" } }, "FLEX_COUNTER_TABLE": { diff --git a/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json b/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json index 87036e755b96..d49ed7feb22c 100644 --- a/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json +++ b/src/sonic-config-engine/tests/sample_output/t1-smartswitch.json @@ -455,225 +455,193 @@ "admin_status": "up", "alias": "etp1", "lanes": "0,1,2,3,4,5,6,7", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet104": { "admin_status": "up", "alias": "etp14", "lanes": "104,105,106,107,108,109,110,111", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet112": { "admin_status": "up", "alias": "etp15", "lanes": "112,113,114,115,116,117,118,119", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet120": { "admin_status": "up", "alias": "etp16", "lanes": "120,121,122,123,124,125,126,127", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet128": { "admin_status": "up", "alias": "etp17", "lanes": "128,129,130,131,132,133,134,135", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet136": { "admin_status": "up", "alias": "etp18", "lanes": "136,137,138,139,140,141,142,143", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet144": { "admin_status": "up", "alias": "etp19", "lanes": "144,145,146,147,148,149,150,151", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet152": { "admin_status": "up", "alias": "etp20", "lanes": "152,153,154,155,156,157,158,159", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet16": { "admin_status": "up", "alias": "etp3", "lanes": "16,17,18,19,20,21,22,23", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet160": { "admin_status": "up", "alias": "etp21", "lanes": "160,161,162,163,164,165,166,167", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet168": { "admin_status": "up", "alias": "etp22", "lanes": "168,169,170,171,172,173,174,175", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet176": { "admin_status": "up", "alias": "etp23", "lanes": "176,177,178,179,180,181,182,183", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet184": { "admin_status": "up", "alias": "etp24", "lanes": "184,185,186,187,188,189,190,191", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet192": { "admin_status": "up", "alias": "etp25", "lanes": "192,193,194,195,196,197,198,199", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet200": { "admin_status": "up", "alias": "etp26", "lanes": "200,201,202,203,204,205,206,207", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet208": { "admin_status": "up", "alias": "etp27", "lanes": "208,209,210,211,212,213,214,215", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet216": { "admin_status": "up", "alias": "etp28", "lanes": "216,217,218,219,220,221,222,223", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet224": { "admin_status": "up", "alias": "etp29", "lanes": "224,225,226,227,228,229,230,231", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet232": { "admin_status": "up", "alias": "etp30", "lanes": "232,233,234,235,236,237,238,239", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet24": { "admin_status": "up", "alias": "etp4", "lanes": "24,25,26,27,28,29,30,31", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet240": { "admin_status": "up", "alias": "etp31", "lanes": "240,241,242,243,244,245,246,247", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet248": { "admin_status": "up", "alias": "etp32", "lanes": "248,249,250,251,252,253,254,255", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet32": { "admin_status": "up", "alias": "etp5", "lanes": "32,33,34,35,36,37,38,39", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet40": { "admin_status": "up", "alias": "etp6", "lanes": "40,41,42,43,44,45,46,47", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet48": { "admin_status": "up", "alias": "etp7", "lanes": "48,49,50,51,52,53,54,55", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet56": { "admin_status": "up", "alias": "etp8", "lanes": "56,57,58,59,60,61,62,63", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet64": { "admin_status": "up", "alias": "etp9", "lanes": "64,65,66,67,68,69,70,71", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet72": { "admin_status": "up", "alias": "etp10", "lanes": "72,73,74,75,76,77,78,79", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet8": { "admin_status": "up", "alias": "etp2", "lanes": "8,9,10,11,12,13,14,15", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet80": { "admin_status": "up", "alias": "etp11", "lanes": "80,81,82,83,84,85,86,87", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet88": { "admin_status": "up", "alias": "etp12", "lanes": "88,89,90,91,92,93,94,95", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" }, "Ethernet96": { "admin_status": "up", "alias": "etp13", "lanes": "96,97,98,99,100,101,102,103", - "mtu": "9100", - "speed": "100000" + "mtu": "9100" } } }