mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 02:51:16 +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>
|
||||
|
||||
Generic shared impls of all NUMA apis
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "veth.h"
|
||||
#include "event.h"
|
||||
#include "cgroup.h"
|
||||
#include "nodeinfo.h"
|
||||
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_LXC
|
||||
@ -115,6 +116,19 @@ static int lxcClose(virConnectPtr conn)
|
||||
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,
|
||||
int id)
|
||||
{
|
||||
@ -1429,8 +1443,8 @@ static virDriver lxcDriver = {
|
||||
lxcVersion, /* version */
|
||||
lxcGetHostname, /* getHostname */
|
||||
NULL, /* getMaxVcpus */
|
||||
NULL, /* nodeGetInfo */
|
||||
NULL, /* getCapabilities */
|
||||
nodeGetInfo, /* nodeGetInfo */
|
||||
lxcGetCapabilities, /* getCapabilities */
|
||||
lxcListDomains, /* listDomains */
|
||||
lxcNumDomains, /* numOfDomains */
|
||||
lxcDomainCreateAndStart, /* domainCreateXML */
|
||||
@ -1478,8 +1492,8 @@ static virDriver lxcDriver = {
|
||||
NULL, /* domainInterfaceStats */
|
||||
NULL, /* domainBlockPeek */
|
||||
NULL, /* domainMemoryPeek */
|
||||
NULL, /* nodeGetCellsFreeMemory */
|
||||
NULL, /* getFreeMemory */
|
||||
nodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
|
||||
nodeGetFreeMemory, /* getFreeMemory */
|
||||
NULL, /* domainEventRegister */
|
||||
NULL, /* domainEventDeregister */
|
||||
NULL, /* domainMigratePrepare2 */
|
||||
|
Loading…
Reference in New Issue
Block a user