-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hi,
the CONTRIBUTION.md states:
It currently supports API methods contained under the following paths (assume an /api2/json prefix):
/cluster
/nodes
However, I couldn't come up with a way to reach /nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback in order to rollback (and restart) a VM. Is it possible somehow and I am just unable to identify how?
Idea would be something like this:
func (s *NodeService) RollbackVM(node string, id uint32, snapshotName string) (*GetNodeQemuResponse, *http.Response, error) {
u := fmt.Sprintf("nodes/%s/qemu/%d/snapshot/%s/rollback", node, id, snapshotName)
req, err := s.client.NewRequest(http.MethodPost, u, nil) //body needs to send start=1
if err != nil {
return nil, nil, err
}
d := new(string)
resp, err := s.client.Do(req, d)
if err != nil {
return nil, resp, err
}
return nil, resp, nil
}
Please let me know if this is already possible, otherwise I'd offer to contribute.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels