virNodeGetCPUTime: Define internal driver API
Signed-off-by: Minoru Usui <usui(a)mxm.nes.nec.co.jp>
---
src/driver.h | 8 ++++++++
src/esx/esx_driver.c | 1 +
src/libxl/libxl_driver.c | 1 +
src/lxc/lxc_driver.c | 1 +
src/openvz/openvz_driver.c | 1 +
src/phyp/phyp_driver.c | 1 +
src/qemu/qemu_driver.c | 1 +
src/remote/remote_driver.c | 1 +
src/test/test_driver.c | 1 +
src/uml/uml_driver.c | 1 +
src/vbox/vbox_tmpl.c | 1 +
src/vmware/vmware_driver.c | 1 +
src/xen/xen_driver.c | 1 +
src/xenapi/xenapi_driver.c | 1 +
14 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/src/driver.h b/src/driver.h
index e5f91ca..e03bcd4 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -347,6 +347,13 @@ typedef struct _virDriver virDriver;
typedef virDriver *virDriverPtr;
typedef int
+ (*virDrvNodeGetCpuTime)
+ (virConnectPtr conn,
+ struct _virNodeCpuTime *stats,
+ unsigned int nr_stats,
+ unsigned int flags);
+
+typedef int
(*virDrvNodeGetCellsFreeMemory)
(virConnectPtr conn,
unsigned long long *freeMems,
@@ -602,6 +609,7 @@ struct _virDriver {
virDrvDomainBlockPeek domainBlockPeek;
virDrvDomainMemoryPeek domainMemoryPeek;
virDrvDomainGetBlockInfo domainGetBlockInfo;
+ virDrvNodeGetCpuTime nodeGetCpuTime;
virDrvNodeGetCellsFreeMemory nodeGetCellsFreeMemory;
virDrvNodeGetFreeMemory getFreeMemory;
virDrvDomainEventRegister domainEventRegister;
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index deda372..6e55949 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -4638,6 +4638,7 @@ static virDriver esxDriver = {
NULL, /* domainBlockPeek */
NULL, /* domainMemoryPeek */
NULL, /* domainGetBlockInfo */
+ NULL, /* nodeGetCpuTime */
NULL, /* nodeGetCellsFreeMemory */
esxNodeGetFreeMemory, /* nodeGetFreeMemory */
NULL, /* domainEventRegister */
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 75f99c1..a9907a1 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -2443,6 +2443,7 @@ static virDriver libxlDriver = {
NULL, /* domainBlockPeek */
NULL, /* domainMemoryPeek */
NULL, /* domainGetBlockInfo */
+ NULL, /* nodeGetCpuTime */
NULL, /* nodeGetCellsFreeMemory */
libxlNodeGetFreeMemory, /* getFreeMemory */
libxlDomainEventRegister, /* domainEventRegister */
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index e905302..0e0c325 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -2869,6 +2869,7 @@ static virDriver lxcDriver = {
NULL, /* domainBlockPeek */
NULL, /* domainMemoryPeek */
NULL, /* domainGetBlockInfo */
+ nodeGetCpuTime, /* nodeGetCpuTime */
nodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
nodeGetFreeMemory, /* getFreeMemory */
lxcDomainEventRegister, /* domainEventRegister */
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index fb30c37..7335c8d 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -1617,6 +1617,7 @@ static virDriver openvzDriver = {
NULL, /* domainBlockPeek */
NULL, /* domainMemoryPeek */
NULL, /* domainGetBlockInfo */
+ NULL, /* nodeGetCpuTime */
NULL, /* nodeGetCellsFreeMemory */
NULL, /* getFreeMemory */
NULL, /* domainEventRegister */
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index b17d90b..e274cef 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -4026,6 +4026,7 @@ static virDriver phypDriver = {
NULL, /* domainBlockPeek */
NULL, /* domainMemoryPeek */
NULL, /* domainGetBlockInfo */
+ NULL, /* nodeGetCpuTime */
NULL, /* nodeGetCellsFreeMemory */
NULL, /* getFreeMemory */
NULL, /* domainEventRegister */
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 48fe266..dca8f5c 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6889,6 +6889,7 @@ static virDriver qemuDriver = {
qemudDomainBlockPeek, /* domainBlockPeek */
qemudDomainMemoryPeek, /* domainMemoryPeek */
qemuDomainGetBlockInfo, /* domainGetBlockInfo */
+ nodeGetCpuTime, /* nodeGetCpuTime */
nodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
nodeGetFreeMemory, /* getFreeMemory */
qemuDomainEventRegister, /* domainEventRegister */
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 166968a..8bac0cc 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -11261,6 +11261,7 @@ static virDriver remote_driver = {
remoteDomainBlockPeek, /* domainBlockPeek */
remoteDomainMemoryPeek, /* domainMemoryPeek */
remoteDomainGetBlockInfo, /* domainGetBlockInfo */
+ remoteNodeGetCpuTime, /* nodeGetCpuTime */
remoteNodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
remoteNodeGetFreeMemory, /* getFreeMemory */
remoteDomainEventRegister, /* domainEventRegister */
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 17f5ad9..f122935 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -5410,6 +5410,7 @@ static virDriver testDriver = {
NULL, /* domainBlockPeek */
NULL, /* domainMemoryPeek */
NULL, /* domainGetBlockInfo */
+ NULL, /* nodeGetCpuTime */
testNodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
NULL, /* getFreeMemory */
testDomainEventRegister, /* domainEventRegister */
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index e2bd5f2..93fb59e 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -2212,6 +2212,7 @@ static virDriver umlDriver = {
umlDomainBlockPeek, /* domainBlockPeek */
NULL, /* domainMemoryPeek */
NULL, /* domainGetBlockInfo */
+ nodeGetCpuTime, /* nodeGetCpuTime */
nodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
nodeGetFreeMemory, /* getFreeMemory */
NULL, /* domainEventRegister */
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 0fbfba5..d500ab2 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -8600,6 +8600,7 @@ virDriver NAME(Driver) = {
NULL, /* domainBlockPeek */
NULL, /* domainMemoryPeek */
NULL, /* domainGetBlockInfo */
+ NULL, /* nodeGetCpuTime */
nodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
nodeGetFreeMemory, /* getFreeMemory */
#if VBOX_API_VERSION == 2002 || VBOX_API_VERSION == 4000
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index b5e416b..635aa59 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -970,6 +970,7 @@ static virDriver vmwareDriver = {
NULL, /* domainBlockPeek */
NULL, /* domainMemoryPeek */
NULL, /* domainGetBlockInfo */
+ NULL, /* nodeGetCpuTime */
NULL, /* nodeGetCellsFreeMemory */
NULL, /* getFreeMemory */
NULL, /* domainEventRegister */
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 9f47722..af18baa 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -2104,6 +2104,7 @@ static virDriver xenUnifiedDriver = {
xenUnifiedDomainBlockPeek, /* domainBlockPeek */
NULL, /* domainMemoryPeek */
NULL, /* domainGetBlockInfo */
+ NULL, /* nodeGetCpuTime */
xenUnifiedNodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
xenUnifiedNodeGetFreeMemory, /* getFreeMemory */
xenUnifiedDomainEventRegister, /* domainEventRegister */
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index 60b23c7..6371d03 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -1852,6 +1852,7 @@ static virDriver xenapiDriver = {
NULL, /* domainBlockPeek */
NULL, /* domainMemoryPeek */
NULL, /* domainGetBlockInfo */
+ NULL, /* nodeGetCpuTime */
xenapiNodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
xenapiNodeGetFreeMemory, /* getFreeMemory */
NULL, /* domainEventRegister */
--
1.7.1
--
Minoru Usui <usui(a)mxm.nes.nec.co.jp>