mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
sysinfo: define internal driver API
* src/driver.h (virDrvGetSysinfo): New typedef. (_virDriver): New callback member. * src/esx/esx_driver.c (esxDriver): Add stub for driver. * src/lxc/lxc_driver.c (lxcDriver): Likewise. * src/opennebula/one_driver.c (oneDriver): Likewise. * src/openvz/openvz_driver.c (openvzDriver): Likewise. * src/phyp/phyp_driver.c (phypDriver): Likewise. * src/qemu/qemu_driver.c (qemuDriver): Likewise. * src/remote/remote_driver.c (remote_driver): Likewise. * src/test/test_driver.c (testDriver): Likewise. * src/uml/uml_driver.c (umlDriver): Likewise. * src/vbox/vbox_tmpl.c (Driver): Likewise. * src/vmware/vmware_driver.c (vmwareDriver): Likewise. * src/xen/xen_driver.c (xenUnifiedDriver): Likewise. * src/xenapi/xenapi_driver.c (xenapiDriver): Likewise.
This commit is contained in:
parent
353b760953
commit
dec13a5a15
@ -83,6 +83,9 @@ typedef char *
|
|||||||
(*virDrvGetHostname) (virConnectPtr conn);
|
(*virDrvGetHostname) (virConnectPtr conn);
|
||||||
typedef char *
|
typedef char *
|
||||||
(*virDrvGetURI) (virConnectPtr conn);
|
(*virDrvGetURI) (virConnectPtr conn);
|
||||||
|
typedef char *
|
||||||
|
(*virDrvGetSysinfo) (virConnectPtr conn,
|
||||||
|
unsigned int flags);
|
||||||
typedef int
|
typedef int
|
||||||
(*virDrvGetMaxVcpus) (virConnectPtr conn,
|
(*virDrvGetMaxVcpus) (virConnectPtr conn,
|
||||||
const char *type);
|
const char *type);
|
||||||
@ -515,6 +518,7 @@ struct _virDriver {
|
|||||||
virDrvGetVersion version;
|
virDrvGetVersion version;
|
||||||
virDrvGetLibVersion libvirtVersion;
|
virDrvGetLibVersion libvirtVersion;
|
||||||
virDrvGetHostname getHostname;
|
virDrvGetHostname getHostname;
|
||||||
|
virDrvGetSysinfo getSysinfo;
|
||||||
virDrvGetMaxVcpus getMaxVcpus;
|
virDrvGetMaxVcpus getMaxVcpus;
|
||||||
virDrvNodeGetInfo nodeGetInfo;
|
virDrvNodeGetInfo nodeGetInfo;
|
||||||
virDrvGetCapabilities getCapabilities;
|
virDrvGetCapabilities getCapabilities;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* esx_driver.c: core driver functions for managing VMware ESX hosts
|
* esx_driver.c: core driver functions for managing VMware ESX hosts
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Red Hat, Inc.
|
* Copyright (C) 2010-2011 Red Hat, Inc.
|
||||||
* Copyright (C) 2009-2010 Matthias Bolte <matthias.bolte@googlemail.com>
|
* Copyright (C) 2009-2010 Matthias Bolte <matthias.bolte@googlemail.com>
|
||||||
* Copyright (C) 2009 Maximilian Wilhelm <max@rfc2324.org>
|
* Copyright (C) 2009 Maximilian Wilhelm <max@rfc2324.org>
|
||||||
*
|
*
|
||||||
@ -4557,6 +4557,7 @@ static virDriver esxDriver = {
|
|||||||
esxGetVersion, /* version */
|
esxGetVersion, /* version */
|
||||||
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
||||||
esxGetHostname, /* hostname */
|
esxGetHostname, /* hostname */
|
||||||
|
NULL, /* getSysinfo */
|
||||||
NULL, /* getMaxVcpus */
|
NULL, /* getMaxVcpus */
|
||||||
esxNodeGetInfo, /* nodeGetInfo */
|
esxNodeGetInfo, /* nodeGetInfo */
|
||||||
esxGetCapabilities, /* getCapabilities */
|
esxGetCapabilities, /* getCapabilities */
|
||||||
|
@ -2833,6 +2833,7 @@ static virDriver lxcDriver = {
|
|||||||
lxcVersion, /* version */
|
lxcVersion, /* version */
|
||||||
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
||||||
virGetHostname, /* getHostname */
|
virGetHostname, /* getHostname */
|
||||||
|
NULL, /* getSysinfo */
|
||||||
NULL, /* getMaxVcpus */
|
NULL, /* getMaxVcpus */
|
||||||
nodeGetInfo, /* nodeGetInfo */
|
nodeGetInfo, /* nodeGetInfo */
|
||||||
lxcGetCapabilities, /* getCapabilities */
|
lxcGetCapabilities, /* getCapabilities */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2010 Red Hat, Inc.
|
* Copyright (C) 2010-2011 Red Hat, Inc.
|
||||||
* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad
|
* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad
|
||||||
* Complutense de Madrid (dsa-research.org)
|
* Complutense de Madrid (dsa-research.org)
|
||||||
*
|
*
|
||||||
@ -732,6 +732,7 @@ static virDriver oneDriver = {
|
|||||||
oneVersion, /* version */
|
oneVersion, /* version */
|
||||||
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
||||||
NULL, /* getHostname */
|
NULL, /* getHostname */
|
||||||
|
NULL, /* getSysinfo */
|
||||||
NULL, /* getMaxVcpus */
|
NULL, /* getMaxVcpus */
|
||||||
NULL, /* nodeGetInfo */
|
NULL, /* nodeGetInfo */
|
||||||
oneGetCapabilities, /* getCapabilities */
|
oneGetCapabilities, /* getCapabilities */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* openvz_driver.c: core driver methods for managing OpenVZ VEs
|
* openvz_driver.c: core driver methods for managing OpenVZ VEs
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Red Hat, Inc.
|
* Copyright (C) 2010-2011 Red Hat, Inc.
|
||||||
* Copyright (C) 2006, 2007 Binary Karma
|
* Copyright (C) 2006, 2007 Binary Karma
|
||||||
* Copyright (C) 2006 Shuveb Hussain
|
* Copyright (C) 2006 Shuveb Hussain
|
||||||
* Copyright (C) 2007 Anoop Joe Cyriac
|
* Copyright (C) 2007 Anoop Joe Cyriac
|
||||||
@ -1572,6 +1572,7 @@ static virDriver openvzDriver = {
|
|||||||
openvzGetVersion, /* version */
|
openvzGetVersion, /* version */
|
||||||
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
||||||
NULL, /* getHostname */
|
NULL, /* getHostname */
|
||||||
|
NULL, /* getSysinfo */
|
||||||
openvzGetMaxVCPUs, /* getMaxVcpus */
|
openvzGetMaxVCPUs, /* getMaxVcpus */
|
||||||
nodeGetInfo, /* nodeGetInfo */
|
nodeGetInfo, /* nodeGetInfo */
|
||||||
openvzGetCapabilities, /* getCapabilities */
|
openvzGetCapabilities, /* getCapabilities */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2010 Red Hat, Inc.
|
* Copyright (C) 2010-2011 Red Hat, Inc.
|
||||||
* Copyright IBM Corp. 2009
|
* Copyright IBM Corp. 2009
|
||||||
*
|
*
|
||||||
* phyp_driver.c: ssh layer to access Power Hypervisors
|
* phyp_driver.c: ssh layer to access Power Hypervisors
|
||||||
@ -3954,6 +3954,7 @@ static virDriver phypDriver = {
|
|||||||
NULL, /* version */
|
NULL, /* version */
|
||||||
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
||||||
NULL, /* getHostname */
|
NULL, /* getHostname */
|
||||||
|
NULL, /* getSysinfo */
|
||||||
NULL, /* getMaxVcpus */
|
NULL, /* getMaxVcpus */
|
||||||
NULL, /* nodeGetInfo */
|
NULL, /* nodeGetInfo */
|
||||||
phypConnectGetCapabilities, /* getCapabilities */
|
phypConnectGetCapabilities, /* getCapabilities */
|
||||||
|
@ -10375,6 +10375,7 @@ static virDriver qemuDriver = {
|
|||||||
qemudGetVersion, /* version */
|
qemudGetVersion, /* version */
|
||||||
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
||||||
virGetHostname, /* getHostname */
|
virGetHostname, /* getHostname */
|
||||||
|
NULL, /* getSysinfo */
|
||||||
qemudGetMaxVCPUs, /* getMaxVcpus */
|
qemudGetMaxVCPUs, /* getMaxVcpus */
|
||||||
nodeGetInfo, /* nodeGetInfo */
|
nodeGetInfo, /* nodeGetInfo */
|
||||||
qemudGetCapabilities, /* getCapabilities */
|
qemudGetCapabilities, /* getCapabilities */
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* remote_internal.c: driver to provide access to libvirtd running
|
* remote_internal.c: driver to provide access to libvirtd running
|
||||||
* on a remote machine
|
* on a remote machine
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2010 Red Hat, Inc.
|
* Copyright (C) 2007-2011 Red Hat, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -10823,6 +10823,7 @@ static virDriver remote_driver = {
|
|||||||
remoteGetVersion, /* version */
|
remoteGetVersion, /* version */
|
||||||
remoteGetLibVersion, /* libvirtVersion */
|
remoteGetLibVersion, /* libvirtVersion */
|
||||||
remoteGetHostname, /* getHostname */
|
remoteGetHostname, /* getHostname */
|
||||||
|
NULL, /* getSysinfo */
|
||||||
remoteGetMaxVcpus, /* getMaxVcpus */
|
remoteGetMaxVcpus, /* getMaxVcpus */
|
||||||
remoteNodeGetInfo, /* nodeGetInfo */
|
remoteNodeGetInfo, /* nodeGetInfo */
|
||||||
remoteGetCapabilities, /* getCapabilities */
|
remoteGetCapabilities, /* getCapabilities */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* test.c: A "mock" hypervisor for use by application unit tests
|
* test.c: A "mock" hypervisor for use by application unit tests
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2010 Red Hat, Inc.
|
* Copyright (C) 2006-2011 Red Hat, Inc.
|
||||||
* Copyright (C) 2006 Daniel P. Berrange
|
* Copyright (C) 2006 Daniel P. Berrange
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -5346,6 +5346,7 @@ static virDriver testDriver = {
|
|||||||
testGetVersion, /* version */
|
testGetVersion, /* version */
|
||||||
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
||||||
virGetHostname, /* getHostname */
|
virGetHostname, /* getHostname */
|
||||||
|
NULL, /* getSysinfo */
|
||||||
testGetMaxVCPUs, /* getMaxVcpus */
|
testGetMaxVCPUs, /* getMaxVcpus */
|
||||||
testNodeGetInfo, /* nodeGetInfo */
|
testNodeGetInfo, /* nodeGetInfo */
|
||||||
testGetCapabilities, /* getCapabilities */
|
testGetCapabilities, /* getCapabilities */
|
||||||
|
@ -2148,6 +2148,7 @@ static virDriver umlDriver = {
|
|||||||
umlGetVersion, /* version */
|
umlGetVersion, /* version */
|
||||||
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
||||||
virGetHostname, /* getHostname */
|
virGetHostname, /* getHostname */
|
||||||
|
NULL, /* getSysinfo */
|
||||||
NULL, /* getMaxVcpus */
|
NULL, /* getMaxVcpus */
|
||||||
nodeGetInfo, /* nodeGetInfo */
|
nodeGetInfo, /* nodeGetInfo */
|
||||||
umlGetCapabilities, /* getCapabilities */
|
umlGetCapabilities, /* getCapabilities */
|
||||||
|
@ -8537,6 +8537,7 @@ virDriver NAME(Driver) = {
|
|||||||
vboxGetVersion, /* version */
|
vboxGetVersion, /* version */
|
||||||
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
||||||
virGetHostname, /* getHostname */
|
virGetHostname, /* getHostname */
|
||||||
|
NULL, /* getSysinfo */
|
||||||
vboxGetMaxVcpus, /* getMaxVcpus */
|
vboxGetMaxVcpus, /* getMaxVcpus */
|
||||||
nodeGetInfo, /* nodeGetInfo */
|
nodeGetInfo, /* nodeGetInfo */
|
||||||
vboxGetCapabilities, /* getCapabilities */
|
vboxGetCapabilities, /* getCapabilities */
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/* Copyright 2010, diateam (www.diateam.net)
|
/*
|
||||||
|
* Copyright (C) 2011 Red Hat, Inc.
|
||||||
|
* Copyright 2010, diateam (www.diateam.net)
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -906,6 +908,7 @@ static virDriver vmwareDriver = {
|
|||||||
vmwareGetVersion, /* version */
|
vmwareGetVersion, /* version */
|
||||||
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
||||||
NULL, /* getHostname */
|
NULL, /* getHostname */
|
||||||
|
NULL, /* getSysinfo */
|
||||||
NULL, /* getMaxVcpus */
|
NULL, /* getMaxVcpus */
|
||||||
NULL, /* nodeGetInfo */
|
NULL, /* nodeGetInfo */
|
||||||
NULL, /* getCapabilities */
|
NULL, /* getCapabilities */
|
||||||
|
@ -2004,6 +2004,7 @@ static virDriver xenUnifiedDriver = {
|
|||||||
xenUnifiedGetVersion, /* version */
|
xenUnifiedGetVersion, /* version */
|
||||||
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
||||||
virGetHostname, /* getHostname */
|
virGetHostname, /* getHostname */
|
||||||
|
NULL, /* getSysinfo */
|
||||||
xenUnifiedGetMaxVcpus, /* getMaxVcpus */
|
xenUnifiedGetMaxVcpus, /* getMaxVcpus */
|
||||||
xenUnifiedNodeGetInfo, /* nodeGetInfo */
|
xenUnifiedNodeGetInfo, /* nodeGetInfo */
|
||||||
xenUnifiedGetCapabilities, /* getCapabilities */
|
xenUnifiedGetCapabilities, /* getCapabilities */
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* xenapi_driver.c: Xen API driver.
|
* xenapi_driver.c: Xen API driver.
|
||||||
|
* Copyright (C) 2011 Red Hat, Inc.
|
||||||
* Copyright (C) 2009, 2010 Citrix Ltd.
|
* Copyright (C) 2009, 2010 Citrix Ltd.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -1783,6 +1784,7 @@ static virDriver xenapiDriver = {
|
|||||||
xenapiGetVersion, /* version */
|
xenapiGetVersion, /* version */
|
||||||
NULL, /*getlibvirtVersion */
|
NULL, /*getlibvirtVersion */
|
||||||
xenapiGetHostname, /* getHostname */
|
xenapiGetHostname, /* getHostname */
|
||||||
|
NULL, /* getSysinfo */
|
||||||
xenapiGetMaxVcpus, /* getMaxVcpus */
|
xenapiGetMaxVcpus, /* getMaxVcpus */
|
||||||
xenapiNodeGetInfo, /* nodeGetInfo */
|
xenapiNodeGetInfo, /* nodeGetInfo */
|
||||||
xenapiGetCapabilities, /* getCapabilities */
|
xenapiGetCapabilities, /* getCapabilities */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user