From: Alexander Burluka <aburluka(a)parallels.com>
That function is necessary for proper domain removal
in openstack/nova.
Signed-off-by: Dmitry Guryanov <dguryanov(a)parallels.com>
---
src/parallels/parallels_driver.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c
index 5633eab..a3d9980 100644
--- a/src/parallels/parallels_driver.c
+++ b/src/parallels/parallels_driver.c
@@ -860,6 +860,24 @@ parallelsConnectDomainEventDeregisterAny(virConnectPtr conn,
return ret;
}
+static int parallelsDomainIsActive(virDomainPtr domain)
+{
+ parallelsConnPtr privconn = domain->conn->privateData;
+ virDomainObjPtr dom = NULL;
+ int ret = -1;
+
+ dom = virDomainObjListFindByUUID(privconn->domains, domain->uuid);
+ if (dom == NULL) {
+ parallelsDomNotFoundError(domain);
+ return -1;
+ }
+
+ ret = virDomainObjIsActive(dom);
+ virObjectUnlock(dom);
+
+ return ret;
+}
+
static virDriver parallelsDriver = {
.no = VIR_DRV_PARALLELS,
.name = "Parallels",
@@ -891,6 +909,7 @@ static virDriver parallelsDriver = {
.domainShutdown = prlsdkDomainShutdown, /* 0.10.0 */
.domainCreate = prlsdkDomainCreate, /* 0.10.0 */
.domainDefineXML = parallelsDomainDefineXML, /* 0.10.0 */
+ .domainIsActive = parallelsDomainIsActive, /* 1.2.10 */
.connectDomainEventRegisterAny = parallelsConnectDomainEventRegisterAny, /* 1.2.10
*/
.connectDomainEventDeregisterAny = parallelsConnectDomainEventDeregisterAny, /*
1.2.10 */
.nodeGetCPUMap = parallelsNodeGetCPUMap, /* 1.2.8 */
--
1.9.3