diff --git a/scripts/db_migrator.py b/scripts/db_migrator.py index 9d5c68a693..ddd1290767 100755 --- a/scripts/db_migrator.py +++ b/scripts/db_migrator.py @@ -44,7 +44,7 @@ def __init__(self, namespace, socket=None): none-zero values. build: sequentially increase within a minor version domain. """ - self.CURRENT_VERSION = 'version_3_0_5' + self.CURRENT_VERSION = 'version_3_0_6' self.TABLE_NAME = 'VERSIONS' self.TABLE_KEY = 'DATABASE' @@ -698,9 +698,17 @@ def version_3_0_4(self): def version_3_0_5(self): """ - Current latest version. Nothing to do here. + Version 3_0_5 """ log.log_info('Handling version_3_0_5') + self.migrate_port_qos_map_global() + return 'version_3_0_6' + + def version_3_0_6(self): + """ + Current latest version. Nothing to do here. + """ + log.log_info('Handling version_3_0_6') return None def get_version(self): @@ -741,8 +749,6 @@ def common_migration_ops(self): self.migrate_mgmt_ports_on_s6100() else: log.log_notice("Asic Type: {}, Hwsku: {}".format(self.asic_type, self.hwsku)) - - self.migrate_port_qos_map_global() def migrate(self): version = self.get_version() diff --git a/tests/db_migrator_input/config_db/qos_map_table_global_expected.json b/tests/db_migrator_input/config_db/qos_map_table_global_expected.json index 8c3c5b3961..c7fea9c013 100644 --- a/tests/db_migrator_input/config_db/qos_map_table_global_expected.json +++ b/tests/db_migrator_input/config_db/qos_map_table_global_expected.json @@ -1,6 +1,6 @@ { "VERSIONS|DATABASE": { - "VERSION": "version_2_0_5" + "VERSION": "version_3_0_6" }, "DSCP_TO_TC_MAP|AZURE": { "0": "0", diff --git a/tests/db_migrator_input/config_db/qos_map_table_global_input.json b/tests/db_migrator_input/config_db/qos_map_table_global_input.json index b0f2339b0b..0ca51a4525 100644 --- a/tests/db_migrator_input/config_db/qos_map_table_global_input.json +++ b/tests/db_migrator_input/config_db/qos_map_table_global_input.json @@ -1,6 +1,6 @@ { "VERSIONS|DATABASE": { - "VERSION": "version_2_0_5" + "VERSION": "version_3_0_5" }, "DSCP_TO_TC_MAP|AZURE": { "0": "0",