Add gnoi_based invocation support to test_warm_reboot#23780
Open
v-cshekar wants to merge 1 commit into
Open
Conversation
|
|
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
9dce667 to
801e625
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
801e625 to
797c166
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
797c166 to
81989a6
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
81989a6 to
9b28f46
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Extend test_warm_reboot to support both gnoi_based and
cli_based invocation types, mirroring the existing test_cold_reboot
pattern.
Add gnoi_api entry for REBOOT_TYPE_WARM in reboot_ctrl_dict
with method=4 (WARM) to enable gNOI-based warm reboot end-to-end.
To test:
root@sonic-mgmt:/data/sonic-mgmt/tests# ./run_tests.sh -n vms-kvm-t0 -d vlab-01 -f vtestbed.yaml -i ../ansible/veos_vtb -u -m individual -c platform_tests/test_reboot.py::test_warm_reboot -e "--skip_sanity" -l info
INFO tests.common.reboot:reboot.py:245 perform_reboot called with invocation_type: cli_based
INFO tests.common.reboot:reboot.py:202 waiting for ssh to drop on vlab-01
INFO tests.common.reboot:reboot.py:270 rebooting vlab-01 with command "warm-reboot"
tests/platform_tests/test_reboot.py::test_warm_reboot[gnoi_based-vlab-01]
/data/sonic-mgmt/tests/conftest.py:1437: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
record_testsuite_property("timestamp", datetime.utcnow())
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
- generated xml file: /data/sonic-mgmt/tests/logs/platform_tests/test_reboot.py::test_warm_reboot.xml -
-------------------- live log sessionfinish --------------------
INFO root:__init__.py:67 Can not get Allure report URL. Please check logs
========= 2 passed, 164 warnings in 694.94s (0:11:34) ==========
Signed-off-by: Chandra Shekar (WIPRO LIMITED) <v-cshekar@microsoft.com>
9b28f46 to
e831f53
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Extend test_warm_reboot to support both gnoi_based and cli_based invocation types, mirroring the existing test_cold_reboot pattern.
Add gnoi_api entry for REBOOT_TYPE_WARM in reboot_ctrl_dict with method=4 (WARM) to enable gNOI-based warm reboot end-to-end.
To test:
root@sonic-mgmt:/data/sonic-mgmt/tests# ./run_tests.sh -n vms-kvm-t0 -d vlab-01 -f vtestbed.yaml -i ../ansible/veos_vtb -u -m individual -c platform_tests/test_reboot.py::test_warm_reboot -e "--skip_sanity" -l info
INFO tests.common.reboot:reboot.py:245 perform_reboot called with invocation_type: cli_based
INFO tests.common.reboot:reboot.py:202 waiting for ssh to drop on vlab-01
INFO tests.common.reboot:reboot.py:270 rebooting vlab-01 with command "warm-reboot"
tests/platform_tests/test_reboot.py::test_warm_reboot[gnoi_based-vlab-01]
/data/sonic-mgmt/tests/conftest.py:1437: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
record_testsuite_property("timestamp", datetime.utcnow())
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
INFO root:init.py:67 Can not get Allure report URL. Please check logs
========= 2 passed, 164 warnings in 694.94s (0:11:34) ==========
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Testing warm reboot via gNOI.
How did you do it?
Added invocation_type and gnmi_tls fixtures to
test_warm_reboot (mirroring test_cold_reboot), and added a
gnoi_api entry for REBOOT_TYPE_WARM in reboot_ctrl_dict with
method=4 (gNOI WARM enum value).
How did you verify/test it?
root@sonic-mgmt:/data/sonic-mgmt/tests# ./run_tests.sh -n vms-kvm-t0 -d vlab-01 -f vtestbed.yaml -i ../ansible/veos_vtb -u -m individual -c platform_tests/test_reboot.py::test_warm_reboot -e "--skip_sanity" -l info
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation