v1.0.0
This commit is contained in:
25
pkg/vm/common/power.go
Normal file
25
pkg/vm/common/power.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package common
|
||||
|
||||
// PowerVMRequest struct to power on or off a virtual machine.
|
||||
type PowerVMRequest struct {
|
||||
// Id of source VM
|
||||
// Required: true
|
||||
VmID int `url:"vm" json:"vm" validate:"required"`
|
||||
|
||||
// Command to power on or off the virtual machine.
|
||||
// Required: true
|
||||
Command string `url:"command" json:"command" validate:"required"`
|
||||
|
||||
// If true, attempt a graceful operation of the virtual machine.
|
||||
// Required: false
|
||||
Graceful bool `url:"graceful" json:"graceful,omitempty"`
|
||||
|
||||
// If true, force the operation of the virtual machine.
|
||||
// Required: false
|
||||
Force bool `url:"force" json:"force,omitempty"`
|
||||
}
|
||||
|
||||
const (
|
||||
PowerOn = "vm_start"
|
||||
PowerOff = "vm_stop"
|
||||
)
|
||||
Reference in New Issue
Block a user