-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Updated the API get_platform_info() to return running/detected ASIC's count #16539
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
Merged
Merged
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
7a3d7e5
Fix the Loopback0 IPv6 address of LC's in chassis not reachable from
abdosi b5b08cf
Merge remote-tracking branch 'upstream/master'
abdosi 8d9dbb6
Added change to have flag
abdosi d04bc54
Merge remote-tracking branch 'upstream/master'
abdosi 264d912
Merge remote-tracking branch 'upstream/master'
abdosi 957cd71
Merge remote-tracking branch 'upstream/master'
abdosi 4e8b101
Assign the metric vaule for Ipv6 default route learnt via RA message to
abdosi 05ec92a
Merge remote-tracking branch 'upstream/master'
abdosi fcbd38d
Add alternate name for bridge interface on supversior in chassis systrem
abdosi 76019a7
Merge remote-tracking branch 'upstream/master'
abdosi 311c639
Revert "Add alternate name for bridge interface on supversior in chas…
abdosi 2109e03
ASIC Count is updated to the running numbers of ASIC's and not max
abdosi ced57e2
Merge remote-tracking branch 'upstream/master' into chassis
abdosi 3cf4697
Enable Seding BGP Community over internal neighbors over iBGP Session
abdosi 8ee1472
Revert "Enable Seding BGP Community over internal neighbors over iBGP…
abdosi b1b8013
Address Review comment
abdosi ac0bfcb
Address review comment
abdosi 84cf43f
In Chassis TSA mode Loopback0 Ip's of each should be advertise
abdosi a0bee0e
Address Review Comment
abdosi 661b971
Revert "In Chassis TSA mode Loopback0 Ip's of each should be advertise"
abdosi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -479,15 +479,15 @@ def get_platform_info(config_db=None): | |
if hw_info_dict: | ||
return hw_info_dict | ||
|
||
from .multi_asic import get_num_asics | ||
from .multi_asic import get_asic_presence_list | ||
|
||
version_info = get_sonic_version_info() | ||
|
||
hw_info_dict['platform'] = get_platform() | ||
hw_info_dict['hwsku'] = get_hwsku() | ||
if version_info: | ||
hw_info_dict['asic_type'] = version_info.get('asic_type') | ||
hw_info_dict['asic_count'] = get_num_asics() | ||
hw_info_dict['asic_count'] = len(get_asic_presence_list()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we put this change in try/catch to ensure There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @arlakshm thanks. have updated accordingly. |
||
|
||
try: | ||
# TODO: enforce caller to provide config_db explicitly and remove its default value | ||
|
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.
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.
can you explain the reason for this change? why get_num_asics does not work, but get_asic_presence_list?
what is the scenario that was broken?
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.
@lguohan
In Chassis for supervisor running asic count can be <= max asic possible.
get_num_asics()
return max asic count that can be present based on static file eg:sonic-buildimage/device/nokia/x86_64-nokia_ixr7250e_sup-r0/asic.conf
Line 1 in fe24c26
get_asic_presence_list()
returns how many asics are detected on Supervisor and for LC/Multi-asic system it still return max asic count