Skip to content

[devices] Clean up platform/os version info for SonicHosts#1732

Merged
daall merged 2 commits intosonic-net:masterfrom
daall:devices_refactor
Jun 8, 2020
Merged

[devices] Clean up platform/os version info for SonicHosts#1732
daall merged 2 commits intosonic-net:masterfrom
daall:devices_refactor

Conversation

@daall
Copy link
Contributor

@daall daall commented Jun 3, 2020

  • 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]

Description of PR

Summary: Consolidates/simplifies fetching platform/os version info for a given DUT in pytest.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

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.

- 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]>

facts = dict()
facts.update(self._get_platform_info())
facts["num_npu"] = self._get_npu_count(facts["platform"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious if we could make platform,.. properies of the class instead if having them be part of facts dict. Similar to os_version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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. :)

@daall daall merged commit 9356613 into sonic-net:master Jun 8, 2020
@daall daall deleted the devices_refactor branch June 8, 2020 15:40
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants