]> xenbits.xensource.com Git - libvirt.git/commitdiff
destroy: Implement internal API for ESX driver
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 20 Jul 2011 16:45:21 +0000 (18:45 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 21 Jul 2011 18:41:27 +0000 (20:41 +0200)
src/esx/esx_driver.c

index 5ed6a389a47d7e9a6e2330c81e412dad80f663e3..c097651a0b0fed135dccdec4ae0f01c00f978ab0 100644 (file)
@@ -1937,7 +1937,8 @@ esxDomainReboot(virDomainPtr domain, unsigned int flags)
 
 
 static int
-esxDomainDestroy(virDomainPtr domain)
+esxDomainDestroyFlags(virDomainPtr domain,
+                      unsigned int flags)
 {
     int result = -1;
     esxPrivate *priv = domain->conn->privateData;
@@ -1949,6 +1950,8 @@ esxDomainDestroy(virDomainPtr domain)
     esxVI_TaskInfoState taskInfoState;
     char *taskInfoErrorMessage = NULL;
 
+    virCheckFlags(0, -1);
+
     if (priv->vCenter != NULL) {
         ctx = priv->vCenter;
     } else {
@@ -2001,6 +2004,12 @@ esxDomainDestroy(virDomainPtr domain)
 }
 
 
+static int
+esxDomainDestroy(virDomainPtr dom)
+{
+    return esxDomainDestroyFlags(dom, 0);
+}
+
 
 static char *
 esxDomainGetOSType(virDomainPtr domain ATTRIBUTE_UNUSED)
@@ -4734,6 +4743,7 @@ static virDriver esxDriver = {
     .domainShutdown = esxDomainShutdown, /* 0.7.0 */
     .domainReboot = esxDomainReboot, /* 0.7.0 */
     .domainDestroy = esxDomainDestroy, /* 0.7.0 */
+    .domainDestroyFlags = esxDomainDestroyFlags, /* 0.9.4 */
     .domainGetOSType = esxDomainGetOSType, /* 0.7.0 */
     .domainGetMaxMemory = esxDomainGetMaxMemory, /* 0.7.0 */
     .domainSetMaxMemory = esxDomainSetMaxMemory, /* 0.7.0 */