Skip to content

Commit

Permalink
mellanox_db_migrator => mellanox_buffer_migrator
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Sun committed Jul 18, 2020
1 parent daf8b8a commit 36ee64e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions scripts/db_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def __init__(self, namespace, socket=None):
self.asic_type = asic_type

if asic_type == "mellanox":
from mellanox_db_migrator import MellanoxDbMigrator
self.mellanox_migrator = MellanoxDbMigrator(self.configDB)
from mellanox_buffer_migrator import MellanoxBufferMigrator
self.mellanox_buffer_migrator = MellanoxBufferMigrator(self.configDB)

def migrate_pfc_wd_table(self):
'''
Expand Down Expand Up @@ -192,7 +192,7 @@ def version_1_0_2(self):
log_info('Handling version_1_0_2')
# Check ASIC type, if Mellanox platform then need DB migration
if self.asic_type == "mellanox":
if self.mellanox_migrator.mlnx_migrate_buffer_pool_size('version_1_0_2', 'version_1_0_3'):
if self.mellanox_buffer_migrator.mlnx_migrate_buffer_pool_size('version_1_0_2', 'version_1_0_3'):
self.set_version('version_1_0_3')
else:
self.set_version('version_1_0_3')
Expand All @@ -206,7 +206,7 @@ def version_1_0_3(self):

# Check ASIC type, if Mellanox platform then need DB migration
if self.asic_type == "mellanox":
if self.mellanox_migrator.mlnx_migrate_buffer_pool_size('version_1_0_3', 'version_1_0_4') and self.mellanox_migrator.mlnx_migrate_buffer_profile('version_1_0_3', 'version_1_0_4'):
if self.mellanox_buffer_migrator.mlnx_migrate_buffer_pool_size('version_1_0_3', 'version_1_0_4') and self.mellanox_buffer_migrator.mlnx_migrate_buffer_profile('version_1_0_3', 'version_1_0_4'):
self.set_version('version_1_0_4')
else:
self.set_version('version_1_0_4')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def log_error(msg):
syslog.closelog()


class MellanoxDbMigrator():
class MellanoxBufferMigrator():
def __init__(self, configDB):
self.configDB = configDB

Expand Down

0 comments on commit 36ee64e

Please sign in to comment.