mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
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:
parent
f4e51d9e41
commit
26385e9477
@ -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 = ¶llelsDriver,
|
||||
static virConnectDriver vzConnectDriver = {
|
||||
.hypervisorDriver = &vzDriver,
|
||||
.storageDriver = ¶llelsStorageDriver,
|
||||
.networkDriver = ¶llelsNetworkDriver,
|
||||
};
|
||||
|
||||
/* 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 = ¶llelsDriver;
|
||||
if (virRegisterConnectDriver(¶llelsConnectDriver, false) < 0)
|
||||
return -1;
|
||||
|
||||
if (virRegisterConnectDriver(&vzConnectDriver, false) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user