Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
6f554c93
A
avocado
项目概览
openeuler
/
avocado
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
avocado
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6f554c93
编写于
9月 18, 2014
作者:
L
Lucas Meneghel Rodrigues
提交者:
Lucas Meneghel Rodrigues
9月 18, 2014
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #219 from lmr/vm-plugins-improvements-2nd-round
avocado.plugins.vm: Add option group for libvirt domain options
上级
45ec1b47
d30583fe
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
30 addition
and
21 deletion
+30
-21
avocado/plugins/vm.py
avocado/plugins/vm.py
+30
-21
未找到文件。
avocado/plugins/vm.py
浏览文件 @
6f554c93
...
...
@@ -305,31 +305,40 @@ class RunVM(plugin.Plugin):
self
.
enabled
=
False
return
username
=
getpass
.
getuser
()
self
.
parser
=
parser
.
runner
self
.
parser
.
add_argument
(
'--vm'
,
action
=
'store_true'
,
default
=
False
,
help
=
'Run tests on Virtual Machine'
)
self
.
parser
.
add_argument
(
'--vm-hypervisor-uri'
,
dest
=
'vm_hypervisor_uri'
,
default
=
'qemu:///system'
,
help
=
'Specify hypervisor URI driver connection'
)
self
.
parser
.
add_argument
(
'--vm-domain'
,
dest
=
'vm_domain'
,
help
=
'Specify domain name (Virtual Machine name)'
)
self
.
parser
.
add_argument
(
'--vm-hostname'
,
dest
=
'vm_hostname'
,
help
=
'Specify VM hostname to login'
)
self
.
parser
.
add_argument
(
'--vm-username'
,
dest
=
'vm_username'
,
default
=
username
,
help
=
'Specify the username to login on VM'
)
self
.
parser
.
add_argument
(
'--vm-password'
,
dest
=
'vm_password'
,
default
=
None
,
help
=
'Specify the password to login on VM'
)
self
.
parser
.
add_argument
(
'--vm-cleanup'
,
dest
=
'vm_cleanup'
,
action
=
'store_true'
,
default
=
False
,
help
=
'Restore VM to a previous state, before running the tests'
)
default_hypervisor_uri
=
'qemu:///system'
self
.
vm_parser
=
parser
.
runner
.
add_argument_group
(
'run on a libvirt domain '
'arguments'
)
self
.
vm_parser
.
add_argument
(
'--vm'
,
action
=
'store_true'
,
default
=
False
,
help
=
(
'Run tests on a Virtual Machine '
'(Libvirt Domain)'
))
self
.
vm_parser
.
add_argument
(
'--vm-hypervisor-uri'
,
dest
=
'vm_hypervisor_uri'
,
default
=
default_hypervisor_uri
,
help
=
(
'Specify hypervisor URI driver '
'connection. Default: %s'
%
default_hypervisor_uri
))
self
.
vm_parser
.
add_argument
(
'--vm-domain'
,
dest
=
'vm_domain'
,
help
=
(
'Specify Libvirt Domain Name'
))
self
.
vm_parser
.
add_argument
(
'--vm-hostname'
,
dest
=
'vm_hostname'
,
help
=
'Specify VM hostname to login'
)
self
.
vm_parser
.
add_argument
(
'--vm-username'
,
dest
=
'vm_username'
,
default
=
username
,
help
=
'Specify the username to login on VM'
)
self
.
vm_parser
.
add_argument
(
'--vm-password'
,
dest
=
'vm_password'
,
default
=
None
,
help
=
'Specify the password to login on VM'
)
self
.
vm_parser
.
add_argument
(
'--vm-cleanup'
,
dest
=
'vm_cleanup'
,
action
=
'store_true'
,
default
=
False
,
help
=
(
'Restore VM to a previous state, before '
'running tests'
))
self
.
configured
=
True
def
activate
(
self
,
app_args
):
try
:
if
app_args
.
vm
:
self
.
parser
.
set_defaults
(
vm_result
=
VMTestResult
,
test_runner
=
VMTestRunner
)
self
.
vm_
parser
.
set_defaults
(
vm_result
=
VMTestResult
,
test_runner
=
VMTestRunner
)
except
AttributeError
:
pass
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录