shutdown_host() next to reboot_host(): POST /api/core/firmware/poweroff (OPNsense 16.1.15 and later, together with the reboot action), which answers before the firewall goes down. A refusal raises RuntimeError with the firewall's answer.
No version bump: features collect under [Unreleased]. Tests: TestShutdownHost in tests/unit/test_updates.py; full suite 645 passed.
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.
`shutdown_host()` next to `reboot_host()`: `POST /api/core/firmware/poweroff` (OPNsense 16.1.15 and later, together with the reboot action), which answers before the firewall goes down. A refusal raises `RuntimeError` with the firewall's answer.
No version bump: features collect under [Unreleased]. Tests: `TestShutdownHost` in `tests/unit/test_updates.py`; full suite 645 passed.
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.
shutdown_host() posts /api/core/firmware/poweroff, the clean halt with
power off that OPNsense has had since 16.1.15, next to the
firmware/reboot that reboot_host() uses. A refused request raises
RuntimeError with the firewall's answer.
opnsense.py must not grow (python_file_lines, 3022): reboot_host,
shutdown_host and get_host_status, all three the firmware controller's,
move to firmware_power.py (OPNsenseFirmwarePowerMixin), and opnsense.py
shrinks to 3019 lines, recorded in the baseline. Behaviour unchanged; the
645 tests pass as they were.
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.
shutdown_host()next toreboot_host():POST /api/core/firmware/poweroff(OPNsense 16.1.15 and later, together with the reboot action), which answers before the firewall goes down. A refusal raisesRuntimeErrorwith the firewall's answer.No version bump: features collect under [Unreleased]. Tests:
TestShutdownHostintests/unit/test_updates.py; full suite 645 passed.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.