提交 b66bf073 编写于 作者: N Nikolay Shirokovskiy 提交者: Maxim Nestratov

vz: add state group to all domain stats

上级 2a41a230
......@@ -3739,6 +3739,28 @@ vzDomainGetBalloonStats(virDomainObjPtr dom,
return 0;
}
static int
vzDomainGetStateStats(virDomainObjPtr dom,
virDomainStatsRecordPtr record,
int *maxparams)
{
if (virTypedParamsAddInt(&record->params,
&record->nparams,
maxparams,
"state.state",
dom->state.state) < 0)
return -1;
if (virTypedParamsAddInt(&record->params,
&record->nparams,
maxparams,
"state.reason",
dom->state.reason) < 0)
return -1;
return 0;
}
static virDomainStatsRecordPtr
vzDomainGetAllStats(virConnectPtr conn,
virDomainObjPtr dom)
......@@ -3749,6 +3771,9 @@ vzDomainGetAllStats(virConnectPtr conn,
if (VIR_ALLOC(stat) < 0)
return NULL;
if (vzDomainGetStateStats(dom, stat, &maxparams) < 0)
goto error;
if (vzDomainGetBlockStats(dom, stat, &maxparams) < 0)
goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册