Skip to content
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

[show] Add subcommand to show midplane status for modular chassis #1267

Merged
merged 4 commits into from
Jan 12, 2021

Conversation

mprabhu-nokia
Copy link
Contributor

sonic-utilities: Changes to show midplane status in modular chassis

HLD: sonic-net/SONiC#646

  • What I did
    Show command to verify status of midplane in modular chassis

$show chassis_modules midplane-status

  • How I did it
    Extended the show/chassis_modules.py with the midplane-status option

  • How to verify it
    Verified via UT and vendor-platform implementation to show the midplane IP-address and rechability-status

  • New command output (if the output of a command-line utility has changed)
    An example vendor specific output below

CLI Output - On Supervisor

show chassis-modules midplane-status
      Name    IP-Address    Reachability
----------  ------------  --------------
LINE-CARD0      10.0.0.1            True
LINE-CARD1      10.0.0.2           False
LINE-CARD2      10.0.0.3            True
LINE-CARD3      10.0.0.4            True

CLI Output - On line-card

       Name    IP-Address    Reachability
-----------  ------------  --------------
SUPERVISOR0     10.0.0.16            True

Output of REDIS STATE-DB

redis-dump -d 6 -y -k "*MIDPLANE*"
{
  "CHASSIS_MIDPLANE_TABLE|LINE-CARD0": {
    "expireat": 1606205722.081939,
    "ttl": -0.001,
    "type": "hash",
    "value": {
      "access": "True",
      "ip_address": "10.0.0.1"
    }
  }
}

@mprabhu-nokia
Copy link
Contributor Author

retest this please

@anshuv-mfst
Copy link

@shyam (Cisco), @rlhui - Could you please review.

@mprabhu-nokia
Copy link
Contributor Author

retest this please

@mprabhu-nokia
Copy link
Contributor Author

@rlhui or @lguohan - could you please assign a reviewer for this?

show/chassis_modules.py Outdated Show resolved Hide resolved
jleveque
jleveque previously approved these changes Jan 7, 2021
Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

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

Looks good to me. @judyjoseph to review as well.

@mprabhu-nokia
Copy link
Contributor Author

retest this please

Show Output verification for:
show chassis-modules status
show chassis-modules midplane-status
@jleveque jleveque changed the title Modular-Chassis: Show midplane status [show] Add subcommand to show midplane status for modular chassis Jan 12, 2021
lguohan pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Jan 20, 2021
- [route_check.py] - update includes checks on subscriptions (sonic-net/sonic-utilities#1344)
- Validations checks while adding a member to PortChannel and removing a member from a Portchannel (sonic-net/sonic-utilities#1328)
- [show] Add subcommand to show midplane status for modular chassis (sonic-net/sonic-utilities#1267)
- [pytest][qos][config] Added pytests for "config qos reload" commands" (sonic-net/sonic-utilities#1346)
- Drop explict 3 seconds pause between two object updates/deletes. (sonic-net/sonic-utilities#1359)
- [show]fix for show muxcable status by replacing "hostname" to "peer_switch" for deriving tor ipv4_address (sonic-net/sonic-utilities#1360)
- [PFCWD] Fix 'start' pfcwd command (sonic-net/sonic-utilities#1345)

Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
lguohan pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Jan 21, 2021
- [route_check.py] - update includes checks on subscriptions (sonic-net/sonic-utilities#1344)
- Validations checks while adding a member to PortChannel and removing a member from a Portchannel (sonic-net/sonic-utilities#1328)
- [show] Add subcommand to show midplane status for modular chassis (sonic-net/sonic-utilities#1267)
- [pytest][qos][config] Added pytests for "config qos reload" commands" (sonic-net/sonic-utilities#1346)
- Drop explict 3 seconds pause between two object updates/deletes. (sonic-net/sonic-utilities#1359)
- [show]fix for show muxcable status by replacing "hostname" to "peer_switch" for deriving tor ipv4_address (sonic-net/sonic-utilities#1360)
- [PFCWD] Fix 'start' pfcwd command (sonic-net/sonic-utilities#1345)

Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
rawal01 added a commit to rawal01/sonic-mgmt that referenced this pull request Feb 3, 2021
 -adding new json file to support fixture in platform tests to skip checks for modules not present in DUT
new file:   tests/platform_tests/cli/test_show_chassis_module.py
  -adding new two new test cases for verifying show chassis-module status and show chassis-module midplane status introduced as part of
   PRs sonic-net/sonic-utilities#1145 and sonic-net/sonic-utilities#1267
tests/platform_tests/conftest.py
   -adding a fixture that skips checking for modules for DUT
yxieca pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Feb 11, 2021
…sonic modular chassis (#2794)

Description of PR
Summary:

What is the motivation for this PR?
Add test cases to verify show chassis-module status and show chassis-module midplane-status for VOQ chassis. The cli commands were introduced in following PRs:

sonic-net/sonic-utilities#1145
sonic-net/sonic-utilities#1267
How did you do it?
Added new script tests/platform_tests/cli/test_show_chassis_module.py for verifying show chassis-module status and show chassis-module midplane status. Introduced test cases:
test_show_chassis_module_status: verify the output of command show chassis-module status
test_show_chassis_module_midplane_status: verify the output of command show chassis-module midplane-status
Added new script test_power_budget_info.py for verifying the redis output for power budget policy in supervisor card of chassis
Added a fixture that skips checking for modules for DUT. This new fixture is introduced to skips modules for DUT not present based on entries in inventory file, by default the test it is assumed the chassis is fully equipped and all modules are up. Example to skip certain modules add to skip modules in inventory for DUT:
DUT1
    skip_modules:
        'line-cards':
          - LINE-CARD0
          - LINE-CARD2
        'fabric-cards':
          - FABRIC-CARD3
        'psus':
          - PSU4
          - PSU5
Based on inventory file the tests will skip above modules for DUT1. For example, show chassis module will allow empty as status for LINE-CARD0 and LINE-CARD2 while all other will be expected to be ONLINE.

How did you verify/test it?
Ran sample tests against Nokia chassis with t2 topology using the skip fixture

Any platform specific information?
Supported testbed topology if it's a new test case?
t2
anand-kumar-subramanian pushed a commit to anand-kumar-subramanian/sonic-utilities that referenced this pull request Mar 2, 2021
…nic-net#1267)

Add subcommand to show midplane status for modular chassis and related unit tests
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.

4 participants