Skip to content

Add gnoi_based invocation support to test_warm_reboot#23780

Open
v-cshekar wants to merge 1 commit into
sonic-net:masterfrom
v-cshekar:v-cshekar/cold_reboot_test
Open

Add gnoi_based invocation support to test_warm_reboot#23780
v-cshekar wants to merge 1 commit into
sonic-net:masterfrom
v-cshekar:v-cshekar/cold_reboot_test

Conversation

@v-cshekar
Copy link
Copy Markdown
Contributor

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) ==========

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • [ X] Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

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

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Apr 9, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: v-cshekar / name: Chandra Shekar (WIPRO LIMITED) (9b28f46)

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@v-cshekar v-cshekar force-pushed the v-cshekar/cold_reboot_test branch from 9dce667 to 801e625 Compare April 9, 2026 07:02
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@v-cshekar v-cshekar force-pushed the v-cshekar/cold_reboot_test branch from 801e625 to 797c166 Compare April 9, 2026 07:09
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@v-cshekar v-cshekar force-pushed the v-cshekar/cold_reboot_test branch from 797c166 to 81989a6 Compare May 1, 2026 16:07
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@v-cshekar v-cshekar force-pushed the v-cshekar/cold_reboot_test branch from 81989a6 to 9b28f46 Compare May 1, 2026 16:41
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

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>
@v-cshekar v-cshekar force-pushed the v-cshekar/cold_reboot_test branch from 9b28f46 to e831f53 Compare May 15, 2026 07:24
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

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