func (c *Client) SubmitRebootOperation(operation RebootOperation) (*OperationResponse, error) {
	req, err := c.caller.R().
		SetBody(operation).
		SetResult(&OperationResponse{}).
		Post(c.getEndpoint("internal/kadeployapi", "/reboot", url.Values{}))
	if err != nil {
		return nil, fmt.Errorf("Error while sending the reboot operation: '%s'", err)
	}
	if req.StatusCode() != 200 {
		return nil, fmt.Errorf("The server returned an error (code: %d) after sending the reboot operation: '%s'", req.StatusCode(), req.Status())
	}
	res, ok := req.Result().(*OperationResponse)
	if !ok {
		return nil, fmt.Errorf("Error in the response of the reboot submission (unexpected type)")
	}
	return res, nil
}
SubmitRebootOperation submit a reboot operation to the Kadeploy3 API
package api
import (
	"fmt"
	"net/url"
)
type PowerOperation struct {
	Nodes  []string `json:"nodes"`
	Status string   `json:"status"`
	Level  string   `json:"level,omitempty"`
}
type RebootOperation struct {
	Kind  string   `json:"kind"`
	Nodes []string `json:"nodes"`
	Level string   `json:"level,omitempty"`
}
type DeploymentOperationEnvironment struct {
	Kind    string `json:"kind"`
	User    string `json:"user,omitempty"`
	Name    string `json:"name"`
	Version string `json:"version,omitempty"`
}
type DeploymentOperationCustomOperation struct {
	Action  string `json:"action"`
	Name    string `json:"name"`
	Command string `json:"command,omitempty"`
}
type DeploymentOperation struct {
	Nodes            []string                                                              `json:"nodes"`
	Environment      DeploymentOperationEnvironment                                        `json:"environment"`
	CustomOperations map[string]map[string]map[string][]DeploymentOperationCustomOperation `json:"custom_operations,omitempty"`
}
type OperationResponse struct {
	WID string `json:"wid"`
}
type OperationWorkflow struct {
	WID   string              `json:"wid"`
	Done  bool                `json:"done"`
	Error bool                `json:"error"`
	Nodes map[string][]string `json:"nodes"`  
}
type OperationStates map[string]struct {
	Macro string `json:"macro"`
	Micro string `json:"micro"`
	State string `json:"state"`
	Out   string `json:"out,omitempty"`
}
func (c *Client) SubmitPowerOperation(operation PowerOperation) (*OperationResponse, error) {
	req, err := c.caller.R().
		SetBody(operation).
		SetResult(&OperationResponse{}).
		Put(c.getEndpoint("internal/kadeployapi", "/power", url.Values{}))
	if err != nil {
		return nil, fmt.Errorf("Error while sending the power operation: '%s'", err)
	}
	if req.StatusCode() != 200 {
		return nil, fmt.Errorf("The server returned an error (code: %d) after sending the power operation: '%s'", req.StatusCode(), req.Status())
	}
	res, ok := req.Result().(*OperationResponse)
	if !ok {
		return nil, fmt.Errorf("Error in the response of the reboot submission (unexpected type)")
	}
	return res, nil
}
func (c *Client) RequestPowerStatus(node string) (*OperationResponse, error) {
	req, err := c.caller.R().
		SetResult(&OperationResponse{}).
		Get(c.getEndpoint("internal/kadeployapi", "/power", url.Values{"nodes": []string{node}}))
	if err != nil {
		return nil, err
	}
	if req.StatusCode() != 200 {
		return nil, fmt.Errorf("The server returned an error (code: %d) after sending the power operation: '%s'", req.StatusCode(), req.Status())
	}
	res, ok := req.Result().(*OperationResponse)
	if !ok {
		return nil, fmt.Errorf("Error in the response of the reboot submission (unexpected type)")
	}
	return res, nil
}