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

[test] Add check neighbors health for SONiC neighbor devices #3481

Merged
merged 1 commit into from
Jun 28, 2021

Conversation

Pterosaur
Copy link
Contributor

@Pterosaur Pterosaur commented May 14, 2021

Signed-off-by: Ze Gan ganze718@gmail.com

Description of PR

./run_tests.sh -E -n vms-kvm-t0 -d vlab-01 -c test_nbr_health.py -f vtestbed.csv -i veos_vtb -e "--neighbor_type=sonic"

Summary:
Add test for neighbor health if the neighbor devices are SONiC

Type of change

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

Approach

What is the motivation for this PR?

To check the neighbor health if the neighbor devices are SONiC

How did you do it?

Add a command argument of pytest to indicate the neighbor device type so that we can choose different flow when we check the neighbor health.

How did you verify/test it?

  1. Build the SONiC neighbor testbed to follow the KVM Testbed Setup
./testbed-cli.sh -m veos_vtb -n 4 -k vsonic start-vms server_1 password.txt
./testbed-cli.sh -t vtestbed.csv -m veos_vtb -k vsonic add-topo vms-kvm-t0 password.txt
./testbed-cli.sh -t vtestbed.csv -m veos_vtb deploy-mg vms-kvm-t0 veos_vtb password.txt
  1. Run neighbor health test
./run_tests.sh -n vms-kvm-t0 -d vlab-01 -c bgp/test_bgp_fact.py -f vtestbed.csv -i veos_vtb -e "--neighbor_type=sonic"
  1. All test should be pass

Any platform specific information?

None

Supported testbed topology if it's a new test case?

None

Documentation

@Pterosaur Pterosaur changed the title [test]: Add check neighbors health for SONiC neighbor devices [test] Add check neighbors health for SONiC neighbor devices May 14, 2021
@Pterosaur Pterosaur requested a review from lguohan May 14, 2021 05:56
@Pterosaur Pterosaur marked this pull request as ready for review May 14, 2021 05:56
@Pterosaur Pterosaur requested review from wangxin, yxieca and a team as code owners May 14, 2021 05:56
@lgtm-com

This comment has been minimized.

Signed-off-by: Ze Gan <ganze718@gmail.com>
@Pterosaur Pterosaur mentioned this pull request Jun 7, 2021
3 tasks
"""
Shortcut fixture for getting VM host
"""

vm_base = int(tbinfo['vm_base'][2:])
neighbor_type = request.config.getoption("--neighbor_type")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a way to detect the type of neighbor? Then the "--neighbor_type" option would be unnecessary. It would be easier to trigger tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't have any elegant idea to check the type of neighbor.
In my mind, we can only get the type after we login the device, but the password and username is different between EOS and SONiC, so it requires that we need to know the type before we login the device.

@Pterosaur Pterosaur requested a review from wangxin June 24, 2021 02:14
AndoniSanguesa pushed a commit to AndoniSanguesa/sonic-mgmt that referenced this pull request Jun 24, 2021
@Pterosaur Pterosaur merged commit ca982e6 into sonic-net:master Jun 28, 2021
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
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.

2 participants