define internal driver API

* src/driver.h (new typedef, new callback member for "_virDriver")
* src/esx/esx_driver.c
* src/lxc/lxc_driver.c
* src/opennebula/one_driver.c
* src/openvz/openvz_driver.c
* src/phyp/phyp_driver.c
* src/qemu/qemu_driver.c
* src/remote/remote_driver.c
* src/test/test_driver.c
* src/uml/uml_driver.c
* src/vbox/vbox_tmpl.c
* src/xen/xen_driver.c
* src/xenapi/xenapi_driver.c
This commit is contained in:
Osier Yang 2010-11-15 11:23:33 +08:00 committed by Eric Blake
parent 347d73f211
commit 37a02efd71
13 changed files with 15 additions and 0 deletions

View File

@ -395,6 +395,8 @@ typedef int
(*virDrvDomainIsActive)(virDomainPtr dom); (*virDrvDomainIsActive)(virDomainPtr dom);
typedef int typedef int
(*virDrvDomainIsPersistent)(virDomainPtr dom); (*virDrvDomainIsPersistent)(virDomainPtr dom);
typedef int
(*virDrvDomainIsUpdated)(virDomainPtr dom);
typedef int typedef int
(*virDrvCPUCompare)(virConnectPtr conn, (*virDrvCPUCompare)(virConnectPtr conn,
@ -581,6 +583,7 @@ struct _virDriver {
virDrvConnectIsSecure isSecure; virDrvConnectIsSecure isSecure;
virDrvDomainIsActive domainIsActive; virDrvDomainIsActive domainIsActive;
virDrvDomainIsPersistent domainIsPersistent; virDrvDomainIsPersistent domainIsPersistent;
virDrvDomainIsUpdated domainIsUpdated;
virDrvCPUCompare cpuCompare; virDrvCPUCompare cpuCompare;
virDrvCPUBaseline cpuBaseline; virDrvCPUBaseline cpuBaseline;
virDrvDomainGetJobInfo domainGetJobInfo; virDrvDomainGetJobInfo domainGetJobInfo;

View File

@ -4360,6 +4360,7 @@ static virDriver esxDriver = {
esxIsSecure, /* isSecure */ esxIsSecure, /* isSecure */
esxDomainIsActive, /* domainIsActive */ esxDomainIsActive, /* domainIsActive */
esxDomainIsPersistent, /* domainIsPersistent */ esxDomainIsPersistent, /* domainIsPersistent */
NULL, /* domainIsUpdated */
NULL, /* cpuCompare */ NULL, /* cpuCompare */
NULL, /* cpuBaseline */ NULL, /* cpuBaseline */
NULL, /* domainGetJobInfo */ NULL, /* domainGetJobInfo */

View File

@ -2882,6 +2882,7 @@ static virDriver lxcDriver = {
lxcIsSecure, /* isSecure */ lxcIsSecure, /* isSecure */
lxcDomainIsActive, /* domainIsActive */ lxcDomainIsActive, /* domainIsActive */
lxcDomainIsPersistent, /* domainIsPersistent */ lxcDomainIsPersistent, /* domainIsPersistent */
NULL, /* domainIsUpdated */
NULL, /* cpuCompare */ NULL, /* cpuCompare */
NULL, /* cpuBaseline */ NULL, /* cpuBaseline */
NULL, /* domainGetJobInfo */ NULL, /* domainGetJobInfo */

View File

@ -800,6 +800,7 @@ static virDriver oneDriver = {
oneIsSecure, /* isSecure */ oneIsSecure, /* isSecure */
NULL, /* domainIsActive */ NULL, /* domainIsActive */
NULL, /* domainIsPersistent */ NULL, /* domainIsPersistent */
NULL, /* domainIsUpdated */
NULL, /* cpuCompare */ NULL, /* cpuCompare */
NULL, /* cpuBaseline */ NULL, /* cpuBaseline */
NULL, /* domainGetJobInfo */ NULL, /* domainGetJobInfo */

View File

@ -1670,6 +1670,7 @@ static virDriver openvzDriver = {
openvzIsSecure, openvzIsSecure,
openvzDomainIsActive, openvzDomainIsActive,
openvzDomainIsPersistent, openvzDomainIsPersistent,
NULL, /* domainIsUpdated */
NULL, /* cpuCompare */ NULL, /* cpuCompare */
NULL, /* cpuBaseline */ NULL, /* cpuBaseline */
NULL, /* domainGetJobInfo */ NULL, /* domainGetJobInfo */

View File

@ -4021,6 +4021,7 @@ static virDriver phypDriver = {
phypIsSecure, /* isSecure */ phypIsSecure, /* isSecure */
NULL, /* domainIsActive */ NULL, /* domainIsActive */
NULL, /* domainIsPersistent */ NULL, /* domainIsPersistent */
NULL, /* domainIsUpdated */
NULL, /* cpuCompare */ NULL, /* cpuCompare */
NULL, /* cpuBaseline */ NULL, /* cpuBaseline */
NULL, /* domainGetJobInfo */ NULL, /* domainGetJobInfo */

View File

@ -13249,6 +13249,7 @@ static virDriver qemuDriver = {
qemuIsSecure, /* isSecure */ qemuIsSecure, /* isSecure */
qemuDomainIsActive, /* domainIsActive */ qemuDomainIsActive, /* domainIsActive */
qemuDomainIsPersistent, /* domainIsPersistent */ qemuDomainIsPersistent, /* domainIsPersistent */
NULL, /* domainIsUpdated */
qemuCPUCompare, /* cpuCompare */ qemuCPUCompare, /* cpuCompare */
qemuCPUBaseline, /* cpuBaseline */ qemuCPUBaseline, /* cpuBaseline */
qemuDomainGetJobInfo, /* domainGetJobInfo */ qemuDomainGetJobInfo, /* domainGetJobInfo */

View File

@ -10734,6 +10734,7 @@ static virDriver remote_driver = {
remoteIsSecure, /* isSecure */ remoteIsSecure, /* isSecure */
remoteDomainIsActive, /* domainIsActive */ remoteDomainIsActive, /* domainIsActive */
remoteDomainIsPersistent, /* domainIsPersistent */ remoteDomainIsPersistent, /* domainIsPersistent */
NULL, /* domainIsUpdated */
remoteCPUCompare, /* cpuCompare */ remoteCPUCompare, /* cpuCompare */
remoteCPUBaseline, /* cpuBaseline */ remoteCPUBaseline, /* cpuBaseline */
remoteDomainGetJobInfo, /* domainGetJobInfo */ remoteDomainGetJobInfo, /* domainGetJobInfo */

View File

@ -5413,6 +5413,7 @@ static virDriver testDriver = {
testIsSecure, /* isEncrypted */ testIsSecure, /* isEncrypted */
testDomainIsActive, /* domainIsActive */ testDomainIsActive, /* domainIsActive */
testDomainIsPersistent, /* domainIsPersistent */ testDomainIsPersistent, /* domainIsPersistent */
NULL, /* domainIsUpdated */
NULL, /* cpuCompare */ NULL, /* cpuCompare */
NULL, /* cpuBaseline */ NULL, /* cpuBaseline */
NULL, /* domainGetJobInfo */ NULL, /* domainGetJobInfo */

View File

@ -2248,6 +2248,7 @@ static virDriver umlDriver = {
umlIsSecure, /* isSecure */ umlIsSecure, /* isSecure */
umlDomainIsActive, /* domainIsActive */ umlDomainIsActive, /* domainIsActive */
umlDomainIsPersistent, /* domainIsPersistent */ umlDomainIsPersistent, /* domainIsPersistent */
NULL, /* domainIsUpdated */
NULL, /* cpuCompare */ NULL, /* cpuCompare */
NULL, /* cpuBaseline */ NULL, /* cpuBaseline */
NULL, /* domainGetJobInfo */ NULL, /* domainGetJobInfo */

View File

@ -8451,6 +8451,7 @@ virDriver NAME(Driver) = {
vboxIsSecure, /* isSecure */ vboxIsSecure, /* isSecure */
vboxDomainIsActive, /* domainIsActive */ vboxDomainIsActive, /* domainIsActive */
vboxDomainIsPersistent, /* domainIsPersistent */ vboxDomainIsPersistent, /* domainIsPersistent */
NULL, /* domainIsUpdated */
NULL, /* cpuCompare */ NULL, /* cpuCompare */
NULL, /* cpuBaseline */ NULL, /* cpuBaseline */
NULL, /* domainGetJobInfo */ NULL, /* domainGetJobInfo */

View File

@ -2070,6 +2070,7 @@ static virDriver xenUnifiedDriver = {
xenUnifiedIsSecure, /* isSecure */ xenUnifiedIsSecure, /* isSecure */
xenUnifiedDomainIsActive, /* domainIsActive */ xenUnifiedDomainIsActive, /* domainIsActive */
xenUnifiedDomainisPersistent, /* domainIsPersistent */ xenUnifiedDomainisPersistent, /* domainIsPersistent */
NULL, /* domainIsUpdated */
NULL, /* cpuCompare */ NULL, /* cpuCompare */
NULL, /* cpuBaseline */ NULL, /* cpuBaseline */
NULL, /* domainGetJobInfo */ NULL, /* domainGetJobInfo */

View File

@ -1847,6 +1847,7 @@ static virDriver xenapiDriver = {
NULL, /* isSecure */ NULL, /* isSecure */
NULL, /* domainIsActive */ NULL, /* domainIsActive */
NULL, /* domainIsPersistent */ NULL, /* domainIsPersistent */
NULL, /* domainIsUpdated */
NULL, /* cpuCompare */ NULL, /* cpuCompare */
NULL, /* cpuBaseline */ NULL, /* cpuBaseline */
NULL, /* domainGetJobInfo */ NULL, /* domainGetJobInfo */