The Windows driver could not restart. reboot_host() and shutdown_host() over the driver's PowerShell Remoting: Restart-Computer / Stop-Computer -Confirm:$false -ErrorAction Stop, without -Force, so Windows asks programs to close and refuses while other users are logged on (a disconnected RDP session included); that refusal is raised as RuntimeError with the host's message. PsrpTransport.run_last() treats a connection that breaks during the call as accepted.
No version bump: features collect under [Unreleased]. Tests: TestHostPower (10) and TestRunLast (8); full suite 269 passed. Not tried against a real Windows host.
Part of NetOrk/netork#2841: the device header gets Restart and Shut down for hardware devices. netOrk offers each button where the driver has the method (callable(getattr(driver, "reboot_host" / "shutdown_host", None))), so defining it is what switches the button on. The contracts are HostRebootMixin / HostShutdownMixin in napalm-device-types, already mixed in through DeviceTypeDriver; the minimum napalm-device-types version needs no change.
netOrk's feature/host-shutdown-2841 pins this branch's commit for now; once this is merged, the pin moves to the merge commit.
The Windows driver could not restart. `reboot_host()` and `shutdown_host()` over the driver's PowerShell Remoting: `Restart-Computer` / `Stop-Computer -Confirm:$false -ErrorAction Stop`, without `-Force`, so Windows asks programs to close and refuses while other users are logged on (a disconnected RDP session included); that refusal is raised as `RuntimeError` with the host's message. `PsrpTransport.run_last()` treats a connection that breaks during the call as accepted.
No version bump: features collect under [Unreleased]. Tests: `TestHostPower` (10) and `TestRunLast` (8); full suite 269 passed. Not tried against a real Windows host.
Part of NetOrk/netork#2841: the device header gets Restart and Shut down for hardware devices. netOrk offers each button where the driver has the method (`callable(getattr(driver, "reboot_host" / "shutdown_host", None))`), so defining it is what switches the button on. The contracts are `HostRebootMixin` / `HostShutdownMixin` in napalm-device-types, already mixed in through `DeviceTypeDriver`; the minimum napalm-device-types version needs no change.
netOrk's `feature/host-shutdown-2841` pins this branch's commit for now; once this is merged, the pin moves to the merge commit.
reboot_host() and shutdown_host() run Restart-Computer and Stop-Computer
without -Force over the PSRP connection: Windows asks running programs
to close and refuses while other users are logged on. A refusal raises
RuntimeError with the host's answer; a connection the host drops before
answering counts as accepted, which PsrpTransport.run_last() reports.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The Windows driver could not restart.
reboot_host()andshutdown_host()over the driver's PowerShell Remoting:Restart-Computer/Stop-Computer -Confirm:$false -ErrorAction Stop, without-Force, so Windows asks programs to close and refuses while other users are logged on (a disconnected RDP session included); that refusal is raised asRuntimeErrorwith the host's message.PsrpTransport.run_last()treats a connection that breaks during the call as accepted.No version bump: features collect under [Unreleased]. Tests:
TestHostPower(10) andTestRunLast(8); full suite 269 passed. Not tried against a real Windows host.Part of NetOrk/netork#2841: the device header gets Restart and Shut down for hardware devices. netOrk offers each button where the driver has the method (
callable(getattr(driver, "reboot_host" / "shutdown_host", None))), so defining it is what switches the button on. The contracts areHostRebootMixin/HostShutdownMixinin napalm-device-types, already mixed in throughDeviceTypeDriver; the minimum napalm-device-types version needs no change.netOrk's
feature/host-shutdown-2841pins this branch's commit for now; once this is merged, the pin moves to the merge commit.