mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Adding preliminary support for Rocky. (#59682)
* Adding preliminary support for Rocky. * Adding changelog and test per MR guidence. * Update test_core.py Fix a clean up issue Co-authored-by: Megan Wilhite <megan.wilhite@gmail.com> Co-authored-by: Gareth J. Greenaway <gareth@wiked.org>
This commit is contained in:
parent
645c063271
commit
955d730471
3 changed files with 32 additions and 0 deletions
1
changelog/59682.added
Normal file
1
changelog/59682.added
Normal file
|
@ -0,0 +1 @@
|
|||
Rocky Linux has been added to the RedHat os_family.
|
|
@ -1562,6 +1562,7 @@ _OS_NAME_MAP = {
|
|||
"linuxmint": "Mint",
|
||||
"neon": "KDE neon",
|
||||
"pop": "Pop",
|
||||
"rocky": "Rocky",
|
||||
"alibabaclo": "Alinux",
|
||||
"mendel": "Mendel",
|
||||
}
|
||||
|
@ -1640,6 +1641,7 @@ _OS_FAMILY_MAP = {
|
|||
"AIX": "AIX",
|
||||
"TurnKey": "Debian",
|
||||
"Pop": "Debian",
|
||||
"Rocky": "RedHat",
|
||||
"AstraLinuxCE": "Debian",
|
||||
"AstraLinuxSE": "Debian",
|
||||
"Alinux": "RedHat",
|
||||
|
|
|
@ -737,6 +737,35 @@ 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_rocky_8_os_grains(self):
|
||||
"""
|
||||
Test if OS grains are parsed correctly in Rocky 8
|
||||
"""
|
||||
_os_release_map = {
|
||||
"os_release_file": {
|
||||
"NAME": "Rocky",
|
||||
"VERSION_ID": "8.3",
|
||||
"PRETTY_NAME": "Rocky 8",
|
||||
"ID": "Rocky",
|
||||
"ANSI_COLOR": "0;31",
|
||||
"CPE_NAME": "cpe:/o:rocky:rocky:8.3",
|
||||
},
|
||||
"_linux_distribution": ("rocky", "8.3", ""),
|
||||
}
|
||||
|
||||
expectation = {
|
||||
"os": "Rocky",
|
||||
"os_family": "RedHat",
|
||||
"oscodename": "Rocky 8",
|
||||
"osfullname": "Rocky",
|
||||
"osrelease": "8.3",
|
||||
"osrelease_info": (8, 3,),
|
||||
"osmajorrelease": 8,
|
||||
"osfinger": "Rocky-8",
|
||||
}
|
||||
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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue