[PATCH 2/5] Implement virDomainResumeFlags in all drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This practically boils down to:
1) rename DomainResume implementation to DomainResumeFlags
2) make DomainResume call DomainResumeFlags(dom, 0);

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/esx/esx_driver.c             | 14 +++++++++++++-
 src/hyperv/hyperv_driver.c       | 14 +++++++++++++-
 src/libxl/libxl_driver.c         | 14 ++++++++++++--
 src/lxc/lxc_driver.c             | 15 +++++++++++++--
 src/openvz/openvz_driver.c       | 13 ++++++++++++-
 src/parallels/parallels_driver.c | 11 ++++++++++-
 src/phyp/phyp_driver.c           | 12 +++++++++++-
 src/qemu/qemu_driver.c           | 15 +++++++++++++--
 src/test/test_driver.c           | 13 ++++++++++++-
 src/vbox/vbox_common.c           | 11 ++++++++++-
 src/vmware/vmware_driver.c       | 12 +++++++++++-
 src/xen/xen_driver.c             | 14 ++++++++++++--
 src/xenapi/xenapi_driver.c       | 21 +++++++++++++++++++--
 13 files changed, 161 insertions(+), 18 deletions(-)

diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 0770e89..aaca532 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -1780,7 +1780,8 @@ esxDomainSuspend(virDomainPtr domain)
 
 
 static int
-esxDomainResume(virDomainPtr domain)
+esxDomainResumeFlags(virDomainPtr domain,
+                     unsigned int flags)
 {
     int result = -1;
     esxPrivate *priv = domain->conn->privateData;
@@ -1791,6 +1792,8 @@ esxDomainResume(virDomainPtr domain)
     esxVI_TaskInfoState taskInfoState;
     char *taskInfoErrorMessage = NULL;
 
+    virCheckFlags(0, -1);
+
     if (esxVI_EnsureSession(priv->primary) < 0) {
         return -1;
     }
@@ -1838,6 +1841,14 @@ esxDomainResume(virDomainPtr domain)
 
 
 static int
+esxDomainResume(virDomainPtr domain)
+{
+    return esxDomainResumeFlags(domain, 0);
+}
+
+
+
+static int
 esxDomainShutdownFlags(virDomainPtr domain, unsigned int flags)
 {
     int result = -1;
@@ -5310,6 +5321,7 @@ static virHypervisorDriver esxDriver = {
     .domainLookupByName = esxDomainLookupByName, /* 0.7.0 */
     .domainSuspend = esxDomainSuspend, /* 0.7.0 */
     .domainResume = esxDomainResume, /* 0.7.0 */
+    .domainResumeFlags = esxDomainResumeFlags, /* 1.2.10 */
     .domainShutdown = esxDomainShutdown, /* 0.7.0 */
     .domainShutdownFlags = esxDomainShutdownFlags, /* 0.9.10 */
     .domainReboot = esxDomainReboot, /* 0.7.0 */
diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index 5ffcb85..ac8f745 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -569,12 +569,15 @@ hypervDomainSuspend(virDomainPtr domain)
 
 
 static int
-hypervDomainResume(virDomainPtr domain)
+hypervDomainResumeFlags(virDomainPtr domain,
+                        unsigned int flags)
 {
     int result = -1;
     hypervPrivate *priv = domain->conn->privateData;
     Msvm_ComputerSystem *computerSystem = NULL;
 
+    virCheckFlags(0, -1);
+
     if (hypervMsvmComputerSystemFromDomain(domain, &computerSystem) < 0) {
         goto cleanup;
     }
@@ -598,6 +601,14 @@ hypervDomainResume(virDomainPtr domain)
 
 
 static int
+hypervDomainResume(virDomainPtr domain)
+{
+    return hypervDomainResumeFlags(domain, 0);
+}
+
+
+
+static int
 hypervDomainDestroyFlags(virDomainPtr domain, unsigned int flags)
 {
     int result = -1;
@@ -1370,6 +1381,7 @@ static virHypervisorDriver hypervDriver = {
     .domainLookupByName = hypervDomainLookupByName, /* 0.9.5 */
     .domainSuspend = hypervDomainSuspend, /* 0.9.5 */
     .domainResume = hypervDomainResume, /* 0.9.5 */
+    .domainResumeFlags = hypervDomainResumeFlags, /* 1.2.10 */
     .domainDestroy = hypervDomainDestroy, /* 0.9.5 */
     .domainDestroyFlags = hypervDomainDestroyFlags, /* 0.9.5 */
     .domainGetOSType = hypervDomainGetOSType, /* 0.9.5 */
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index d2c077c..342d0a5 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -814,7 +814,8 @@ libxlDomainSuspend(virDomainPtr dom)
 
 
 static int
-libxlDomainResume(virDomainPtr dom)
+libxlDomainResumeFlags(virDomainPtr dom,
+                       unsigned int flags)
 {
     libxlDriverPrivatePtr driver = dom->conn->privateData;
     libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
@@ -823,10 +824,12 @@ libxlDomainResume(virDomainPtr dom)
     virObjectEventPtr event = NULL;
     int ret = -1;
 
+    virCheckFlags(0, -1);
+
     if (!(vm = libxlDomObjFromDomain(dom)))
         goto cleanup;
 
-    if (virDomainResumeEnsureACL(dom->conn, vm->def) < 0)
+    if (virDomainResumeFlagsEnsureACL(dom->conn, vm->def) < 0)
         goto cleanup;
 
     if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0)
@@ -873,6 +876,12 @@ libxlDomainResume(virDomainPtr dom)
 }
 
 static int
+libxlDomainResume(virDomainPtr dom)
+{
+    return libxlDomainResumeFlags(dom, 0);
+}
+
+static int
 libxlDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
 {
     virDomainObjPtr vm;
@@ -4750,6 +4759,7 @@ static virHypervisorDriver libxlDriver = {
     .domainLookupByName = libxlDomainLookupByName, /* 0.9.0 */
     .domainSuspend = libxlDomainSuspend, /* 0.9.0 */
     .domainResume = libxlDomainResume, /* 0.9.0 */
+    .domainResumeFlags = libxlDomainResumeFlags, /* 1.2.10 */
     .domainShutdown = libxlDomainShutdown, /* 0.9.0 */
     .domainShutdownFlags = libxlDomainShutdownFlags, /* 0.9.10 */
     .domainReboot = libxlDomainReboot, /* 0.9.0 */
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 6a58d50..93fd739 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -3367,7 +3367,9 @@ static int lxcDomainSuspend(virDomainPtr dom)
     return ret;
 }
 
-static int lxcDomainResume(virDomainPtr dom)
+static int
+lxcDomainResumeFlags(virDomainPtr dom,
+                     unsigned int flags)
 {
     virLXCDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
@@ -3376,12 +3378,14 @@ static int lxcDomainResume(virDomainPtr dom)
     virLXCDomainObjPrivatePtr priv;
     virLXCDriverConfigPtr cfg = virLXCDriverGetConfig(driver);
 
+    virCheckFlags(0, -1);
+
     if (!(vm = lxcDomObjFromDomain(dom)))
         goto cleanup;
 
     priv = vm->privateData;
 
-    if (virDomainResumeEnsureACL(dom->conn, vm->def) < 0)
+    if (virDomainResumeFlagsEnsureACL(dom->conn, vm->def) < 0)
         goto cleanup;
 
     if (!virDomainObjIsActive(vm)) {
@@ -3418,6 +3422,12 @@ static int lxcDomainResume(virDomainPtr dom)
 }
 
 static int
+lxcDomainResume(virDomainPtr dom)
+{
+    return lxcDomainResumeFlags(dom, 0);
+}
+
+static int
 lxcDomainOpenConsole(virDomainPtr dom,
                       const char *dev_name,
                       virStreamPtr st,
@@ -5737,6 +5747,7 @@ static virHypervisorDriver lxcDriver = {
     .domainLookupByName = lxcDomainLookupByName, /* 0.4.2 */
     .domainSuspend = lxcDomainSuspend, /* 0.7.2 */
     .domainResume = lxcDomainResume, /* 0.7.2 */
+    .domainResumeFlags = lxcDomainResumeFlags, /* 1.2.10 */
     .domainDestroy = lxcDomainDestroy, /* 0.4.4 */
     .domainDestroyFlags = lxcDomainDestroyFlags, /* 0.9.4 */
     .domainGetOSType = lxcDomainGetOSType, /* 0.4.2 */
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index a0346b4..d74e64b 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -633,13 +633,17 @@ static int openvzDomainSuspend(virDomainPtr dom)
     return ret;
 }
 
-static int openvzDomainResume(virDomainPtr dom)
+static int
+openvzDomainResumeFlags(virDomainPtr dom,
+                        unsigned int flags)
 {
   struct openvz_driver *driver = dom->conn->privateData;
   virDomainObjPtr vm;
   const char *prog[] = {VZCTL, "--quiet", "chkpnt", PROGRAM_SENTINEL, "--resume", NULL};
   int ret = -1;
 
+  virCheckFlags(0, -1);
+
   openvzDriverLock(driver);
   vm = virDomainObjListFindByUUID(driver->domains, dom->uuid);
   openvzDriverUnlock(driver);
@@ -673,6 +677,12 @@ static int openvzDomainResume(virDomainPtr dom)
 }
 
 static int
+openvzDomainResume(virDomainPtr dom)
+{
+    return openvzDomainResumeFlags(dom, 0);
+}
+
+static int
 openvzDomainShutdownFlags(virDomainPtr dom,
                           unsigned int flags)
 {
@@ -2577,6 +2587,7 @@ static virHypervisorDriver openvzDriver = {
     .domainLookupByName = openvzDomainLookupByName, /* 0.3.1 */
     .domainSuspend = openvzDomainSuspend, /* 0.8.3 */
     .domainResume = openvzDomainResume, /* 0.8.3 */
+    .domainResumeFlags = openvzDomainResumeFlags, /* 1.2.10 */
     .domainShutdown = openvzDomainShutdown, /* 0.3.1 */
     .domainShutdownFlags = openvzDomainShutdownFlags, /* 0.9.10 */
     .domainReboot = openvzDomainReboot, /* 0.3.1 */
diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c
index 808dc4a..f5c1849 100644
--- a/src/parallels/parallels_driver.c
+++ b/src/parallels/parallels_driver.c
@@ -1474,14 +1474,22 @@ static int parallelsResume(virDomainObjPtr privdom)
 }
 
 static int
-parallelsDomainResume(virDomainPtr domain)
+parallelsDomainResumeFlags(virDomainPtr domain,
+                           unsigned int flags)
 {
+    virCheckFlags(0, -1);
     return parallelsDomainChangeState(domain,
                                       VIR_DOMAIN_PAUSED, "paused",
                                       parallelsResume,
                                       VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_UNPAUSED);
 }
 
+static int
+parallelsDomainResume(virDomainPtr domain)
+{
+    return parallelsDomainResumeFlags(domain, 0);
+}
+
 static int parallelsStart(virDomainObjPtr privdom)
 {
     return parallelsCmdRun(PRLCTL, "start", PARALLELS_UUID(privdom), NULL);
@@ -2490,6 +2498,7 @@ static virHypervisorDriver parallelsDriver = {
     .domainGetVcpus = parallelsDomainGetVcpus, /* 1.2.6 */
     .domainSuspend = parallelsDomainSuspend,    /* 0.10.0 */
     .domainResume = parallelsDomainResume,    /* 0.10.0 */
+    .domainResumeFlags = parallelsDomainResumeFlags, /* 1.2.10 */
     .domainDestroy = parallelsDomainDestroy,  /* 0.10.0 */
     .domainShutdown = parallelsDomainShutdown, /* 0.10.0 */
     .domainCreate = parallelsDomainCreate,    /* 0.10.0 */
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 09617c8..8b4cc40 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -3308,7 +3308,8 @@ phypDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
 }
 
 static int
-phypDomainResume(virDomainPtr dom)
+phypDomainResumeFlags(virDomainPtr dom,
+                      unsigned int flags)
 {
     int result = -1;
     ConnectionData *connection_data = dom->conn->networkPrivateData;
@@ -3320,6 +3321,8 @@ phypDomainResume(virDomainPtr dom)
     char *ret = NULL;
     virBuffer buf = VIR_BUFFER_INITIALIZER;
 
+    virCheckFlags(0, -1);
+
     virBufferAddLit(&buf, "chsysstate");
     if (system_type == HMC)
         virBufferAsprintf(&buf, " -m %s", managed_system);
@@ -3339,6 +3342,12 @@ phypDomainResume(virDomainPtr dom)
 }
 
 static int
+phypDomainResume(virDomainPtr dom)
+{
+    return phypDomainResumeFlags(dom, 0);
+}
+
+static int
 phypDomainReboot(virDomainPtr dom, unsigned int flags)
 {
     int result = -1;
@@ -3731,6 +3740,7 @@ static virHypervisorDriver phypDriver = {
     .domainLookupByID = phypDomainLookupByID, /* 0.7.0 */
     .domainLookupByName = phypDomainLookupByName, /* 0.7.0 */
     .domainResume = phypDomainResume, /* 0.7.0 */
+    .domainResumeFlags = phypDomainResumeFlags, /* 1.2.10 */
     .domainShutdown = phypDomainShutdown, /* 0.7.0 */
     .domainReboot = phypDomainReboot, /* 0.9.1 */
     .domainDestroy = phypDomainDestroy, /* 0.7.3 */
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 6acaea8..b866ae8 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1868,7 +1868,9 @@ static int qemuDomainSuspend(virDomainPtr dom)
 }
 
 
-static int qemuDomainResume(virDomainPtr dom)
+static int
+qemuDomainResumeFlags(virDomainPtr dom,
+                      unsigned int flags)
 {
     virQEMUDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
@@ -1878,12 +1880,14 @@ static int qemuDomainResume(virDomainPtr dom)
     virQEMUDriverConfigPtr cfg = NULL;
     virCapsPtr caps = NULL;
 
+    virCheckFlags(0, -1);
+
     if (!(vm = qemuDomObjFromDomain(dom)))
         return -1;
 
     cfg = virQEMUDriverGetConfig(driver);
 
-    if (virDomainResumeEnsureACL(dom->conn, vm->def) < 0)
+    if (virDomainResumeFlagsEnsureACL(dom->conn, vm->def) < 0)
         goto cleanup;
 
     if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
@@ -1933,6 +1937,12 @@ static int qemuDomainResume(virDomainPtr dom)
     return ret;
 }
 
+static int
+qemuDomainResume(virDomainPtr dom)
+{
+    return qemuDomainResumeFlags(dom, 0);
+}
+
 static int qemuDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
 {
     virQEMUDriverPtr driver = dom->conn->privateData;
@@ -18618,6 +18628,7 @@ static virHypervisorDriver qemuDriver = {
     .domainLookupByName = qemuDomainLookupByName, /* 0.2.0 */
     .domainSuspend = qemuDomainSuspend, /* 0.2.0 */
     .domainResume = qemuDomainResume, /* 0.2.0 */
+    .domainResumeFlags = qemuDomainResumeFlags, /* 1.2.10 */
     .domainShutdown = qemuDomainShutdown, /* 0.2.0 */
     .domainShutdownFlags = qemuDomainShutdownFlags, /* 0.9.10 */
     .domainReboot = qemuDomainReboot, /* 0.9.3 */
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 2afd6fe..1054121 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -1921,13 +1921,17 @@ static int testDomainDestroy(virDomainPtr domain)
     return ret;
 }
 
-static int testDomainResume(virDomainPtr domain)
+static int
+testDomainResumeFlags(virDomainPtr domain,
+                      unsigned int flags)
 {
     testConnPtr privconn = domain->conn->privateData;
     virDomainObjPtr privdom;
     virObjectEventPtr event = NULL;
     int ret = -1;
 
+    virCheckFlags(0, -1);
+
     testDriverLock(privconn);
     privdom = virDomainObjListFindByName(privconn->domains,
                                          domain->name);
@@ -1962,6 +1966,12 @@ static int testDomainResume(virDomainPtr domain)
     return ret;
 }
 
+static int
+testDomainResume(virDomainPtr domain)
+{
+    return testDomainResumeFlags(domain, 0);
+}
+
 static int testDomainSuspend(virDomainPtr domain)
 {
     testConnPtr privconn = domain->conn->privateData;
@@ -7375,6 +7385,7 @@ static virHypervisorDriver testDriver = {
     .domainLookupByName = testDomainLookupByName, /* 0.1.1 */
     .domainSuspend = testDomainSuspend, /* 0.1.1 */
     .domainResume = testDomainResume, /* 0.1.1 */
+    .domainResumeFlags = testDomainResumeFlags, /* 1.2.10 */
     .domainShutdown = testDomainShutdown, /* 0.1.1 */
     .domainShutdownFlags = testDomainShutdownFlags, /* 0.9.10 */
     .domainReboot = testDomainReboot, /* 0.1.1 */
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index bc80338..7d83e04 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -2474,7 +2474,8 @@ static int vboxDomainSuspend(virDomainPtr dom)
     return ret;
 }
 
-static int vboxDomainResume(virDomainPtr dom)
+static int vboxDomainResumeFlags(virDomainPtr dom,
+                                 unsigned int flags)
 {
     vboxGlobalData *data = dom->conn->privateData;
     IMachine *machine    = NULL;
@@ -2484,6 +2485,8 @@ static int vboxDomainResume(virDomainPtr dom)
     PRBool isAccessible = PR_FALSE;
     int ret = -1;
 
+    virCheckFlags(0, -1);
+
     if (!data->vboxObj)
         return ret;
 
@@ -2525,6 +2528,11 @@ static int vboxDomainResume(virDomainPtr dom)
     return ret;
 }
 
+static int vboxDomainResume(virDomainPtr dom)
+{
+    return vboxDomainResumeFlags(dom, 0);
+}
+
 static int vboxDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
 {
     vboxGlobalData *data = dom->conn->privateData;
@@ -7617,6 +7625,7 @@ virHypervisorDriver vboxCommonDriver = {
     .domainLookupByName = vboxDomainLookupByName, /* 0.6.3 */
     .domainSuspend = vboxDomainSuspend, /* 0.6.3 */
     .domainResume = vboxDomainResume, /* 0.6.3 */
+    .domainResumeFlags = vboxDomainResumeFlags, /* 1.2.10 */
     .domainShutdown = vboxDomainShutdown, /* 0.6.3 */
     .domainShutdownFlags = vboxDomainShutdownFlags, /* 0.9.10 */
     .domainReboot = vboxDomainReboot, /* 0.6.3 */
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index c3fa2dc..e16222c 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -543,7 +543,8 @@ vmwareDomainSuspend(virDomainPtr dom)
 }
 
 static int
-vmwareDomainResume(virDomainPtr dom)
+vmwareDomainResumeFlags(virDomainPtr dom,
+                        unsigned int flags)
 {
     struct vmware_driver *driver = dom->conn->privateData;
 
@@ -554,6 +555,8 @@ vmwareDomainResume(virDomainPtr dom)
     };
     int ret = -1;
 
+    virCheckFlags(0, -1);
+
     if (driver->type == VMWARE_DRIVER_PLAYER) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                        _("vmplayer does not support libvirt suspend/resume "
@@ -592,6 +595,12 @@ vmwareDomainResume(virDomainPtr dom)
 }
 
 static int
+vmwareDomainResume(virDomainPtr dom)
+{
+    return vmwareDomainResumeFlags(dom, 0);
+}
+
+static int
 vmwareDomainReboot(virDomainPtr dom, unsigned int flags)
 {
     struct vmware_driver *driver = dom->conn->privateData;
@@ -1198,6 +1207,7 @@ static virHypervisorDriver vmwareDriver = {
     .domainLookupByName = vmwareDomainLookupByName, /* 0.8.7 */
     .domainSuspend = vmwareDomainSuspend, /* 0.8.7 */
     .domainResume = vmwareDomainResume, /* 0.8.7 */
+    .domainResumeFlags = vmwareDomainResumeFlags, /* 1.2.10 */
     .domainShutdown = vmwareDomainShutdown, /* 0.8.7 */
     .domainShutdownFlags = vmwareDomainShutdownFlags, /* 0.9.10 */
     .domainReboot = vmwareDomainReboot, /* 0.8.7 */
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 5f7c98f..86f8556 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -949,15 +949,18 @@ xenUnifiedDomainSuspend(virDomainPtr dom)
 }
 
 static int
-xenUnifiedDomainResume(virDomainPtr dom)
+xenUnifiedDomainResumeFlags(virDomainPtr dom,
+                            unsigned int flags)
 {
     int ret = -1;
     virDomainDefPtr def;
 
+    virCheckFlags(0, -1);
+
     if (!(def = xenGetDomainDefForDom(dom)))
         goto cleanup;
 
-    if (virDomainResumeEnsureACL(dom->conn, def) < 0)
+    if (virDomainResumeFlagsEnsureACL(dom->conn, def) < 0)
         goto cleanup;
 
     ret = xenDaemonDomainResume(dom->conn, def);
@@ -968,6 +971,12 @@ xenUnifiedDomainResume(virDomainPtr dom)
 }
 
 static int
+xenUnifiedDomainResume(virDomainPtr dom)
+{
+    return xenUnifiedDomainResumeFlags(dom, 0);
+}
+
+static int
 xenUnifiedDomainShutdownFlags(virDomainPtr dom,
                               unsigned int flags)
 {
@@ -2765,6 +2774,7 @@ static virHypervisorDriver xenUnifiedDriver = {
     .domainLookupByName = xenUnifiedDomainLookupByName, /* 0.0.3 */
     .domainSuspend = xenUnifiedDomainSuspend, /* 0.0.3 */
     .domainResume = xenUnifiedDomainResume, /* 0.0.3 */
+    .domainResumeFlags = xenUnifiedDomainResumeFlags, /* 1.2.10 */
     .domainShutdown = xenUnifiedDomainShutdown, /* 0.0.3 */
     .domainShutdownFlags = xenUnifiedDomainShutdownFlags, /* 0.9.10 */
     .domainReboot = xenUnifiedDomainReboot, /* 0.1.0 */
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index ed4f7e8..a78b82b 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -766,18 +766,22 @@ xenapiDomainSuspend(virDomainPtr dom)
 }
 
 /*
- * xenapiDomainResume
+ * xenapiDomainResumeFlags
  *
  * Resumes a VM
  * Returns 0 on success or -1 in case of error
  */
 static int
-xenapiDomainResume(virDomainPtr dom)
+xenapiDomainResumeFlags(virDomainPtr dom,
+                        unsigned int flags)
 {
     /* vm.unpause() */
     xen_vm vm;
     xen_vm_set *vms;
     xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
+
+    virCheckFlags(0, -1);
+
     if (xen_vm_get_by_name_label(session, &vms, dom->name) && vms->size > 0) {
         if (vms->size != 1) {
             xenapiSessionErrorHandler(dom->conn, VIR_ERR_INTERNAL_ERROR,
@@ -802,6 +806,18 @@ xenapiDomainResume(virDomainPtr dom)
 }
 
 /*
+ * xenapiDomainResume
+ *
+ * Resumes a VM
+ * Returns 0 on success or -1 in case of error
+ */
+static int
+xenapiDomainResume(virDomainPtr dom)
+{
+    return xenapiDomainResumeFlags(dom, 0);
+}
+
+/*
  * xenapiDomainShutdown
  *
  * shutsdown a VM
@@ -1983,6 +1999,7 @@ static virHypervisorDriver xenapiDriver = {
     .domainLookupByName = xenapiDomainLookupByName, /* 0.8.0 */
     .domainSuspend = xenapiDomainSuspend, /* 0.8.0 */
     .domainResume = xenapiDomainResume, /* 0.8.0 */
+    .domainResumeFlags = xenapiDomainResumeFlags, /* 1.2.10 */
     .domainShutdown = xenapiDomainShutdown, /* 0.8.0 */
     .domainShutdownFlags = xenapiDomainShutdownFlags, /* 0.9.10 */
     .domainReboot = xenapiDomainReboot, /* 0.8.0 */
-- 
2.0.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]