Power support in discovery api

Problem: Want to send power commands like we do with /api/v2/hosts/:id/power but for hosts running discovery image. Reason for this, is hosts are behind a firewall and all commands need to run through capsules.

Expected outcome: Want to leverage api to powercycle/shutoff servers in discovery.

Foreman and Proxy versions: foreman 1.15

Foreman and Proxy plugin versions:

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)

logs

Hello Andrew,

If you want to just reboot the discovered hosts then there is already existing API for discovered host viz:
PUT /api/v2/discovered_hosts/:id/reboot

to reboot all discovered host there is another api
PUT /api/v2/discovered_hosts/reboot_all

If you need actions such as (on/start), (off/stop), (cycle/reset), (state/status) then it is an RFE.

Let me know if you have a requirement of such actions, I will create an appropriate RFE for the same.

Yes, would like to be able to powerdown/restart servers that are in discovery. Would send ipmi user/password as a payload to the api. thanks!