mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
Add a public API to invoke suspend/resume on the host
Implement the public definitions for the new API virNodeSuspendForDuration() which will be subsequently used to do a timed suspend on the host.
This commit is contained in:
committed by
Daniel Veillard
parent
302743f177
commit
979676e3db
@@ -250,6 +250,17 @@ typedef enum {
|
||||
} virDomainCreateFlags;
|
||||
|
||||
|
||||
/**
|
||||
* virNodeSuspendTarget:
|
||||
*
|
||||
* Flags to indicate which system-wide sleep state the host must be
|
||||
* transitioned to.
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_NODE_SUSPEND_TARGET_MEM = (1 << 0),
|
||||
VIR_NODE_SUSPEND_TARGET_DISK = (1 << 1),
|
||||
VIR_NODE_SUSPEND_TARGET_HYBRID = (1 << 2),
|
||||
} virNodeSuspendTarget;
|
||||
|
||||
/**
|
||||
* virStream:
|
||||
@@ -1085,6 +1096,11 @@ unsigned long long virNodeGetFreeMemory (virConnectPtr conn);
|
||||
int virNodeGetSecurityModel (virConnectPtr conn,
|
||||
virSecurityModelPtr secmodel);
|
||||
|
||||
int virNodeSuspendForDuration (virConnectPtr conn,
|
||||
unsigned int target,
|
||||
unsigned long long duration,
|
||||
unsigned int flags);
|
||||
|
||||
/*
|
||||
* Gather list of running domains
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user