feat(power): resume_vm powers a suspended VM on (NetOrk/netork#2658) #11

Closed
christianmanivong wants to merge 0 commits from fix/vm-resume-2658 into main
pull from: fix/vm-resume-2658
Owner

The hypervisor contract gains resume_vm beside suspend_vm (NetOrk/netork#2658, napalm-device-types PR on the same branch).

What changes

  • resume_vm(name) on both drivers: suspend_vm uses SuspendVM_Task, after which the VM's runtime.powerState is suspended. vSphere has no resume call of its own: PowerOnVM_Task resumes a suspended VM from its saved state. A VM that is not suspended is refused with RuntimeError, so resume never starts a VM that was off.
  • get_vms() already reports such a VM as "suspended", which netOrk now offers Resume for.
  • README's capability table lists resume_vm.

Tests

  • tests/test_actions.py: resume powers a suspended VM on and waits for the task; a powered-on or powered-off VM is refused without a call. test_actions.py + test_parse_vms.py: 42 passed locally.

CHANGELOG under Unreleased; no version bump.

The hypervisor contract gains `resume_vm` beside `suspend_vm` (NetOrk/netork#2658, napalm-device-types PR on the same branch). ## What changes - `resume_vm(name)` on both drivers: `suspend_vm` uses `SuspendVM_Task`, after which the VM's `runtime.powerState` is `suspended`. vSphere has no resume call of its own: `PowerOnVM_Task` resumes a suspended VM from its saved state. A VM that is not suspended is refused with `RuntimeError`, so resume never starts a VM that was off. - `get_vms()` already reports such a VM as `"suspended"`, which netOrk now offers Resume for. - README's capability table lists `resume_vm`. ## Tests - `tests/test_actions.py`: resume powers a suspended VM on and waits for the task; a powered-on or powered-off VM is refused without a call. `test_actions.py` + `test_parse_vms.py`: 42 passed locally. CHANGELOG under Unreleased; no version bump.
christianmanivong added 1 commit 2026-11-25 20:52:03 +00:00
feat(power): resume_vm powers a suspended VM on (NetOrk/netork#2658)
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m13s
driver / test (3.12) (pull_request) Successful in 1m9s
driver / test (3.13) (pull_request) Successful in 57s
driver / lowest (pull_request) Successful in 31s
driver / build (pull_request) Successful in 29s
driver / security (pull_request) Successful in 1m8s
CI / driver (pull_request) Successful in 2m49s
driver / publish (pull_request) Skipped
b781538a87
The hypervisor contract gained resume_vm beside suspend_vm. vSphere has no
call of its own for it: PowerOnVM_Task resumes a suspended VM from its saved
state. A VM that is not suspended is refused, so resume never starts a VM
that was off.
Author
Owner

Merged as part of the release PR #12 (0.4.0, merge commit 14a1b08, tag v0.4.0).

Merged as part of the release PR #12 (0.4.0, merge commit 14a1b08, tag v0.4.0).

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.