Skip to content

Commit e70dfc7

Browse files
Modify test case to retrieve data from config_db
as it was before PR sonic-net#10362. Signed-off-by: Suvarna Meenakshi <[email protected]>
1 parent a929919 commit e70dfc7

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

src/sonic-config-engine/tests/test_cfggen.py

+34-34
Original file line numberDiff line numberDiff line change
@@ -564,46 +564,46 @@ def test_minigraph_neighbor_interfaces(self):
564564
)
565565

566566
def test_minigraph_neighbor_interfaces_config_db(self):
567-
# test to check if PORT table is retrieved from config_db
567+
# test to check if PORT table is retrieved from config_db when port_config.ini is not specified
568568
argument = '-m "' + self.sample_graph_simple_case + '" -v "PORT"'
569569
output = self.run_script(argument)
570570

571571
self.assertEqual(
572572
utils.to_dict(output.strip()),
573573
utils.to_dict(
574-
"{'Ethernet8': {'lanes': '37,38,39,40', 'description': 'Interface description', 'tpid': '0x8100', 'admin_status': 'up', 'mtu': '9100', 'alias': 'fortyGigE0/8', 'pfc_asym': 'off', 'autoneg': 'on', 'speed': '40000', 'mux_cable': 'true'}, "
575-
"'Ethernet0': {'lanes': '29,30,31,32', 'description': 'config_db:switch-01t1:port1', 'tpid': '0x8100', 'admin_status': 'up', 'mtu': '9100', 'alias': 'fortyGigE0/0', 'pfc_asym': 'off', 'autoneg': 'on', 'speed': '10000'}, "
576-
"'Ethernet4': {'lanes': '25,26,27,28', 'description': 'config_db:server1:port1', 'tpid': '0x8100', 'admin_status': 'up', 'mtu': '9100', 'alias': 'fortyGigE0/4', 'pfc_asym': 'off', 'autoneg': 'on', 'speed': '25000', 'mux_cable': 'true'}, "
577-
"'Ethernet108': {'lanes': '81,82,83,84', 'description': 'config_db:fortyGigE0/108', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
578-
"'Ethernet100': {'lanes': '125,126,127,128', 'description': 'config_db:fortyGigE0/100', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/100', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
579-
"'Ethernet104': {'lanes': '85,86,87,88', 'description': 'config_db:fortyGigE0/104', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
580-
"'Ethernet68': {'lanes': '69,70,71,72', 'description': 'config_db:fortyGigE0/68', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/68', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
581-
"'Ethernet96': {'lanes': '121,122,123,124', 'description': 'config_db:fortyGigE0/96', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/96', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
582-
"'Ethernet124': {'lanes': '101,102,103,104', 'description': 'config_db:fortyGigE0/124', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
583-
"'Ethernet92': {'lanes': '113,114,115,116', 'description': 'config_db:fortyGigE0/92', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/92', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
584-
"'Ethernet120': {'lanes': '97,98,99,100', 'description': 'config_db:fortyGigE0/120', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/120', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
585-
"'Ethernet52': {'lanes': '53,54,55,56', 'description': 'config_db:fortyGigE0/52', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/52', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
586-
"'Ethernet56': {'lanes': '61,62,63,64', 'description': 'config_db:fortyGigE0/56', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/56', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
587-
"'Ethernet76': {'lanes': '73,74,75,76', 'description': 'config_db:fortyGigE0/76', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/76', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
588-
"'Ethernet72': {'lanes': '77,78,79,80', 'description': 'config_db:fortyGigE0/72', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/72', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
589-
"'Ethernet64': {'lanes': '65,66,67,68', 'description': 'config_db:fortyGigE0/64', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/64', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
590-
"'Ethernet32': {'lanes': '9,10,11,12', 'description': 'config_db:fortyGigE0/32', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/32', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
591-
"'Ethernet16': {'lanes': '41,42,43,44', 'description': 'config_db:fortyGigE0/16', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/16', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
592-
"'Ethernet36': {'lanes': '13,14,15,16', 'description': 'config_db:fortyGigE0/36', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/36', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
593-
"'Ethernet12': {'lanes': '33,34,35,36', 'description': 'Interface description', 'tpid': '0x8100', 'admin_status': 'up', 'mtu': '9100', 'alias': 'fortyGigE0/12', 'pfc_asym': 'off', 'autoneg': 'on', 'speed': '10000'}, "
594-
"'Ethernet88': {'lanes': '117,118,119,120', 'description': 'config_db:fortyGigE0/88', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/88', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
595-
"'Ethernet116': {'lanes': '93,94,95,96', 'description': 'config_db:fortyGigE0/116', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/116', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
596-
"'Ethernet80': {'lanes': '105,106,107,108', 'description': 'config_db:fortyGigE0/80', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/80', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
597-
"'Ethernet112': {'lanes': '89,90,91,92', 'description': 'config_db:fortyGigE0/112', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/112', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
598-
"'Ethernet84': {'lanes': '109,110,111,112', 'description': 'config_db:fortyGigE0/84', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/84', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
599-
"'Ethernet48': {'lanes': '49,50,51,52', 'description': 'config_db:fortyGigE0/48', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/48', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
600-
"'Ethernet44': {'lanes': '17,18,19,20', 'description': 'config_db:fortyGigE0/44', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/44', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
601-
"'Ethernet40': {'lanes': '21,22,23,24', 'description': 'config_db:fortyGigE0/40', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/40', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
602-
"'Ethernet28': {'lanes': '1,2,3,4', 'description': 'config_db:fortyGigE0/28', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/28', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
603-
"'Ethernet60': {'lanes': '57,58,59,60', 'description': 'config_db:fortyGigE0/60', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/60', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
604-
"'Ethernet20': {'lanes': '45,46,47,48', 'description': 'config_db:fortyGigE0/20', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/20', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}, "
605-
"'Ethernet24': {'lanes': '5,6,7,8', 'description': 'config_db:fortyGigE0/24', 'tpid': '0x8100', 'mtu': '9100', 'alias': 'fortyGigE0/24', 'pfc_asym': 'off', 'speed': '100000', 'fec': 'rs'}}"
606-
)
574+
"{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'config_db:switch-01t1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/0', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}, "
575+
"'Ethernet4': {'lanes': '25,26,27,28', 'description': 'config_db:server1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '25000', 'autoneg': 'on', 'mux_cable': 'true'}, "
576+
"'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'}, "
577+
"'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'}, "
578+
"'Ethernet16': {'alias': 'fortyGigE0/16', 'pfc_asym': 'off', 'lanes': '41,42,43,44', 'description': 'config_db:fortyGigE0/16', 'mtu': '9100', 'tpid': '0x8100'}, "
579+
"'Ethernet20': {'alias': 'fortyGigE0/20', 'pfc_asym': 'off', 'lanes': '45,46,47,48', 'description': 'config_db:fortyGigE0/20', 'mtu': '9100', 'tpid': '0x8100'}, "
580+
"'Ethernet24': {'alias': 'fortyGigE0/24', 'pfc_asym': 'off', 'lanes': '5,6,7,8', 'description': 'config_db:fortyGigE0/24', 'mtu': '9100', 'tpid': '0x8100'}, "
581+
"'Ethernet28': {'alias': 'fortyGigE0/28', 'pfc_asym': 'off', 'lanes': '1,2,3,4', 'description': 'config_db:fortyGigE0/28', 'mtu': '9100', 'tpid': '0x8100'}, "
582+
"'Ethernet32': {'alias': 'fortyGigE0/32', 'pfc_asym': 'off', 'lanes': '9,10,11,12', 'description': 'config_db:fortyGigE0/32', 'mtu': '9100', 'tpid': '0x8100'}, "
583+
"'Ethernet36': {'alias': 'fortyGigE0/36', 'pfc_asym': 'off', 'lanes': '13,14,15,16', 'description': 'config_db:fortyGigE0/36', 'mtu': '9100', 'tpid': '0x8100'}, "
584+
"'Ethernet40': {'alias': 'fortyGigE0/40', 'pfc_asym': 'off', 'lanes': '21,22,23,24', 'description': 'config_db:fortyGigE0/40', 'mtu': '9100', 'tpid': '0x8100'}, "
585+
"'Ethernet44': {'alias': 'fortyGigE0/44', 'pfc_asym': 'off', 'lanes': '17,18,19,20', 'description': 'config_db:fortyGigE0/44', 'mtu': '9100', 'tpid': '0x8100'}, "
586+
"'Ethernet48': {'alias': 'fortyGigE0/48', 'pfc_asym': 'off', 'lanes': '49,50,51,52', 'description': 'config_db:fortyGigE0/48', 'mtu': '9100', 'tpid': '0x8100'}, "
587+
"'Ethernet52': {'alias': 'fortyGigE0/52', 'pfc_asym': 'off', 'lanes': '53,54,55,56', 'description': 'config_db:fortyGigE0/52', 'mtu': '9100', 'tpid': '0x8100'}, "
588+
"'Ethernet56': {'alias': 'fortyGigE0/56', 'pfc_asym': 'off', 'lanes': '61,62,63,64', 'description': 'config_db:fortyGigE0/56', 'mtu': '9100', 'tpid': '0x8100'}, "
589+
"'Ethernet60': {'alias': 'fortyGigE0/60', 'pfc_asym': 'off', 'lanes': '57,58,59,60', 'description': 'config_db:fortyGigE0/60', 'mtu': '9100', 'tpid': '0x8100'}, "
590+
"'Ethernet64': {'alias': 'fortyGigE0/64', 'pfc_asym': 'off', 'lanes': '65,66,67,68', 'description': 'config_db:fortyGigE0/64', 'mtu': '9100', 'tpid': '0x8100'}, "
591+
"'Ethernet68': {'alias': 'fortyGigE0/68', 'pfc_asym': 'off', 'lanes': '69,70,71,72', 'description': 'config_db:fortyGigE0/68', 'mtu': '9100', 'tpid': '0x8100'}, "
592+
"'Ethernet72': {'alias': 'fortyGigE0/72', 'pfc_asym': 'off', 'lanes': '77,78,79,80', 'description': 'config_db:fortyGigE0/72', 'mtu': '9100', 'tpid': '0x8100'}, "
593+
"'Ethernet76': {'alias': 'fortyGigE0/76', 'pfc_asym': 'off', 'lanes': '73,74,75,76', 'description': 'config_db:fortyGigE0/76', 'mtu': '9100', 'tpid': '0x8100'}, "
594+
"'Ethernet80': {'alias': 'fortyGigE0/80', 'pfc_asym': 'off', 'lanes': '105,106,107,108', 'description': 'config_db:fortyGigE0/80', 'mtu': '9100', 'tpid': '0x8100'}, "
595+
"'Ethernet84': {'alias': 'fortyGigE0/84', 'pfc_asym': 'off', 'lanes': '109,110,111,112', 'description': 'config_db:fortyGigE0/84', 'mtu': '9100', 'tpid': '0x8100'}, "
596+
"'Ethernet88': {'alias': 'fortyGigE0/88', 'pfc_asym': 'off', 'lanes': '117,118,119,120', 'description': 'config_db:fortyGigE0/88', 'mtu': '9100', 'tpid': '0x8100'}, "
597+
"'Ethernet92': {'alias': 'fortyGigE0/92', 'pfc_asym': 'off', 'lanes': '113,114,115,116', 'description': 'config_db:fortyGigE0/92', 'mtu': '9100', 'tpid': '0x8100'}, "
598+
"'Ethernet96': {'alias': 'fortyGigE0/96', 'pfc_asym': 'off', 'lanes': '121,122,123,124', 'description': 'config_db:fortyGigE0/96', 'mtu': '9100', 'tpid': '0x8100'}, "
599+
"'Ethernet100': {'alias': 'fortyGigE0/100', 'pfc_asym': 'off', 'lanes': '125,126,127,128', 'description': 'config_db:fortyGigE0/100', 'mtu': '9100', 'tpid': '0x8100'}, "
600+
"'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'config_db:fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100'}, "
601+
"'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'config_db:fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100'}, "
602+
"'Ethernet112': {'alias': 'fortyGigE0/112', 'pfc_asym': 'off', 'lanes': '89,90,91,92', 'description': 'config_db:fortyGigE0/112', 'mtu': '9100', 'tpid': '0x8100'}, "
603+
"'Ethernet116': {'alias': 'fortyGigE0/116', 'pfc_asym': 'off', 'lanes': '93,94,95,96', 'description': 'config_db:fortyGigE0/116', 'mtu': '9100', 'tpid': '0x8100'}, "
604+
"'Ethernet120': {'alias': 'fortyGigE0/120', 'pfc_asym': 'off', 'lanes': '97,98,99,100', 'description': 'config_db:fortyGigE0/120', 'mtu': '9100', 'tpid': '0x8100'}, "
605+
"'Ethernet124': {'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'lanes': '101,102,103,104', 'description': 'config_db:fortyGigE0/124', 'mtu': '9100', 'tpid': '0x8100'}}"
606+
)
607607
)
608608

609609
def test_minigraph_extra_ethernet_interfaces(self, **kwargs):

0 commit comments

Comments
 (0)