Adding mendel linux

This commit is contained in:
Morgan Kesler 2021-03-22 12:03:21 -04:00 committed by Megan Wilhite
parent c536ea716d
commit 5fbcc79f1b
3 changed files with 24 additions and 0 deletions

1
changelog/59892.fixed Normal file
View file

@ -0,0 +1 @@
Detect Mendel Linux as Debian

View file

@ -1559,6 +1559,7 @@ _OS_NAME_MAP = {
"neon": "KDE neon",
"pop": "Pop",
"alibabaclo": "Alinux",
"mendel": "Mendel",
}
# Map the 'os' grain to the 'os_family' grain
@ -1636,6 +1637,7 @@ _OS_FAMILY_MAP = {
"TurnKey": "Debian",
"Pop": "Debian",
"Alinux": "RedHat",
"Mendel": "Debian",
}
# Matches any possible format:

View file

@ -736,6 +736,27 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin):
}
self._run_os_grains_tests(None, _os_release_map, expectation)
@skipIf(not salt.utils.platform.is_linux(), "System is not Linux")
def test_mendel_os_grains(self):
"""
Test if OS grains are parsed correctly in Mendel Linux
"""
_os_release_map = {
"_linux_distribution": ("Mendel", "10.0", "eagle"),
}
expectation = {
"os": "Mendel",
"os_family": "Debian",
"oscodename": "eagle",
"osfullname": "Mendel",
"osrelease": "10.0",
"osrelease_info": (10, 0),
"osmajorrelease": 10,
"osfinger": "Mendel-10",
}
self._run_os_grains_tests(None, _os_release_map, expectation)
@skipIf(not salt.utils.platform.is_linux(), "System is not Linux")
def test_almalinux_8_os_grains(self):
"""