mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
Implement capabilities and nodeinfo APIs
This commit is contained in:
parent
b0b968efd5
commit
0ca460eada
@ -1,3 +1,7 @@
|
|||||||
|
Wed Jun 3 14:29:52 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
|
* src/lxc_driver.c: Implement capabilities and nodeinfo APIs
|
||||||
|
|
||||||
Wed Jun 3 14:28:52 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
Wed Jun 3 14:28:52 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
Generic shared impls of all NUMA apis
|
Generic shared impls of all NUMA apis
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
#include "veth.h"
|
#include "veth.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "cgroup.h"
|
#include "cgroup.h"
|
||||||
|
#include "nodeinfo.h"
|
||||||
|
|
||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_LXC
|
#define VIR_FROM_THIS VIR_FROM_LXC
|
||||||
@ -115,6 +116,19 @@ static int lxcClose(virConnectPtr conn)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char *lxcGetCapabilities(virConnectPtr conn) {
|
||||||
|
lxc_driver_t *driver = conn->privateData;
|
||||||
|
char *xml;
|
||||||
|
|
||||||
|
lxcDriverLock(driver);
|
||||||
|
if ((xml = virCapabilitiesFormatXML(driver->caps)) == NULL)
|
||||||
|
virReportOOMError(conn);
|
||||||
|
lxcDriverUnlock(driver);
|
||||||
|
|
||||||
|
return xml;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static virDomainPtr lxcDomainLookupByID(virConnectPtr conn,
|
static virDomainPtr lxcDomainLookupByID(virConnectPtr conn,
|
||||||
int id)
|
int id)
|
||||||
{
|
{
|
||||||
@ -1429,8 +1443,8 @@ static virDriver lxcDriver = {
|
|||||||
lxcVersion, /* version */
|
lxcVersion, /* version */
|
||||||
lxcGetHostname, /* getHostname */
|
lxcGetHostname, /* getHostname */
|
||||||
NULL, /* getMaxVcpus */
|
NULL, /* getMaxVcpus */
|
||||||
NULL, /* nodeGetInfo */
|
nodeGetInfo, /* nodeGetInfo */
|
||||||
NULL, /* getCapabilities */
|
lxcGetCapabilities, /* getCapabilities */
|
||||||
lxcListDomains, /* listDomains */
|
lxcListDomains, /* listDomains */
|
||||||
lxcNumDomains, /* numOfDomains */
|
lxcNumDomains, /* numOfDomains */
|
||||||
lxcDomainCreateAndStart, /* domainCreateXML */
|
lxcDomainCreateAndStart, /* domainCreateXML */
|
||||||
@ -1478,8 +1492,8 @@ static virDriver lxcDriver = {
|
|||||||
NULL, /* domainInterfaceStats */
|
NULL, /* domainInterfaceStats */
|
||||||
NULL, /* domainBlockPeek */
|
NULL, /* domainBlockPeek */
|
||||||
NULL, /* domainMemoryPeek */
|
NULL, /* domainMemoryPeek */
|
||||||
NULL, /* nodeGetCellsFreeMemory */
|
nodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
|
||||||
NULL, /* getFreeMemory */
|
nodeGetFreeMemory, /* getFreeMemory */
|
||||||
NULL, /* domainEventRegister */
|
NULL, /* domainEventRegister */
|
||||||
NULL, /* domainEventDeregister */
|
NULL, /* domainEventDeregister */
|
||||||
NULL, /* domainMigratePrepare2 */
|
NULL, /* domainMigratePrepare2 */
|
||||||
|
Loading…
Reference in New Issue
Block a user