Fixes #2736 - Implement Wake on LAN (WOL) feature #918
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.
This patch introduces support for Wake on LAN. It introduces a new authenticated API endpoint, that requires MAC address. It validates the MAC address and if everything is correct, it creates and sends the magic UDP broadcast packet, instructing the machine with this MAC address to wake up.
While it is likely that the WOL functionality will live in the same network where DHCP feature is, I didn't want to create a dependency between the two. WOL should be possible even with DHCP feature disabled.
I also didn't want mix it into BMC module. While both modules work with power state, BMC can do the full cycle (power on and off), WOL can only wake up suspended machines, it's not full baseboard management controller.