-
Notifications
You must be signed in to change notification settings - Fork 688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fwutil Auto-update support #1165
Conversation
This pull request introduces 2 alerts when merging 8a3a278 into 561d133 - view on LGTM.com new alerts:
|
* Add 'show' CLI for system-health feature Signed-off-by: Shlomi Bitton <shlomibi@mellanox.com> * Add unit test for 'system-health' feature, add support for testing in 'show' script, Fix comments Signed-off-by: Shlomi Bitton <shlomibi@mellanox.com> * Fix additional comments * Fix comments * Update Command-Reference.md Add a CLI reference for system-health feature. * Fix LGTM alerts * Fix comment Change 'Ignore' to 'Ignored' * Update Command-Reference.md Fix example output * Update Command-Reference.md * Change 'summary' output and adapt test and reference to the new change * Update main.py * Fix multiline output for expected output * keep output aligned * Fix import for unit testing after community change * Add clicommon for @cli.group after community change * Align changes in the feature to the CLI on commit sonic-net/sonic-buildimage@8ea2ab5 Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com> * Update main.py * Move new group CLI into a separate file * Organize imports per PEP8 standards * Organize imports per PEP8 standards * Reformat docstring for readability
This pull request introduces 2 alerts when merging aa119ff into a71c72b - view on LGTM.com new alerts:
|
…onic-net#1162) Previous code only enumerate on distinct neighbors, thus only one port is shown for a neighbor. Signed-off-by: Guohan Lu <lguohan@gmail.com>
…1155) * Update lib.py * Keep the code format align see add spaces for special symbols * remove unused code
This pull request introduces 2 alerts when merging 921e89c into 3a7457c - view on LGTM.com new alerts:
|
The 'ipaddress.ip_interface' accepts only unicode str as input, which is default in python3. However, an exception will raise when running in python2. This commit fix the issue. Signed-off-by: bingwang <bingwang@microsoft.com>
fwutil/lib.py
Outdated
module_name = component[-5] | ||
component_name = component[-4] | ||
|
||
if self.is_modular_chassis(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the module_name is N/A, for modular chassis, it fails since module_component_map is being used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch! fixed in the latest.
fwutil/log.py
Outdated
else: | ||
if boot is None: | ||
log.log_error( | ||
status_template.format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has to be exception_template?
…-net#1157) * Add watermark testcases and mock counters Signed-off-by: Neetha John <nejo@microsoft.com>
…xists (sonic-net#1173) Signed-off-by: Jing Kan jika@microsoft.com
sonic-net#1166) Signed-off-by: Jing Kan jika@microsoft.com
Signed-off-by: Jing Kan jika@microsoft.com
* Add `config vlan proxy_arp <vlan id> <enable/disable>` * Add proxy ARP info to `show vlan brief`
…unters. (sonic-net#1180) * Fix for Issue: sonic-net/sonic-buildimage#5655 Signed-off-by: Abhishek Dosi <abdosi@microsoft.com> * Updated the the fix for pfc/queue counters also. Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
fwutil/lib.py
Outdated
[ | ||
chassis_name, | ||
module_name, | ||
chassis_component_name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be module_component_name instead chassis_component_name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, fixed in the latest pr.
…et#1174) Counter polling is enabled via enable_counters script when booting into new image and these configuration is written to config_db. However, subsequent fast-reboot into the same image will have counter polling enabled by default. This affect fast-reboot time. As a workaround, we will disable counter poll when entering fast-reboot. singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
…t#1182) stdeb.cfg was needed for building Debian package. Now that we build a Python wheel, it is no longer used.
…and remove all the decode() (sonic-net#1187)
* [CLI][show][platform] Added ASIC count in the output. Also added option for JSON output.
Set min log priority of fwutil to INFO Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
Add LICENSE file, remove ThirdPartyLicenses.txt, as most of the files it referred to have moved to the sonic-platform-common repo, and sfputil has been completely refactored.
…cted (sonic-net#1188) Remove `device2interface_dict` in `expect` as it is no longer needed. Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
1. show fg-nhg-hash-view (shows the current hash bucket view of fg nhg) 2. show fg-nhg-active-hops (shows which set of next-hops are active)
…et#1127) - What I did Updated the CRM show/config commands to handle the multi-ASIC platforms. - How I did it The threshold values configured by user is programmed in the CONFIG_DB in all the namespaces. While show/displaying the thresholds, it is retrieved from the database docker in case of single asic, and from the first namespace docker eg: database0 in case of multi-asic platforms. The crm resources usage details are retrieved from the databases in the respective namespaces and displayed with the additional "ASIC name" as a header. - How to verify it Verified on the single and multi-asic devices.
…-net#1225) * Remove root check for consutil connect * Add unit tests Signed-off-by: Jing Kan jika@microsoft.com
…#1145) * Configure and show for platform chassis_modules Adding support for below CLI commands $config plaform chassis_modules admin_down <chassis_module_name> <instance> <module_type> $show platform chassis_modules ``` admin@sonic:~$ show chassis-modules status Name Description Slot Oper-Status Admin-Status ------------- ----------------- ------ ------------- -------------- CONTROL-CARD1 cpm2-ixr 16 Online up FABRIC-CARD1 SFM1 17 Empty up FABRIC-CARD2 SFM2 18 Empty up FABRIC-CARD3 SFM3 19 Empty up FABRIC-CARD4 SFM4 20 Empty up FABRIC-CARD5 SFM5 21 Online up FABRIC-CARD6 SFM6 22 Empty up LINE-CARD1 imm36-400g-qsfpdd 1 Online down LINE-CARD2 imm36-400g-qsfpdd 2 Online up LINE-CARD3 line-card 3 Empty up LINE-CARD4 line-card 4 Empty up admin@sonic:~$ show chassis-modules status LINE-CARD1 Name Description Slot Oper-Status Admin-Status ------------- ----------------- ------ ------------- -------------- LINE-CARD1 imm36-400g-qsfpdd 1 Online down ```
This pull request introduces 1 alert when merging 5f42bbe into 40377d3 - view on LGTM.com new alerts:
|
…platforms (sonic-net#1203) When ports are specified as option to 'pfcwd start', port validation fails on multi ASIC platform as the validation logic is executed on each ASIC namespace. Validation for valid ports fails as the port exits in only one namespace and not in others. Changed logic to perform port validation after collecting ports from all namespaces. If port validation fails there is no config change on other valid ports
Added DB migrator script for removing old copp APP DB entries. Co-authored-by: dgsudharsan <sudharsan_gopalarat@dell.com>
Add mVRF support and options to CLICK CLI to allow mVRF configuration for sFlow collectors Signed-off-by: Garrick He <garrick_he@dell.com>
If FEATURE table is not present in CONFIG_DB. When I issue - "config feature state nat enabled", seeing below errors root@sonic:/home/admin# config feature state nat enabled Feature 'nat' doesn't exist Traceback (most recent call last): File "/usr/local/bin/config", line 10, in sys.exit(config()) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in call return self.main(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 64, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/config/feature.py", line 26, in feature_state sys.exit(1) NameError: global name 'sys' is not defined root@sonic:/home/admin# Fix: Added 'import sys' in feature.py file. After Fix: root@sonic:/home/admin# config feature state nat enabled Feature 'nat' doesn't exist root@sonic:/home/admin# Signed-off-by: Akhilesh Samineni akhilesh.samineni@broadcom.com Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
Vlan interfaces need capitalized "V" in "Vlan" to be accepted.
…ic-net#1204) Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
…ble (sonic-net#1224) - What I did Updates to bgp config and show commands with the movement of internal bgp sessions to a new table BGP_INTERNAL_NEIGHBOR table. With the introduction of BGP_INERNAL_NEIGHBOR table, the user cannot start/stop/remove internal neighbors which I feel is not needed as these internal bgp sessions which are supposed to be UP always. - How I did it Updated the show/bgp util so that it gets the internal bgp sessions from BGP_INTERNAL_NEIGHBOR table. Removed the API's to get the local_as in config/bgp which is not required now. - How to verify it Made sure that the output remain same with the new internal bgp neighbor table.
…x shebangs in scripts (sonic-net#1233) Some tests were trimming the last item from system PATH, but they never appended anything to it, thus these tests were trimming valid entries from the tail of the system path, which in turn caused scripts with shebangs like `#!/usr/bin/env python` to fail, because once `/usr/bin` was removed from PATH, `python` could not be found. **- How I did it** - Remove lines which trimmed the last entry from system PATH in the teardown function if nothing was appended to PATH in the setup method. - Remove shebangs from non-executable Python files - Fix shebangs which had a space in them - Replace `#!/usr/bin/python` shebangs with the preferred, more portable `#!/usr/bin/env python` in executable scripts
…ller code will be the same as python2 (sonic-net#1238) The python2 behavior is not changed.
Conform syntax to support Python 3 using 2to3 tool and manual assessment
The `requests` package is used by a couple modules (config/kube.py and scripts/neighbor_advertiser), but it was not specified as an install-time dependency. Now that the package is built as Python 3, some commands are crashing with `ModuleNotFoundError: No module named 'requests'`.
This pull request introduces 1 alert when merging e54cc58 into f46c27e - view on LGTM.com new alerts:
|
Rebase messed up this PR so close this pr and open a new one at #1242 |
- What I did
- How I did it
- How to verify it
- Previous command output (if the output of a command-line utility has changed)
- New command output (if the output of a command-line utility has changed)