提交 0ca460ea 编写于 作者: D Daniel P. Berrange

Implement capabilities and nodeinfo APIs

上级 b0b968ef
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 @@ ...@@ -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) ...@@ -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 = { ...@@ -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 = { ...@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册