Skip to content

[action] [PR:11957] [IPv6 only]Fixture to convert/revert the mgmt-ip to IPv6 olny, enhance connection plugin#11984

Closed
mssonicbld wants to merge 1 commit intosonic-net:202305from
mssonicbld:cherry/202305/11957
Closed

[action] [PR:11957] [IPv6 only]Fixture to convert/revert the mgmt-ip to IPv6 olny, enhance connection plugin#11984
mssonicbld wants to merge 1 commit intosonic-net:202305from
mssonicbld:cherry/202305/11957

Conversation

@mssonicbld
Copy link
Collaborator

Description of PR

  1. Add a fixture to convert the DUT to IPv6 only(only mgmt-ip)
  2. Enhance the connection plugin to re-connect with the IPv6 address if the IPv4 address is unavailable
  3. Add a new test module with examples to test the IPv6-only scenario.

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

Support test mgmt-ip IPv6 only scenario.

How did you do it?

Remove the IPv4 mgmt address before the test module starts, and restore after the test module is finished.
Enhance the connection plugging to first connect with the IPv4 address, and retry with the IPv6 address if IPv4 is unavailable.
Add a new test module with examples to test the IPv6-only scenario.

How did you verify/test it?

Run on physical testbeds, with dual-stack mgmt-ip addresses testbed and only with IPv6/IPv4 mgmt-ip address testbed.

================================================================================================================== test session starts ==================================================================================================================

ip/test_mgmt_ipv6_only.py::test_bgp_facts[-None] PASSED [ 25%]
ip/test_mgmt_ipv6_only.py::test_bgp_facts_ipv6_only[-None] PASSED [ 50%]
ip/test_mgmt_ipv6_only.py::test_show_features[-4] PASSED [ 75%]
ip/test_mgmt_ipv6_only.py::test_show_features_ipv6_only[-4] PASSED [100%]

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
--------------------------------------------------------------------------------------------- generated xml file: /var/src/sonic-mgmt-int/tests/logs/tr.xml ---------------------------------------------------------------------------------------------
======================================================================================================= 4 passed, 3 warnings in 741.52s (0:12:21) =======================================================================================================
INFO:root:Can not get Allure report URL. Please check logs
jianquanye@sonic-mgmt-jianquanye:/var/src/sonic-mgmt-int/tests$

Any platform specific information?

No.

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

All topologies.

Documentation

… the connection plugin to retry with IPv6 addr if IPv4 addr is unavailable (sonic-net#11957)

Approach
What is the motivation for this PR?
Support test mgmt-ip IPv6 only scenario.

How did you do it?
Remove the IPv4 mgmt address before the test module starts, and restore after the test module is finished.
Enhance the connection plugging to first connect with the IPv4 address, and retry with the IPv6 address if IPv4 is unavailable.
Add a new test module with examples to test the IPv6-only scenario.

How did you verify/test it?
Run on physical testbeds, with dual-stack mgmt-ip addresses testbed and only with IPv6/IPv4 mgmt-ip address testbed.

================================================================================================================== test session starts ==================================================================================================================

ip/test_mgmt_ipv6_only.py::test_bgp_facts[-None] PASSED [ 25%]
ip/test_mgmt_ipv6_only.py::test_bgp_facts_ipv6_only[-None] PASSED [ 50%]
ip/test_mgmt_ipv6_only.py::test_show_features[-4] PASSED [ 75%]
ip/test_mgmt_ipv6_only.py::test_show_features_ipv6_only[-4] PASSED [100%]

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
--------------------------------------------------------------------------------------------- generated xml file: /var/src/sonic-mgmt-int/tests/logs/tr.xml ---------------------------------------------------------------------------------------------
======================================================================================================= 4 passed, 3 warnings in 741.52s (0:12:21) =======================================================================================================
INFO:root:Can not get Allure report URL. Please check logs
jianquanye@sonic-mgmt-jianquanye:/var/src/sonic-mgmt-int/tests$
@mssonicbld
Copy link
Collaborator Author

Original PR: #11957

@yejianquan yejianquan closed this Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants