Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
7b38f418
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,体验更适合开发者的 AI 搜索 >>
提交
7b38f418
编写于
4月 27, 2006
作者:
D
Daniel Veillard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* src/xml.c src/xend_internal.c TODO: added uuid to the XML
serialization Daniel
上级
1e018483
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
30 addition
and
1 deletion
+30
-1
ChangeLog
ChangeLog
+5
-0
TODO
TODO
+1
-1
src/xend_internal.c
src/xend_internal.c
+15
-0
src/xml.c
src/xml.c
+9
-0
未找到文件。
ChangeLog
浏览文件 @
7b38f418
Thu Apr 27 14:17:04 EDT 2006 Daniel Veillard <veillard@redhat.com>
* src/xml.c src/xend_internal.c TODO: added uuid to the XML
serialization
Wed Apr 26 08:32:38 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/xml.c: applied patch from Jeremy Katz to not require a
...
...
TODO
浏览文件 @
7b38f418
...
...
@@ -7,7 +7,6 @@ TODO:
- DTD/RNG/XSD schemas for the XML Domain descriptions
- in python bindings raise an exception if a lookup or connection fails
to return a non-None object
- Add uuid to XML format
- add error handling hooks at the python level
- object unicity for domains at the Python level
- UUID lookup in hash.c
...
...
@@ -50,3 +49,4 @@ Done:
- API for the Node: extracting informations
- docs for the principle in the error handling code
- thread protection, reentrancy, refcounting, etc ...
- Add uuid to XML format
src/xend_internal.c
浏览文件 @
7b38f418
...
...
@@ -1347,6 +1347,21 @@ xend_parse_sexp_desc(struct sexpr *root)
goto
error
;
}
virBufferVSprintf
(
&
buf
,
" <name>%s</name>
\n
"
,
tmp
);
tmp
=
sexpr_node
(
root
,
"domain/uuid"
);
if
(
tmp
!=
NULL
)
{
char
compact
[
33
];
int
i
,
j
;
for
(
i
=
0
,
j
=
0
;(
i
<
32
)
&&
(
tmp
[
j
]
!=
0
);
j
++
)
{
if
(((
tmp
[
j
]
>=
'0'
)
&&
(
tmp
[
j
]
<=
'9'
))
||
((
tmp
[
j
]
>=
'a'
)
&&
(
tmp
[
j
]
<=
'f'
)))
compact
[
i
++
]
=
tmp
[
j
];
else
if
((
tmp
[
j
]
>=
'A'
)
&&
(
tmp
[
j
]
<=
'F'
))
compact
[
i
++
]
=
tmp
[
j
]
+
'a'
-
'A'
;
}
compact
[
i
]
=
0
;
if
(
i
>
0
)
virBufferVSprintf
(
&
buf
,
" <uuid>%s</uuid>
\n
"
,
compact
);
}
tmp
=
sexpr_node
(
root
,
"domain/bootloader"
);
if
(
tmp
!=
NULL
)
virBufferVSprintf
(
&
buf
,
" <bootloader>%s</bootloader>
\n
"
,
tmp
);
...
...
src/xml.c
浏览文件 @
7b38f418
...
...
@@ -462,6 +462,7 @@ char *
virDomainGetXMLDesc(virDomainPtr domain, int flags)
{
char *ret = NULL;
unsigned char uuid[16];
virBuffer buf;
virDomainInfo info;
...
...
@@ -483,6 +484,14 @@ virDomainGetXMLDesc(virDomainPtr domain, int flags)
virDomainGetID(domain));
virBufferVSprintf(&buf, " <name>%s</name>\n",
virDomainGetName(domain));
if (virDomainGetUUID(domain, &uuid[0]) == 0) {
virBufferVSprintf(&buf,
" <uuid>%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x</uuid>\n",
uuid[0], uuid[1], uuid[2], uuid[3],
uuid[4], uuid[5], uuid[6], uuid[7],
uuid[8], uuid[9], uuid[10], uuid[11],
uuid[12], uuid[13], uuid[14], uuid[15]);
}
virDomainGetXMLBoot(domain, &buf);
virBufferVSprintf(&buf, " <memory>%lu</memory>\n", info.maxMem);
virBufferVSprintf(&buf, " <vcpu>%d</vcpu>\n", (int) info.nrVirtCpu);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录