parallels: add a new vz connection driver and hypervisor structures

We add this connection driver just as an exact copy with different
name to keep backward compatibility.
Vz stands for Virtuozzo, which is a new name of Parallels Cloud Server.

Signed-off-by: Maxim Nestratov <mnestratov@parallels.com>
This commit is contained in:
Maxim Nestratov 2015-05-26 20:12:00 +03:00 committed by Dmitry Guryanov
parent f4e51d9e41
commit 26385e9477

View File

@ -1216,8 +1216,8 @@ parallelsDomainGetMaxMemory(virDomainPtr domain)
return ret;
}
static virHypervisorDriver parallelsDriver = {
.name = "Parallels",
static virHypervisorDriver vzDriver = {
.name = "vz",
.connectOpen = parallelsConnectOpen, /* 0.10.0 */
.connectClose = parallelsConnectClose, /* 0.10.0 */
.connectGetVersion = parallelsConnectGetVersion, /* 0.10.0 */
@ -1267,12 +1267,16 @@ static virHypervisorDriver parallelsDriver = {
.domainGetMaxMemory = parallelsDomainGetMaxMemory, /* 1.2.15 */
};
static virConnectDriver parallelsConnectDriver = {
.hypervisorDriver = &parallelsDriver,
static virConnectDriver vzConnectDriver = {
.hypervisorDriver = &vzDriver,
.storageDriver = &parallelsStorageDriver,
.networkDriver = &parallelsNetworkDriver,
};
/* Parallels domain type backward compatibility*/
static virHypervisorDriver parallelsDriver;
static virConnectDriver parallelsConnectDriver;
/**
* parallelsRegister:
*
@ -1291,8 +1295,16 @@ parallelsRegister(void)
VIR_FREE(prlctl_path);
/* Backward compatibility with Parallels domain type */
parallelsDriver = vzDriver;
parallelsDriver.name = "Parallels";
parallelsConnectDriver = vzConnectDriver;
parallelsConnectDriver.hypervisorDriver = &parallelsDriver;
if (virRegisterConnectDriver(&parallelsConnectDriver, false) < 0)
return -1;
if (virRegisterConnectDriver(&vzConnectDriver, false) < 0)
return -1;
return 0;
}