mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
undefine: Define the new API
This introduces a new API virDomainUndefineFlags to control the domain undefine process, as the existing API virDomainUndefine doesn't support flags. Currently only flag VIR_DOMAIN_UNDEFINE_MANAGED_SAVE is supported. If the domain has a managed save image, including VIR_DOMAIN_UNDEFINE_MANAGED_SAVE in @flags will also remove that file, and omitting the flag will cause undefine process to fail. This patch also changes the behavior of virDomainUndefine, if the domain has a managed save image, the undefine will be refused.
This commit is contained in:
@@ -1200,6 +1200,16 @@ int virDomainMemoryPeek (virDomainPtr dom,
|
||||
virDomainPtr virDomainDefineXML (virConnectPtr conn,
|
||||
const char *xml);
|
||||
int virDomainUndefine (virDomainPtr domain);
|
||||
|
||||
typedef enum {
|
||||
VIR_DOMAIN_UNDEFINE_MANAGED_SAVE = (1 << 0),
|
||||
|
||||
/* Future undefine control flags should come here. */
|
||||
} virDomainUndefineFlagsValues;
|
||||
|
||||
|
||||
int virDomainUndefineFlags (virDomainPtr domain,
|
||||
unsigned int flags);
|
||||
int virConnectNumOfDefinedDomains (virConnectPtr conn);
|
||||
int virConnectListDefinedDomains (virConnectPtr conn,
|
||||
char **const names,
|
||||
|
||||
Reference in New Issue
Block a user