提交 26385e94 编写于 作者: M Maxim Nestratov 提交者: Dmitry Guryanov

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: NMaxim Nestratov <mnestratov@parallels.com>
上级 f4e51d9e
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册