def _get_dist_release(self):
version = self._parse_version(self.os_version)
- if self.os_type in ('centos', 'rhel', 'rocky'):
+ if self.os_type in ('centos', 'rhel', 'alma', 'rocky'):
return "el{0}".format(version)
elif self.os_type == "fedora":
return "fc{0}".format(version)
"""
if distro in ('centos', 'rhel'):
distro = "centos"
- elif distro == "fedora":
- distro = "fedora"
- elif distro == "opensuse":
- distro = "opensuse"
- elif distro == "sle":
- distro == "sle"
- elif distro == "rocky":
- distro = "rocky"
+ elif distro in ("fedora"):
+ pass
+ elif distro in ("opensuse", "sle"):
+ pass
+ elif distro in ("alma", "rocky"):
+ pass
else:
# deb based systems use codename instead of a distro/version combo
if not codename:
if distro in ('centos', 'rhel'):
distro = 'centos'
version = cls._parse_version(version)
- if distro in ('rocky'):
- distro = 'rocky'
+ if distro in ('alma', 'rocky'):
version = cls._parse_version(version)
return "%s/%s" % (distro, version)
DISTRO_MATRIX = [
('rhel', '7.0', None, 'centos/7'),
+ ('alma', '9.6', None, 'alma/9'),
+ ('rocky', '9.6', None, 'rocky/9'),
+ ('rocky', '10.0', None, 'rocky/10'),
('centos', '6.5', None, 'centos/6'),
('centos', '7.0', None, 'centos/7'),
('centos', '7.1', None, 'centos/7'),
('ubuntu', '16.04', None, 'ubuntu/16.04'),
('ubuntu', '18.04', None, 'ubuntu/18.04'),
('ubuntu', '20.04', None, 'ubuntu/20.04'),
+ ('opensuse', '15.6', None, 'opensuse/15.6'),
+ ('sle', '15.5', None, 'sle/15.5'),
]
+ @pytest.mark.parametrize(
+ "matrix_index",
+ range(len(DISTRO_MATRIX)),
+ )
+ def test_get_distro_remote(self, matrix_index):
+ super().test_get_distro_remote(matrix_index)
DISTRO_MATRIX_NOVER = [
('rhel', None, None, 'centos/8'),
- ('centos', None, None, 'centos/8'),
+ ('centos', None, None, 'centos/9'),
('fedora', None, None, 'fedora/25'),
- ('ubuntu', None, None, 'ubuntu/20.04'),
- ('debian', None, None, 'debian/8.0'),
+ ('ubuntu', None, None, 'ubuntu/22.04'),
+ ('alma', None, None, 'alma/9'),
+ ('rocky', None, None, 'rocky/9'),
]
+ @pytest.mark.parametrize(
+ "matrix_index",
+ range(len(DISTRO_MATRIX) + len(DISTRO_MATRIX_NOVER)),
+ )
+ def test_get_distro_config(self, matrix_index):
+ super().test_get_distro_config(matrix_index)