-
Notifications
You must be signed in to change notification settings - Fork 5.6k
grains: extend os_family mappings #68715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
72ac7a0
efb4088
1a8f72a
fe03614
6944735
a096a76
eb17adc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Added os_family mappings for additional Linux distributions. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5639,3 +5639,87 @@ def _dir_side_effect(path): | |
| grains = core.fibre_channel_host() | ||
| assert "fibre_channel_host" in grains | ||
| assert grains["fibre_channel_host"] is status | ||
|
|
||
|
|
||
| @pytest.mark.skip_unless_on_linux | ||
| def test_alfalinux_os_grains(): | ||
| _os_release_data = { | ||
| "NAME": "alfaLinux", | ||
| "PRETTY_NAME": "alfaLinux", | ||
| "ID": "alfalinux", | ||
| "VERSION_ID": "1", | ||
| } | ||
| expectation = { | ||
| "os": "alfaLinux", | ||
| "os_family": "Suse", | ||
| "osfullname": "alfaLinux", | ||
| "oscodename": "alfaLinux", | ||
| "osfinger": "alfaLinux-1", | ||
| "osrelease": "1", | ||
| "osrelease_info": (1,), | ||
| "osmajorrelease": 1, | ||
| } | ||
| _run_os_grains_tests(_os_release_data, {}, expectation) | ||
|
|
||
|
|
||
| @pytest.mark.skip_unless_on_linux | ||
| def test_alfalinux_rise_os_grains(): | ||
| _os_release_data = { | ||
| "NAME": "alfaLinux Rise", | ||
| "PRETTY_NAME": "alfaLinux Rise", | ||
| "ID": "alfalinux-rise", | ||
| "VERSION_ID": "1", | ||
| } | ||
| expectation = { | ||
| "os": "alfaLinux Rise", | ||
| "os_family": "Suse", | ||
| "osfullname": "alfaLinux Rise", | ||
| "oscodename": "alfaLinux Rise", | ||
| "osfinger": "alfaLinux Rise-1", | ||
| "osrelease": "1", | ||
| "osrelease_info": (1,), | ||
| "osmajorrelease": 1, | ||
| } | ||
| _run_os_grains_tests(_os_release_data, {}, expectation) | ||
|
|
||
|
|
||
| @pytest.mark.skip_unless_on_linux | ||
| def test_alteros_os_grains(): | ||
| _os_release_data = { | ||
| "NAME": "AlterOS", | ||
| "PRETTY_NAME": "AlterOS", | ||
| "ID": "alteros", | ||
| "VERSION_ID": "1", | ||
| } | ||
| expectation = { | ||
| "os": "AlterOS", | ||
| "os_family": "RedHat", | ||
| "osfullname": "AlterOS", | ||
| "oscodename": "AlterOS", | ||
| "osfinger": "AlterOS-1", | ||
| "osrelease": "1", | ||
| "osrelease_info": (1,), | ||
| "osmajorrelease": 1, | ||
| } | ||
| _run_os_grains_tests(_os_release_data, {}, expectation) | ||
|
|
||
|
|
||
| @pytest.mark.skip_unless_on_linux | ||
| def test_red_os_os_grains(): | ||
| _os_release_data = { | ||
| "NAME": "RED OS", | ||
| "PRETTY_NAME": "RED OS", | ||
| "ID": "redos", | ||
| "VERSION_ID": "1", | ||
| } | ||
| expectation = { | ||
| "os": "RED OS", | ||
| "os_family": "RedHat", | ||
| "osfullname": "RED OS", | ||
| "oscodename": "RED OS", | ||
| "osfinger": "RED OS-1", | ||
| "osrelease": "1", | ||
| "osrelease_info": (1,), | ||
| "osmajorrelease": 1, | ||
| } | ||
| _run_os_grains_tests(_os_release_data, {}, expectation) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pretty sure this needs a blank line. It's gonna fail pre-commit
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The file ends with 6E 29 0A - there is an empty line there.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, if it passes pre-commit, I'll approve it. |
||
Uh oh!
There was an error while loading. Please reload this page.