This method is responsible to fetch all State Stats and store data into virDomainStatsRecordPtr structure.
Signed-off-by: Julio Faracco <jcfara...@gmail.com> --- src/lxc/lxc_driver.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 86c98517d2..5fd3bdc5ec 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -5277,6 +5277,28 @@ lxcDomainGetMetadata(virDomainPtr dom, return ret; } +static int +lxcDomainGetStatsState(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 int lxcDomainGetStatsCpu(virDomainObjPtr dom, virDomainStatsRecordPtr record, -- 2.19.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list