Skip to content

Commit

Permalink
Migrate on version
Browse files Browse the repository at this point in the history
  • Loading branch information
bingwang-ms committed Jul 21, 2022
1 parent f7a7ad0 commit 610414f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
14 changes: 10 additions & 4 deletions scripts/db_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"VERSIONS|DATABASE": {
"VERSION": "version_2_0_5"
"VERSION": "version_3_0_6"
},
"DSCP_TO_TC_MAP|AZURE": {
"0": "0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"VERSIONS|DATABASE": {
"VERSION": "version_2_0_5"
"VERSION": "version_3_0_5"
},
"DSCP_TO_TC_MAP|AZURE": {
"0": "0",
Expand Down

0 comments on commit 610414f

Please sign in to comment.