@@ -44,7 +44,7 @@ def __init__(self, namespace, socket=None):
44
44
none-zero values.
45
45
build: sequentially increase within a minor version domain.
46
46
"""
47
- self .CURRENT_VERSION = 'version_2_0_5 '
47
+ self .CURRENT_VERSION = 'version_3_0_5 '
48
48
49
49
self .TABLE_NAME = 'VERSIONS'
50
50
self .TABLE_KEY = 'DATABASE'
@@ -600,13 +600,13 @@ def version_1_0_6(self):
600
600
abandon_method = self .mellanox_buffer_migrator .mlnx_abandon_pending_buffer_configuration
601
601
append_method = self .mellanox_buffer_migrator .mlnx_append_item_on_pending_configuration_list
602
602
603
- if self .mellanox_buffer_migrator .mlnx_migrate_buffer_pool_size ('version_1_0_6' , 'version_2_0_0 ' ) \
604
- and self .mellanox_buffer_migrator .mlnx_migrate_buffer_profile ('version_1_0_6' , 'version_2_0_0 ' ) \
603
+ if self .mellanox_buffer_migrator .mlnx_migrate_buffer_pool_size ('version_1_0_6' , 'version_3_0_0 ' ) \
604
+ and self .mellanox_buffer_migrator .mlnx_migrate_buffer_profile ('version_1_0_6' , 'version_3_0_0 ' ) \
605
605
and (not self .mellanox_buffer_migrator .mlnx_is_buffer_model_dynamic () or \
606
606
self .migrate_config_db_buffer_tables_for_dynamic_calculation (speed_list , cable_len_list , '0' , abandon_method , append_method )) \
607
607
and self .mellanox_buffer_migrator .mlnx_flush_new_buffer_configuration () \
608
608
and self .prepare_dynamic_buffer_for_warm_reboot (buffer_pools , buffer_profiles , buffer_pgs ):
609
- self .set_version ('version_2_0_0 ' )
609
+ self .set_version ('version_3_0_0 ' )
610
610
else :
611
611
self .prepare_dynamic_buffer_for_warm_reboot ()
612
612
@@ -615,59 +615,59 @@ def version_1_0_6(self):
615
615
self .configDB .set_entry ('DEVICE_METADATA' , 'localhost' , metadata )
616
616
log .log_notice ('Setting buffer_model to traditional' )
617
617
618
- self .set_version ('version_2_0_0 ' )
618
+ self .set_version ('version_3_0_0 ' )
619
619
620
- return 'version_2_0_0 '
620
+ return 'version_3_0_0 '
621
621
622
- def version_2_0_0 (self ):
622
+ def version_3_0_0 (self ):
623
623
"""
624
- Version 2_0_0 .
624
+ Version 3_0_0 .
625
625
"""
626
- log .log_info ('Handling version_2_0_0 ' )
626
+ log .log_info ('Handling version_3_0_0 ' )
627
627
self .migrate_config_db_port_table_for_auto_neg ()
628
- self .set_version ('version_2_0_1 ' )
629
- return 'version_2_0_1 '
628
+ self .set_version ('version_3_0_1 ' )
629
+ return 'version_3_0_1 '
630
630
631
- def version_2_0_1 (self ):
631
+ def version_3_0_1 (self ):
632
632
"""
633
- Version 2_0_1 .
633
+ Version 3_0_1 .
634
634
"""
635
- log .log_info ('Handling version_2_0_1 ' )
635
+ log .log_info ('Handling version_3_0_1 ' )
636
636
warmreboot_state = self .stateDB .get (self .stateDB .STATE_DB , 'WARM_RESTART_ENABLE_TABLE|system' , 'enable' )
637
637
638
638
if warmreboot_state != 'true' :
639
639
portchannel_table = self .configDB .get_table ('PORTCHANNEL' )
640
640
for name , data in portchannel_table .items ():
641
641
data ['lacp_key' ] = 'auto'
642
642
self .configDB .set_entry ('PORTCHANNEL' , name , data )
643
- self .set_version ('version_2_0_2 ' )
644
- return 'version_2_0_2 '
643
+ self .set_version ('version_3_0_2 ' )
644
+ return 'version_3_0_2 '
645
645
646
- def version_2_0_2 (self ):
646
+ def version_3_0_2 (self ):
647
647
"""
648
- Version 2_0_2 .
648
+ Version 3_0_2 .
649
649
"""
650
- log .log_info ('Handling version_2_0_2 ' )
650
+ log .log_info ('Handling version_3_0_2 ' )
651
651
self .migrate_qos_fieldval_reference_format ()
652
- self .set_version ('version_2_0_3 ' )
653
- return 'version_2_0_3 '
652
+ self .set_version ('version_3_0_3 ' )
653
+ return 'version_3_0_3 '
654
654
655
655
656
- def version_2_0_3 (self ):
656
+ def version_3_0_3 (self ):
657
657
"""
658
- Version 2_0_3
658
+ Version 3_0_3
659
659
"""
660
- log .log_info ('Handling version_2_0_3 ' )
660
+ log .log_info ('Handling version_3_0_3 ' )
661
661
if self .asic_type == "mellanox" :
662
662
self .mellanox_buffer_migrator .mlnx_reclaiming_unused_buffer ()
663
- self .set_version ('version_2_0_4 ' )
664
- return 'version_2_0_4 '
663
+ self .set_version ('version_3_0_4 ' )
664
+ return 'version_3_0_4 '
665
665
666
- def version_2_0_4 (self ):
666
+ def version_3_0_4 (self ):
667
667
"""
668
- Version 2_0_4
668
+ Version 3_0_4
669
669
"""
670
- log .log_info ('Handling version_2_0_4 ' )
670
+ log .log_info ('Handling version_3_0_4 ' )
671
671
# Migrate "pfc_enable" to "pfc_enable" and "pfcwd_sw_enable"
672
672
# 1. pfc_enable means enable pfc on certain queues
673
673
# 2. pfcwd_sw_enable means enable PFC software watchdog on certain queues
@@ -677,14 +677,13 @@ def version_2_0_4(self):
677
677
if 'pfc_enable' in v :
678
678
v ['pfcwd_sw_enable' ] = v ['pfc_enable' ]
679
679
self .configDB .set_entry ('PORT_QOS_MAP' , k , v )
680
+ return 'version_3_0_5'
680
681
681
- return 'version_2_0_5'
682
-
683
- def version_2_0_5 (self ):
682
+ def version_3_0_5 (self ):
684
683
"""
685
684
Current latest version. Nothing to do here.
686
685
"""
687
- log .log_info ('Handling version_2_0_5 ' )
686
+ log .log_info ('Handling version_3_0_5 ' )
688
687
return None
689
688
690
689
def get_version (self ):
0 commit comments