提交 4165d68a 编写于 作者: O Osier Yang

python: Correct arguments number for migrateSetMaxSpeed

The API definition accepts "flags" argument, however, the
implementation ignores it, though "flags" is unused currently,
we should expose it instead of hard coding, the API
implementation inside hypervisor driver is responsible to check
if the passed "flags" is valid.
上级 c8c239a4
......@@ -5062,14 +5062,16 @@ libvirt_virDomainMigrateGetMaxSpeed(PyObject *self ATTRIBUTE_UNUSED, PyObject *a
unsigned long bandwidth;
virDomainPtr domain;
PyObject *pyobj_domain;
unsigned int flags = 0;
if (!PyArg_ParseTuple(args, (char *)"O:virDomainMigrateGetMaxSpeed", &pyobj_domain))
if (!PyArg_ParseTuple(args, (char *)"Oi:virDomainMigrateGetMaxSpeed",
&pyobj_domain, &flags))
return(NULL);
domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
LIBVIRT_BEGIN_ALLOW_THREADS;
c_retval = virDomainMigrateGetMaxSpeed(domain, &bandwidth, 0);
c_retval = virDomainMigrateGetMaxSpeed(domain, &bandwidth, flags);
LIBVIRT_END_ALLOW_THREADS;
if (c_retval < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册