Skip to content

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

Merged
Pterosaur merged 1 commit intosonic-net:masterfrom
Pterosaur:test_for_sonic_neighbor
Jun 28, 2021
Merged

[test] Add check neighbors health for SONiC neighbor devices#3481
Pterosaur merged 1 commit intosonic-net:masterfrom
Pterosaur:test_for_sonic_neighbor

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 force-pushed the test_for_sonic_neighbor branch from fdf78d4 to 4e340df Compare May 14, 2021 05:52
@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 a team, wangxin and yxieca 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 force-pushed the test_for_sonic_neighbor branch from 4e340df to d592c1d Compare May 14, 2021 06:26
@Pterosaur Pterosaur mentioned this pull request Jun 7, 2021
3 tasks
"""

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