Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
4c479147
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
4c479147
编写于
8月 18, 2020
作者:
B
Beraldo Leal
提交者:
GitHub
8月 18, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4090 from richtja/vmimage_doc_v2
Vmimage automatic documentation [v2]
上级
3a502060
a83655b2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
47 addition
and
0 deletion
+47
-0
.gitignore
.gitignore
+1
-0
docs/source/conf.py
docs/source/conf.py
+35
-0
docs/source/guides/writer/libs/vmimage.rst
docs/source/guides/writer/libs/vmimage.rst
+11
-0
未找到文件。
.gitignore
浏览文件 @
4c479147
...
...
@@ -21,6 +21,7 @@ docs/source/api/test
docs/source/api/utils
docs/source/api/plugins
docs/source/api/optional-plugins
docs/source/guides/writer/libs/data/vmimage
# This file should be generated with:
# avocado config reference > docs/source/config/reference.rst
...
...
docs/source/conf.py
浏览文件 @
4c479147
...
...
@@ -6,6 +6,8 @@ import importlib
import
os
import
sys
from
avocado.core
import
parameters
from
avocado.core.varianter
import
Varianter
from
avocado.utils
import
genio
# pylint: disable=C0413
from
avocado.utils
import
path
# pylint: disable=C0413
from
avocado.utils
import
process
# pylint: disable=C0413
...
...
@@ -42,7 +44,40 @@ def generate_reference():
reference
.
write
(
result
.
stdout_text
)
def
generate_vmimage_distro
():
yaml_path
=
[
os
.
path
.
join
(
ROOT_PATH
,
'selftests'
,
'pre_release'
,
'tests'
,
'vmimage.py.data'
,
'variants.yml'
)]
reference_dir_path
=
os
.
path
.
join
(
ROOT_PATH
,
'docs'
,
'source'
,
'guides'
,
'writer'
,
'libs'
,
'data'
,
'vmimage'
)
reference_path
=
os
.
path
.
join
(
reference_dir_path
,
'supported_images.csv'
)
config
=
{
'yaml_to_mux.files'
:
yaml_path
,
'yaml_to_mux.inject'
:
[]}
varianter
=
Varianter
()
varianter
.
parse
(
config
)
try
:
os
.
makedirs
(
reference_dir_path
)
except
FileExistsError
:
pass
with
open
(
reference_path
,
'w'
)
as
reference
:
reference
.
write
(
"Provider, Version, Architecture
\n
"
)
for
v
in
varianter
.
itertests
():
vmimage_params
=
parameters
.
AvocadoParams
(
v
[
'variant'
],
[
'/run/*'
])
vmimage_name
=
vmimage_params
.
get
(
'name'
)
vmimage_version
=
vmimage_params
.
get
(
'version'
)
vmimage_arch
=
vmimage_params
.
get
(
'arch'
,
path
=
'*/architectures/*'
)
distro_arch_path
=
'/run/distro/%s/%s/*'
%
(
vmimage_name
,
vmimage_arch
)
vmimage_arch
=
vmimage_params
.
get
(
'arch'
,
path
=
distro_arch_path
,
default
=
vmimage_arch
)
reference
.
write
(
"%s,%s,%s
\n
"
%
(
str
(
vmimage_name
),
str
(
vmimage_version
),
str
(
vmimage_arch
)))
generate_reference
()
generate_vmimage_distro
()
# Documentation sections. Key is the name of the section, followed by:
# Second level module name (after avocado), Module description,
...
...
docs/source/guides/writer/libs/vmimage.rst
浏览文件 @
4c479147
...
...
@@ -102,3 +102,14 @@ with::
def test(self):
...
Supported images
----------------
The vmimage library has no hardcoded limitations of versions or architectures
that can be supported. You can use it as you wish. This is the list of images
that we tested and they work with vmimage:
.. csv-table::
:file: ./data/vmimage/supported_images.csv
:header-rows: 1
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录