Skip to content

Commit

Permalink
fixing db_migrator
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhammadUmarAsad committed Feb 18, 2023
1 parent 6ea6025 commit d77508f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/db_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,12 +449,12 @@ def migrate_config_db_port_table_for_switchport_mode(self):
vlan_member_table = self.configDB.get_table('VLAN_MEMBER')
for key, value in port_table.items():
if 'mode' in value:
self.configDB.set('{}|{}'.format("PORT", key), 'mode', value['mode'])
self.configDB.set(self.configDB.CONFIG_DB, '{}|{}'.format("PORT", key), 'mode', value['mode'])
else:
if key in vlan_member_table.keys():
self.configDB.set('{}|{}'.format("PORT", key), 'mode', 'trunk')
self.configDB.set(self.configDB.CONFIG_DB, '{}|{}'.format("PORT", key), 'mode', 'trunk')
else:
self.configDB.set('{}|{}'.format('PORT', key), 'mode', 'routed')
self.configDB.set(self.configDB.CONFIG_DB, '{}|{}'.format('PORT', key), 'mode', 'routed')

def migrate_qos_db_fieldval_reference_remove(self, table_list, db, db_num, db_delimeter):
for pair in table_list:
Expand Down

0 comments on commit d77508f

Please sign in to comment.