Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
cb96ae25
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看板
提交
cb96ae25
编写于
6月 10, 2008
作者:
D
Daniel Veillard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* python/generator.py python/libvir.c python/libvirt-python-api.xml:
Apply patch from Cole Robinson fixing UUIDString for python Daniel
上级
406d8963
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
110 addition
and
2 deletion
+110
-2
ChangeLog
ChangeLog
+5
-0
python/generator.py
python/generator.py
+3
-2
python/libvir.c
python/libvir.c
+82
-0
python/libvirt-python-api.xml
python/libvirt-python-api.xml
+20
-0
未找到文件。
ChangeLog
浏览文件 @
cb96ae25
Tue Jun 10 17:10:31 CEST 2008 Daniel Veillard <veillard@redhat.com>
* python/generator.py python/libvir.c python/libvirt-python-api.xml:
Apply patch from Cole Robinson fixing UUIDString for python
Tue Jun 10 15:33:00 BST 2008 Richard W.M. Jones <rjones@redhat.com>
Pass syntax check for XM block devices over to XenD
...
...
python/generator.py
浏览文件 @
cb96ae25
...
...
@@ -291,8 +291,10 @@ skip_impl = (
'virDomainGetInfo'
,
'virNodeGetInfo'
,
'virDomainGetUUID'
,
'virDomainGetUUIDString'
,
'virDomainLookupByUUID'
,
'virNetworkGetUUID'
,
'virNetworkGetUUIDString'
,
'virNetworkLookupByUUID'
,
'virDomainGetAutostart'
,
'virNetworkGetAutostart'
,
...
...
@@ -305,9 +307,8 @@ skip_impl = (
'virDomainGetVcpus'
,
'virDomainPinVcpu'
,
'virStoragePoolGetUUID'
,
'virStoragePoolGetUUIDString'
,
'virStoragePoolLookupByUUID'
,
'virStorageVolGetUUID'
,
'virStorageVolLookupByUUID'
,
'virStoragePoolGetInfo'
,
'virStorageVolGetInfo'
,
'virStoragePoolGetAutostart'
,
...
...
python/libvir.c
浏览文件 @
cb96ae25
...
...
@@ -863,6 +863,33 @@ libvirt_virDomainGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
return
(
py_retval
);
}
static
PyObject
*
libvirt_virDomainGetUUIDString
(
PyObject
*
self
ATTRIBUTE_UNUSED
,
PyObject
*
args
)
{
PyObject
*
py_retval
;
char
uuidstr
[
VIR_UUID_STRING_BUFLEN
];
virDomainPtr
dom
;
PyObject
*
pyobj_dom
;
int
c_retval
;
if
(
!
PyArg_ParseTuple
(
args
,
(
char
*
)
"O:virDomainGetUUIDString"
,
&
pyobj_dom
))
return
(
NULL
);
dom
=
(
virDomainPtr
)
PyvirDomain_Get
(
pyobj_dom
);
if
(
dom
==
NULL
)
return
VIR_PY_NONE
;
LIBVIRT_BEGIN_ALLOW_THREADS
;
c_retval
=
virDomainGetUUIDString
(
dom
,
&
uuidstr
[
0
]);
LIBVIRT_END_ALLOW_THREADS
;
if
(
c_retval
<
0
)
return
VIR_PY_NONE
;
py_retval
=
PyString_FromString
((
char
*
)
&
uuidstr
[
0
]);
return
(
py_retval
);
}
static
PyObject
*
libvirt_virDomainLookupByUUID
(
PyObject
*
self
ATTRIBUTE_UNUSED
,
PyObject
*
args
)
{
PyObject
*
py_retval
;
...
...
@@ -996,6 +1023,33 @@ libvirt_virNetworkGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
return
(
py_retval
);
}
static
PyObject
*
libvirt_virNetworkGetUUIDString
(
PyObject
*
self
ATTRIBUTE_UNUSED
,
PyObject
*
args
)
{
PyObject
*
py_retval
;
char
uuidstr
[
VIR_UUID_STRING_BUFLEN
];
virNetworkPtr
net
;
PyObject
*
pyobj_net
;
int
c_retval
;
if
(
!
PyArg_ParseTuple
(
args
,
(
char
*
)
"O:virNetworkGetUUIDString"
,
&
pyobj_net
))
return
(
NULL
);
net
=
(
virNetworkPtr
)
PyvirNetwork_Get
(
pyobj_net
);
if
(
net
==
NULL
)
return
VIR_PY_NONE
;
LIBVIRT_BEGIN_ALLOW_THREADS
;
c_retval
=
virNetworkGetUUIDString
(
net
,
&
uuidstr
[
0
]);
LIBVIRT_END_ALLOW_THREADS
;
if
(
c_retval
<
0
)
return
VIR_PY_NONE
;
py_retval
=
PyString_FromString
((
char
*
)
&
uuidstr
[
0
]);
return
(
py_retval
);
}
static
PyObject
*
libvirt_virNetworkLookupByUUID
(
PyObject
*
self
ATTRIBUTE_UNUSED
,
PyObject
*
args
)
{
PyObject
*
py_retval
;
...
...
@@ -1363,6 +1417,31 @@ libvirt_virStoragePoolGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
return
(
py_retval
);
}
static
PyObject
*
libvirt_virStoragePoolGetUUIDString
(
PyObject
*
self
ATTRIBUTE_UNUSED
,
PyObject
*
args
)
{
PyObject
*
py_retval
;
char
uuidstr
[
VIR_UUID_STRING_BUFLEN
];
virStoragePoolPtr
pool
;
PyObject
*
pyobj_pool
;
int
c_retval
;
if
(
!
PyArg_ParseTuple
(
args
,
(
char
*
)
"O:virStoragePoolGetUUIDString"
,
&
pyobj_pool
))
return
(
NULL
);
pool
=
(
virStoragePoolPtr
)
PyvirStoragePool_Get
(
pyobj_pool
);
if
(
pool
==
NULL
)
return
VIR_PY_NONE
;
LIBVIRT_BEGIN_ALLOW_THREADS
;
c_retval
=
virStoragePoolGetUUIDString
(
pool
,
&
uuidstr
[
0
]);
LIBVIRT_END_ALLOW_THREADS
;
if
(
c_retval
<
0
)
return
VIR_PY_NONE
;
py_retval
=
PyString_FromString
((
char
*
)
&
uuidstr
[
0
]);
return
(
py_retval
);
}
static
PyObject
*
libvirt_virStoragePoolLookupByUUID
(
PyObject
*
self
ATTRIBUTE_UNUSED
,
PyObject
*
args
)
{
...
...
@@ -1403,6 +1482,7 @@ static PyMethodDef libvirtMethods[] = {
{(
char
*
)
"virDomainGetInfo"
,
libvirt_virDomainGetInfo
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virNodeGetInfo"
,
libvirt_virNodeGetInfo
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virDomainGetUUID"
,
libvirt_virDomainGetUUID
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virDomainGetUUIDString"
,
libvirt_virDomainGetUUIDString
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virDomainLookupByUUID"
,
libvirt_virDomainLookupByUUID
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virRegisterErrorHandler"
,
libvirt_virRegisterErrorHandler
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virGetLastError"
,
libvirt_virGetLastError
,
METH_VARARGS
,
NULL
},
...
...
@@ -1410,6 +1490,7 @@ static PyMethodDef libvirtMethods[] = {
{(
char
*
)
"virConnectListNetworks"
,
libvirt_virConnectListNetworks
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virConnectListDefinedNetworks"
,
libvirt_virConnectListDefinedNetworks
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virNetworkGetUUID"
,
libvirt_virNetworkGetUUID
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virNetworkGetUUIDString"
,
libvirt_virNetworkGetUUIDString
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virNetworkLookupByUUID"
,
libvirt_virNetworkLookupByUUID
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virDomainGetAutostart"
,
libvirt_virDomainGetAutostart
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virNetworkGetAutostart"
,
libvirt_virNetworkGetAutostart
,
METH_VARARGS
,
NULL
},
...
...
@@ -1428,6 +1509,7 @@ static PyMethodDef libvirtMethods[] = {
{(
char
*
)
"virStoragePoolGetInfo"
,
libvirt_virStoragePoolGetInfo
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virStorageVolGetInfo"
,
libvirt_virStorageVolGetInfo
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virStoragePoolGetUUID"
,
libvirt_virStoragePoolGetUUID
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virStoragePoolGetUUIDString"
,
libvirt_virStoragePoolGetUUIDString
,
METH_VARARGS
,
NULL
},
{(
char
*
)
"virStoragePoolLookupByUUID"
,
libvirt_virStoragePoolLookupByUUID
,
METH_VARARGS
,
NULL
},
{
NULL
,
NULL
,
0
,
NULL
}
};
...
...
python/libvirt-python-api.xml
浏览文件 @
cb96ae25
...
...
@@ -48,11 +48,31 @@
<return
type=
'char *'
info=
'the 16 bytes string or None in case of error'
/>
<arg
name=
'domain'
type=
'virDomainPtr'
info=
'a domain object'
/>
</function>
<function
name=
'virDomainGetUUIDString'
file=
'python'
>
<info>
Fetch globally unique ID of the domain as a string.
</info>
<return
type=
'char *'
info=
'the UUID string or None in case of error'
/>
<arg
name=
'pool'
type=
'virDomainPtr'
info=
'a domain object'
/>
</function>
<function
name=
'virNetworkGetUUID'
file=
'python'
>
<info>
Extract the UUID unique Identifier of a network.
</info>
<return
type=
'char *'
info=
'the 16 bytes string or None in case of error'
/>
<arg
name=
'domain'
type=
'virNetworkPtr'
info=
'a network object'
/>
</function>
<function
name=
'virNetworkGetUUIDString'
file=
'python'
>
<info>
Fetch globally unique ID of the network as a string.
</info>
<return
type=
'char *'
info=
'the UUID string or None in case of error'
/>
<arg
name=
'net'
type=
'virNetworkPtr'
info=
'a network object'
/>
</function>
<function
name=
'virStoragePoolGetUUID'
file=
'python'
>
<info>
Extract the UUID unique Identifier of a storage pool.
</info>
<return
type=
'char *'
info=
'the 16 bytes string or None in case of error'
/>
<arg
name=
'pool'
type=
'virStoragePoolPtr'
info=
'a storage pool object'
/>
</function>
<function
name=
'virStoragePoolGetUUIDString'
file=
'python'
>
<info>
Fetch globally unique ID of the storage pool as a string.
</info>
<return
type=
'char *'
info=
'the UUID string or None in case of error'
/>
<arg
name=
'pool'
type=
'virStoragePoolPtr'
info=
'a storage pool object'
/>
</function>
<function
name=
'virNetworkGetAutostart'
file=
'python'
>
<info>
Extract the autostart flag for a network.
</info>
<return
type=
'int'
info=
'the autostart flag, or None in case of error'
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录