@@ -822,6 +822,23 @@ def migrate_flex_counter_delay_status_removal(self):
822
822
self .configDB .set_entry ('FLEX_COUNTER_TABLE' , obj , flex_counter )
823
823
824
824
825
+ def migrate_frr_separate_config_mode (self ):
826
+ """
827
+ Modify docker_routing_config_mode field.
828
+ """
829
+ log .log_notice ('Migrate FRR Config mode configuration' )
830
+ metadata = self .configDB .get_entry ('DEVICE_METADATA' , 'localhost' )
831
+ #device_metadata_data = self.config_src_data["DEVICE_METADATA"]["localhost"]
832
+ #metadata['docker_router_config_mode'] = "unified"
833
+ if 'docker_routing_config_mode' not in metadata :
834
+ metadata ['docker_routing_config_mode' ] = "unified"
835
+ self .configDB .set_entry ('DEVICE_METADATA' , 'localhost' , metadata )
836
+ else :
837
+ if metadata ['docker_routing_config_mode' ] == "separated" :
838
+ metadata ['docker_routing_config_mode' ] = "unified"
839
+ self .configDB .set_entry ('DEVICE_METADATA' , 'localhost' , metadata )
840
+
841
+
825
842
def migrate_sflow_table (self ):
826
843
"""
827
844
Migrate "SFLOW_TABLE" and "SFLOW_SESSION_TABLE" to update default sample_direction
@@ -1357,6 +1374,8 @@ def common_migration_ops(self):
1357
1374
self .migrate_tacplus ()
1358
1375
self .migrate_aaa ()
1359
1376
1377
+ self .migrate_frr_separate_config_mode ()
1378
+
1360
1379
def migrate (self ):
1361
1380
version = self .get_version ()
1362
1381
log .log_info ('Upgrading from version ' + version )
0 commit comments