[show]: Remove default commands; add missing docstrings#121
[show]: Remove default commands; add missing docstrings#121jleveque merged 2 commits intosonic-net:masterfrom jleveque:fixes
Conversation
|
@rodnymolina: Please review. |
rodnymolina
left a comment
There was a problem hiding this comment.
Joe, couple of questions:
-
Your goal with these changes is to bring back the 'tabs' functionality, right?
-
If we are not using 'default' feature, why are we still making use of AliasedGroup? Shouldn't we simply rely on Click.group decorator instead?
|
@rodnymolina: This will fix the tab completion on the However, there is a bigger issue that was introduced with the .deb -> .whl change that breaks all tab completion. So, I plan to try to enhance our build system in order to install sonic-utilities as a .deb package again. The .whl package has more limitations than the .deb package and copying files (i.e., our bash_completion files) outside of the dist-packages directory is impossible. |
|
@rodnymolina: With regards to AliasedGroup: We should no longer rely on DefaultGroup -- AliasedGroup should extend Click.group directly, OR we need to fix/write our own DefaultGroup that doesn't break tab completion. |
Fixes the following crash introduced by sonic-net/sonic-platform-daemons#102: ``` 01:33:00 ______________________ test_updater_thermal_check_min_max ______________________ 01:33:00 01:33:00 def test_updater_thermal_check_min_max(): 01:33:00 chassis = MockChassis() 01:33:00 01:33:00 thermal = MockThermal() 01:33:00 chassis.get_all_thermals().append(thermal) 01:33:00 01:33:00 chassis.set_modular_chassis(True) 01:33:00 chassis.set_my_slot(1) 01:33:00 temperature_updater = TemperatureUpdater(SYSLOG_IDENTIFIER, chassis) 01:33:00 01:33:00 temperature_updater.update() 01:33:00 slot_dict = temperature_updater.chassis_table.get('Thermal 1') 01:33:00 > assert slot_dict['minimum_temperature'] == str(thermal.get_minimum_recorded()) 01:33:00 E TypeError: 'NoneType' object has no attribute '__getitem__' 01:33:00 01:33:00 tests/test_thermalctld.py:341: TypeError ``` Signed-off-by: Petro Bratash <petrox.bratash@intel.com> Signed-off-by: Petro Bratash <petrox.bratash@intel.com>
[EEPROM] Add new function part_number_str to TlvInfoDecoder (sonic-net#121) Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
…t#121) Add a new function to TlvInfoDecoder which can return device part number as a string.
sonic-net#121) ```<br>* b9b6b954 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-17) [Sonic Automation] * 8ceba38 - (origin/202411) [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
No description provided.