提交 4802d59e 编写于 作者: J Jiri Denemark

python: Implement virDomainMigrateGetCompressionCache wrapper

上级 34f44e91
......@@ -491,6 +491,13 @@
<arg name='flags' type='unsigned int' info='fine-tuning flags, currently unused, pass 0.'/>
<return type='virDomainBlockJobInfo' info='A dictionary containing job information.' />
</function>
<function name='virDomainMigrateGetCompressionCache' file='python'>
<info>Get current size of the cache (in bytes) used for compressing
repeatedly transferred memory pages during live migration.</info>
<arg name='domain' type='virDomainPtr' info='a domain object'/>
<arg name='flags' type='unsigned int' info='flags, currently unused, pass 0.'/>
<return type='unsigned long long' info='current cache size, or None in case of error'/>
</function>
<function name='virDomainMigrateGetMaxSpeed' file='python'>
<info>Get currently configured maximum migration speed for a domain</info>
<arg name='domain' type='virDomainPtr' info='a domain object'/>
......
......@@ -6321,6 +6321,33 @@ libvirt_virDomainSendKey(PyObject *self ATTRIBUTE_UNUSED,
return py_retval;
}
static PyObject *
libvirt_virDomainMigrateGetCompressionCache(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
{
PyObject *pyobj_domain;
virDomainPtr domain;
unsigned int flags;
unsigned long long cacheSize;
int rc;
if (!PyArg_ParseTuple(args,
(char *) "Oi:virDomainMigrateGetCompressionCache",
&pyobj_domain, &flags))
return VIR_PY_NONE;
domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
LIBVIRT_BEGIN_ALLOW_THREADS;
rc = virDomainMigrateGetCompressionCache(domain, &cacheSize, flags);
LIBVIRT_END_ALLOW_THREADS;
if (rc < 0)
return VIR_PY_NONE;
return libvirt_ulonglongWrap(cacheSize);
}
static PyObject *
libvirt_virDomainMigrateGetMaxSpeed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval;
......@@ -6724,6 +6751,7 @@ static PyMethodDef libvirtMethods[] = {
{(char *) "virDomainSetBlockIoTune", libvirt_virDomainSetBlockIoTune, METH_VARARGS, NULL},
{(char *) "virDomainGetBlockIoTune", libvirt_virDomainGetBlockIoTune, METH_VARARGS, NULL},
{(char *) "virDomainSendKey", libvirt_virDomainSendKey, METH_VARARGS, NULL},
{(char *) "virDomainMigrateGetCompressionCache", libvirt_virDomainMigrateGetCompressionCache, METH_VARARGS, NULL},
{(char *) "virDomainMigrateGetMaxSpeed", libvirt_virDomainMigrateGetMaxSpeed, METH_VARARGS, NULL},
{(char *) "virDomainBlockPeek", libvirt_virDomainBlockPeek, METH_VARARGS, NULL},
{(char *) "virDomainMemoryPeek", libvirt_virDomainMemoryPeek, METH_VARARGS, NULL},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册