mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Adding mendel linux
This commit is contained in:
parent
c536ea716d
commit
5fbcc79f1b
3 changed files with 24 additions and 0 deletions
1
changelog/59892.fixed
Normal file
1
changelog/59892.fixed
Normal file
|
@ -0,0 +1 @@
|
|||
Detect Mendel Linux as Debian
|
|
@ -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:
|
||||
|
|
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue