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:
Srivatsa S. Bhat
2011-11-29 17:29:16 +08:00
committed by Daniel Veillard
parent 302743f177
commit 979676e3db
4 changed files with 84 additions and 0 deletions
+16
View File
@@ -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
*/