提交 98984b71 编写于 作者: D Dario Faggioli 提交者: Jim Fehlig

libxl: advertise the support for VIR_TYPED_PARAM_STRING

domainGetNumaParameters has a string typed parameter, hence it
is necessary for the libxl driver to support this.

This change implements the connectSupportsFeature hook for the
libxl driver, advertising that VIR_DRV_FEATURE_TYPED_PARAM_STRING
is supported.
Signed-off-by: NDario Faggioli <dario.faggioli@citrix.com>
Cc: Eric Blake <eblake@redhat.com>
上级 fd2e3c4c
...@@ -4342,7 +4342,10 @@ libxlDomainGetSchedulerParametersFlags(virDomainPtr dom, ...@@ -4342,7 +4342,10 @@ libxlDomainGetSchedulerParametersFlags(virDomainPtr dom,
libxl_scheduler sched_id; libxl_scheduler sched_id;
int ret = -1; int ret = -1;
virCheckFlags(0, -1); virCheckFlags(VIR_TYPED_PARAM_STRING_OKAY, -1);
/* We don't return strings, and thus trivially support this flag. */
flags &= ~VIR_TYPED_PARAM_STRING_OKAY;
libxlDriverLock(driver); libxlDriverLock(driver);
vm = virDomainObjListFindByUUID(driver->domains, dom->uuid); vm = virDomainObjListFindByUUID(driver->domains, dom->uuid);
...@@ -4643,6 +4646,20 @@ libxlConnectListAllDomains(virConnectPtr conn, ...@@ -4643,6 +4646,20 @@ libxlConnectListAllDomains(virConnectPtr conn,
return ret; return ret;
} }
/* Which features are supported by this driver? */
static int
libxlConnectSupportsFeature(virConnectPtr conn, int feature)
{
if (virConnectSupportsFeatureEnsureACL(conn) < 0)
return -1;
switch (feature) {
case VIR_DRV_FEATURE_TYPED_PARAM_STRING:
return 1;
default:
return 0;
}
}
static virDriver libxlDriver = { static virDriver libxlDriver = {
...@@ -4723,6 +4740,7 @@ static virDriver libxlDriver = { ...@@ -4723,6 +4740,7 @@ static virDriver libxlDriver = {
.connectDomainEventRegisterAny = libxlConnectDomainEventRegisterAny, /* 0.9.0 */ .connectDomainEventRegisterAny = libxlConnectDomainEventRegisterAny, /* 0.9.0 */
.connectDomainEventDeregisterAny = libxlConnectDomainEventDeregisterAny, /* 0.9.0 */ .connectDomainEventDeregisterAny = libxlConnectDomainEventDeregisterAny, /* 0.9.0 */
.connectIsAlive = libxlConnectIsAlive, /* 0.9.8 */ .connectIsAlive = libxlConnectIsAlive, /* 0.9.8 */
.connectSupportsFeature = libxlConnectSupportsFeature, /* 1.1.1 */
}; };
static virStateDriver libxlStateDriver = { static virStateDriver libxlStateDriver = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册