[devices] Clean up platform/os version info for SonicHosts#1732
Merged
daall merged 2 commits intosonic-net:masterfrom Jun 8, 2020
Merged
[devices] Clean up platform/os version info for SonicHosts#1732daall merged 2 commits intosonic-net:masterfrom
daall merged 2 commits intosonic-net:masterfrom
Conversation
- Deprecate get_asic_type and get_platform_info - Add facts and os_version properties to SonicHost - Clarify documentation Signed-off-by: Danny Allen <[email protected]>
3 tasks
lguohan
approved these changes
Jun 5, 2020
tahmed-dev
approved these changes
Jun 5, 2020
|
|
||
| facts = dict() | ||
| facts.update(self._get_platform_info()) | ||
| facts["num_npu"] = self._get_npu_count(facts["platform"]) |
Contributor
There was a problem hiding this comment.
curious if we could make platform,.. properies of the class instead if having them be part of facts dict. Similar to os_version.
Contributor
Author
There was a problem hiding this comment.
Agree 100%, it's just they're used in quite a few places at the moment so I wanted to do a follow-up PR for that change. :)
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
…nic-net#8627) 7041400 [config reload] Call systemctl reset-failed for snmp,telemetry,mgmt-framework services (sonic-net#1773) (sonic-net#1786) 399d370 Fix logic in RIF counters print (sonic-net#1732) 8329544 [vnet_route_check] don't hardcode prefix length of /24 (sonic-net#1756) 193b028 [neighbor-advertiser] delete the tunnel maps appropriately (sonic-net#1663) 2c82bcf [neighbor_advertiser] Use existing tunnel if present for creating tunnel mappings (sonic-net#1589) 8e22960 [202012][Config] Update config command of Kdump. (sonic-net#1778) be3e5c6 [show][config] cli refactor for muxcable with abstract class implementation from vendors (sonic-net#1722) (sonic-net#1782)
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
sonic-swss 73f6f68 [Flex Counters] Delay flex counters even if tables are present in the DB (sonic-net#1877) 5edb9e5 [buffer orch] Bugfix: Don't query counter SAI_BUFFER_POOL_STAT_XOFF_ROOM_WATERMARK_BYTES on a pool where it is not supported (sonic-net#1857) fce0c60 [crm] Fix for Issue sonic-net/sonic-buildimage#8036 (sonic-net#1829) sonic-utilities 2630ac1 [Fast-reboot] Set flex counters delay indicator to prevent flex counters enablement after fast-reboot (sonic-net#1768) 606f1b1 [portstat pfcstat] Unify the packet number format in the output of portstat and pfcstat in all cases (sonic-net#1755) 2c6a15e [ecnconfig] Fix exception seen during display and add unit tests (#1784) 9b1995e Fix logic in RIF counters print (sonic-net#1732) sonic-swss-comon 3e7b81f Add a new field for FLEX_COUNTER_TABLE to indicate delay for flex counters (sonic-net#523)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Danny Allen [email protected]
Description of PR
Summary: Consolidates/simplifies fetching platform/os version info for a given DUT in pytest.
Type of change
Approach
How did you do it?
I deleted some helper methods from SonicHost so that all tests are using the facts property of SonicHost to get platform/asic information. I also made "facts" a property so that it can easily be extended/modified in the future without needing to change any of the test code.
How did you verify/test it?
Ran the platform + copp tests to verify everything was still being fetched correctly after the refactor.