Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
e1b9e809
T
tp-qemu
项目概览
openeuler
/
tp-qemu
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tp-qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
e1b9e809
编写于
10月 31, 2017
作者:
X
Xu Han
提交者:
GitHub
10月 31, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1131 from xiagao/qgapassword1490227
qemu_guest_agent: Support "guest-set-user-password" for windows guest
上级
f6b134ec
6cab4179
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
10 deletion
+10
-10
qemu/tests/cfg/qemu_guest_agent.cfg
qemu/tests/cfg/qemu_guest_agent.cfg
+3
-2
qemu/tests/qemu_guest_agent.py
qemu/tests/qemu_guest_agent.py
+7
-8
未找到文件。
qemu/tests/cfg/qemu_guest_agent.cfg
浏览文件 @
e1b9e809
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
gagent_status_cmd = "service qemu-guest-agent status"
gagent_status_cmd = "service qemu-guest-agent status"
gagent_pkg_check_cmd = "rpm -q qemu-guest-agent"
gagent_pkg_check_cmd = "rpm -q qemu-guest-agent"
Windows:
Windows:
ga_username = "Administrator"
deps = no
deps = no
i386:
i386:
qemu_ga_pkg = qemu-ga-x86.msi
qemu_ga_pkg = qemu-ga-x86.msi
...
@@ -51,13 +52,13 @@
...
@@ -51,13 +52,13 @@
- check_sync_delimited:
- check_sync_delimited:
gagent_check_type = sync_delimited
gagent_check_type = sync_delimited
- check_set_user_password:
- check_set_user_password:
no Windows
gagent_check_type = set_user_password
gagent_check_type = set_user_password
image_snapshot = yes
image_snapshot = yes
variants:
variants:
- no_crypto:
- no_crypto:
new_password = "
abcdef
"
new_password = "
Abc_123
"
- crypto:
- crypto:
no Windows
new_password = "123456"
new_password = "123456"
crypted = "yes"
crypted = "yes"
- check_get_vcpus:
- check_get_vcpus:
...
...
qemu/tests/qemu_guest_agent.py
浏览文件 @
e1b9e809
...
@@ -415,22 +415,21 @@ class QemuGuestAgentBasicCheck(QemuGuestAgentTest):
...
@@ -415,22 +415,21 @@ class QemuGuestAgentBasicCheck(QemuGuestAgentTest):
"""
"""
old_password
=
params
.
get
(
"password"
,
""
)
old_password
=
params
.
get
(
"password"
,
""
)
new_password
=
params
.
get
(
"new_password"
,
"123456"
)
new_password
=
params
.
get
(
"new_password"
,
"123456"
)
ga_username
=
params
.
get
(
"ga_username"
,
"root"
)
crypted
=
params
.
get
(
"crypted"
,
""
)
==
"yes"
crypted
=
params
.
get
(
"crypted"
,
""
)
==
"yes"
error_context
.
context
(
"Change guest's password."
)
try
:
try
:
if
crypted
:
self
.
gagent
.
set_user_password
(
new_password
,
crypted
,
ga_username
)
self
.
gagent
.
set_user_password
(
new_password
,
crypted
)
error_context
.
context
(
"Check if the guest could be login by new password"
,
else
:
self
.
gagent
.
set_user_password
(
new_password
)
error_context
.
context
(
"check if the guest could be login by new password"
,
logging
.
info
)
logging
.
info
)
self
.
_gagent_verify_password
(
self
.
vm
,
new_password
)
self
.
_gagent_verify_password
(
self
.
vm
,
new_password
)
except
guest_agent
.
VAgentCmdError
:
except
guest_agent
.
VAgentCmdError
:
raise
error
.
TestError
(
"Failed to set the new password for guest"
)
test
.
fail
(
"Failed to set the new password for guest"
)
finally
:
finally
:
error_context
.
context
(
"
r
eset back the password of guest"
,
logging
.
info
)
error_context
.
context
(
"
R
eset back the password of guest"
,
logging
.
info
)
self
.
gagent
.
set_user_password
(
old_password
)
self
.
gagent
.
set_user_password
(
old_password
,
username
=
ga_username
)
@
error_context
.
context_aware
@
error_context
.
context_aware
def
gagent_check_get_vcpus
(
self
,
test
,
params
,
env
):
def
gagent_check_get_vcpus
(
self
,
test
,
params
,
env
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录