Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
c9662f77
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,发现更多精彩内容 >>
未验证
提交
c9662f77
编写于
8月 24, 2018
作者:
C
Caio Carrara
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'clebergnu/vmimage_common_arch_v2'
Signed-off-by:
N
Caio Carrara
<
ccarrara@redhat.com
>
上级
efc77880
7a1b78e4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
24 addition
and
18 deletion
+24
-18
avocado/utils/vmimage.py
avocado/utils/vmimage.py
+24
-18
未找到文件。
avocado/utils/vmimage.py
浏览文件 @
c9662f77
...
...
@@ -135,7 +135,21 @@ class ImageProviderBase(object):
"Wrong arch?"
%
(
image
,
url_images
))
class
FedoraImageProvider
(
ImageProviderBase
):
class
FedoraImageProviderBase
(
ImageProviderBase
):
"""
Base Fedora Image Provider
"""
def
get_image_url
(
self
):
if
int
(
self
.
version
)
>=
28
:
cloud
=
'Cloud'
else
:
cloud
=
'CloudImages'
self
.
url_images
=
self
.
url_images
%
cloud
return
super
(
FedoraImageProviderBase
,
self
).
get_image_url
()
class
FedoraImageProvider
(
FedoraImageProviderBase
):
"""
Fedora Image Provider
"""
...
...
@@ -149,16 +163,8 @@ class FedoraImageProvider(ImageProviderBase):
self
.
url_images
=
self
.
url_versions
+
'{version}/%s/{arch}/images/'
self
.
image_pattern
=
'Fedora-Cloud-Base-{version}-{build}.{arch}.qcow2$'
def
get_image_url
(
self
):
if
int
(
self
.
version
)
>=
28
:
cloud
=
'Cloud'
else
:
cloud
=
'CloudImages'
self
.
url_images
=
self
.
url_images
%
cloud
return
super
(
FedoraImageProvider
,
self
).
get_image_url
()
class
FedoraSecondaryImageProvider
(
ImageProviderBase
):
class
FedoraSecondaryImageProvider
(
Fedora
ImageProviderBase
):
"""
Fedora Secondary Image Provider
"""
...
...
@@ -173,14 +179,6 @@ class FedoraSecondaryImageProvider(ImageProviderBase):
self
.
url_images
=
self
.
url_versions
+
'{version}/%s/{arch}/images/'
self
.
image_pattern
=
'Fedora-Cloud-Base-{version}-{build}.{arch}.qcow2$'
def
get_image_url
(
self
):
if
int
(
self
.
version
)
>=
28
:
cloud
=
'Cloud'
else
:
cloud
=
'CloudImages'
self
.
url_images
=
self
.
url_images
%
cloud
return
super
(
FedoraSecondaryImageProvider
,
self
).
get_image_url
()
class
CentOSImageProvider
(
ImageProviderBase
):
"""
...
...
@@ -211,6 +209,9 @@ class UbuntuImageProvider(ImageProviderBase):
# Ubuntu uses 'amd64' instead of 'x86_64'
if
arch
==
'x86_64'
:
arch
=
'amd64'
# and 'arm64' instead of 'aarch64'
elif
arch
==
'aarch64'
:
arch
=
'arm64'
super
(
UbuntuImageProvider
,
self
).
__init__
(
version
,
build
,
arch
)
self
.
url_versions
=
'http://cloud-images.ubuntu.com/releases/'
...
...
@@ -230,6 +231,9 @@ class DebianImageProvider(ImageProviderBase):
# Debian uses 'amd64' instead of 'x86_64'
if
arch
==
'x86_64'
:
arch
=
'amd64'
# and 'arm64' instead of 'aarch64'
elif
arch
==
'aarch64'
:
arch
=
'arm64'
super
(
DebianImageProvider
,
self
).
__init__
(
version
,
build
,
arch
)
self
.
url_versions
=
'https://cdimage.debian.org/cdimage/openstack/'
...
...
@@ -356,6 +360,8 @@ def get(name=None, version=None, build=None, arch=None, checksum=None,
provider_args
[
'build'
]
=
version
if
arch
is
not
None
:
provider_args
[
'arch'
]
=
arch
if
name
==
'fedora'
and
arch
in
(
'ppc64'
,
'ppc64le'
):
name
=
'fedorasecondary'
for
provider
in
IMAGE_PROVIDERS
:
if
name
is
None
or
name
==
provider
.
name
.
lower
():
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录