Skip to content

Commit

Permalink
orchestra/opsys.py: support openSUSE
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Cutler <ncutler@suse.com>
  • Loading branch information
smithfarm committed May 14, 2016
1 parent 36e58a4 commit aeed89f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion teuthology/orchestra/opsys.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def from_python(cls, python_val):
name = 'centos'
elif name.startswith('fedora'):
name = 'fedora'
elif name.startswith('opensuse'):
name = 'suse'
obj = cls()
obj.name = name
obj.version = version
Expand Down Expand Up @@ -77,6 +79,8 @@ def from_lsb_release(cls, lsb_release_str):
name = obj._get_value(str_, 'Distributor ID')
if name == 'RedHatEnterpriseServer':
name = 'rhel'
elif name.startswith('openSUSE'):
name = 'suse'
obj.name = name.lower()

obj.version = obj._get_value(str_, 'Release')
Expand Down Expand Up @@ -108,7 +112,10 @@ def from_os_release(cls, os_release_str):
"""
obj = cls()
str_ = os_release_str.strip()
obj.name = cls._get_value(str_, 'ID').lower()
name = cls._get_value(str_, 'ID').lower()
if name == 'opensuse':
name = 'suse'
obj.name = name
obj.version = cls._get_value(str_, 'VERSION_ID')
obj.codename = None

Expand Down

0 comments on commit aeed89f

Please sign in to comment.