Answering here regarding the whole patch-set (haven't found the cover
letter).
make check-local issues found:
contrib/check_i18n.py ./i18n.py
Checking for invalid i18n string...
Checking for invalid i18n string successfully
/bin/pep8 --version
1.6.2
/bin/pep8 --filename '*.py,*.py.in'
--exclude="*config.py,*i18n.py,*tests/test_config.py" .
./osinfo.py:80:80: E501 line too long (82 > 79 characters)
./osinfo.py:229:8: E111 indentation is not a multiple of four
On 08/09/2016 09:53 AM, archus(a)linux.vnet.ibm.com wrote:
From: Archana Singh <archus(a)linux.vnet.ibm.com>
1) Added s390x in SUPPORTED_ARCHS.
2) Added memory devices slot limits for s390x.
3) Added template_spec for s390x.
4) Added arch check to add old template spec in params
and no need to do modern_version_bases check as for
s390x as template specs are same for all version.
Signed-off-by: Archana Singh <archus(a)linux.vnet.ibm.com>
---
osinfo.py | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/osinfo.py b/osinfo.py
index a3c2b0e..fcdb0fe 100644
--- a/osinfo.py
+++ b/osinfo.py
@@ -31,7 +31,8 @@ from wok.plugins.kimchi.config import kimchiPaths
SUPPORTED_ARCHS = {'x86': ('i386', 'i686', 'x86_64'),
'power': ('ppc', 'ppc64'),
- 'ppc64le': ('ppc64le')}
+ 'ppc64le': ('ppc64le'),
+ 's390x': ('s390x')}
# Memory devices slot limits by architecture
@@ -39,7 +40,8 @@ MEM_DEV_SLOTS = {'ppc64': 256,
'ppc64le': 256,
'x86_64': 256,
'i686': 256,
- 'i386': 256}
+ 'i386': 256,
+ 's390x': 256}
template_specs = {'x86': {'old': dict(disk_bus='ide',
@@ -71,7 +73,11 @@ template_specs = {'x86': {'old':
dict(disk_bus='ide',
kbd_bus='usb',
kbd_type="keyboard",
mouse_bus='usb',
- tablet_bus='usb')}}
+ tablet_bus='usb')},
+ 's390x': {'old': dict(disk_bus='virtio',
+ nic_model='virtio',
cdrom_bus='scsi'),
+ 'modern': dict(disk_bus='virtio',
+ nic_model='virtio',
cdrom_bus='scsi')}}
custom_specs = {'fedora': {'22': {'x86':
dict(video_model='qxl')}}}
@@ -218,8 +224,10 @@ def lookup(distro, version):
# set up arch to ppc64 instead of ppc64le due to libvirt compatibility
if params["arch"] == "ppc64le":
params["arch"] = "ppc64"
-
- if distro in modern_version_bases[arch]:
+ # On s390x, template spec does not change based on version.
+ if params["arch"] == "s390x":
+ params.update(template_specs[arch]['old'])
+ elif distro in modern_version_bases[arch]:
if LooseVersion(version) >= LooseVersion(
modern_version_bases[arch][distro]):
params.update(template_specs[arch]['modern'])