File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,19 @@ def migrate_intf_table(self):
145
145
self .appDB .set (self .appDB .APPL_DB , table , 'NULL' , 'NULL' )
146
146
if_db .append (if_name )
147
147
148
+ def migrate_copp_table (self ):
149
+ '''
150
+ Delete the existing COPP table
151
+ '''
152
+ if self .appDB is None :
153
+ return
154
+
155
+ keys = self .appDB .keys (self .appDB .APPL_DB , "COPP_TABLE:*" )
156
+ if keys is None :
157
+ return
158
+ for copp_key in keys :
159
+ self .appDB .delete (self .appDB .APPL_DB , copp_key )
160
+
148
161
def version_unknown (self ):
149
162
"""
150
163
version_unknown tracks all SONiC versions that doesn't have a version
@@ -248,6 +261,8 @@ def common_migration_ops(self):
248
261
for init_table_key , init_table_val in table_val .items ():
249
262
self .configDB .set_entry (init_cfg_table , init_table_key , init_table_val )
250
263
264
+ self .migrate_copp_table ()
265
+
251
266
def migrate (self ):
252
267
version = self .get_version ()
253
268
log .log_info ('Upgrading from version ' + version )
You can’t perform that action at this time.
0 commit comments