Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
8eb7ab95
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8eb7ab95
编写于
2月 18, 2013
作者:
J
Jiri Denemark
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
python: Implement virDomainGetJobStats wrapper
上级
4dd00f42
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
48 addition
and
0 deletion
+48
-0
python/libvirt-override-api.xml
python/libvirt-override-api.xml
+6
-0
python/libvirt-override.c
python/libvirt-override.c
+42
-0
未找到文件。
python/libvirt-override-api.xml
浏览文件 @
8eb7ab95
...
...
@@ -84,6 +84,12 @@
<return
type=
'int *'
info=
'the list of information or None in case of error'
/>
<arg
name=
'domain'
type=
'virDomainPtr'
info=
'a domain object'
/>
</function>
<function
name=
'virDomainGetJobStats'
file=
'python'
>
<info>
Extract information about an active job being processed for a domain.
</info>
<return
type=
'virDomainJobStats'
info=
'dictionary mapping field names to values or None in case of error'
/>
<arg
name=
'domain'
type=
'virDomainPtr'
info=
'a domain object'
/>
<arg
name=
'flags'
type=
'unsigned int'
info=
'flags, currently unused, pass 0.'
/>
</function>
<function
name=
'virNodeGetInfo'
file=
'python'
>
<info>
Extract hardware information about the Node.
</info>
<return
type=
'int *'
info=
'the list of information or None in case of error'
/>
...
...
python/libvirt-override.c
浏览文件 @
8eb7ab95
...
...
@@ -4182,6 +4182,47 @@ libvirt_virDomainGetJobInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
return
py_retval
;
}
static
PyObject
*
libvirt_virDomainGetJobStats
(
PyObject
*
self
ATTRIBUTE_UNUSED
,
PyObject
*
args
)
{
PyObject
*
pyobj_domain
;
virDomainPtr
domain
;
unsigned
int
flags
;
virTypedParameterPtr
params
=
NULL
;
int
nparams
=
0
;
int
type
;
PyObject
*
dict
=
NULL
;
int
rc
;
if
(
!
PyArg_ParseTuple
(
args
,
(
char
*
)
"Oi:virDomainGetJobStats"
,
&
pyobj_domain
,
&
flags
))
goto
cleanup
;
domain
=
(
virDomainPtr
)
PyvirDomain_Get
(
pyobj_domain
);
LIBVIRT_BEGIN_ALLOW_THREADS
;
rc
=
virDomainGetJobStats
(
domain
,
&
type
,
&
params
,
&
nparams
,
flags
);
LIBVIRT_END_ALLOW_THREADS
;
if
(
rc
<
0
)
goto
cleanup
;
if
(
!
(
dict
=
getPyVirTypedParameter
(
params
,
nparams
)))
goto
cleanup
;
if
(
PyDict_SetItem
(
dict
,
libvirt_constcharPtrWrap
(
"type"
),
libvirt_intWrap
(
type
))
<
0
)
{
Py_DECREF
(
dict
);
dict
=
NULL
;
goto
cleanup
;
}
cleanup:
virTypedParamsFree
(
params
,
nparams
);
if
(
dict
)
return
dict
;
else
return
VIR_PY_NONE
;
}
static
PyObject
*
libvirt_virDomainGetBlockJobInfo
(
PyObject
*
self
ATTRIBUTE_UNUSED
,
PyObject
*
args
)
...
...
@@ -6673,6 +6714,7 @@ static PyMethodDef libvirtMethods[] = {
{(
char
*
)
"virConnectListAllInterfaces"
,
libvirt_virConnectListAllInterfaces
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virConnectBaselineCPU"
,
libvirt_virConnectBaselineCPU
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virDomainGetJobInfo"
,
libvirt_virDomainGetJobInfo
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virDomainGetJobStats"
,
libvirt_virDomainGetJobStats
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virDomainSnapshotListNames"
,
libvirt_virDomainSnapshotListNames
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virDomainListAllSnapshots"
,
libvirt_virDomainListAllSnapshots
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virDomainSnapshotListChildrenNames"
,
libvirt_virDomainSnapshotListChildrenNames
,
METH_VARARGS
,
NULL
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录