distribution: Added support for openEuler OS (#69324)

Detect os_family for openEuler OS as 'RedHat', instead of 'openEuler'.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/69760/head
Abhijeet Kasurde 5 years ago committed by GitHub
parent f81f5da20e
commit 7b3d9cbcb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
minor_changes:
- Added openEuler OS in RedHat OS Family.

@ -467,7 +467,8 @@ class Distribution(object):
# keep keys in sync with Conditionals page of docs
OS_FAMILY_MAP = {'RedHat': ['RedHat', 'Fedora', 'CentOS', 'Scientific', 'SLC',
'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS',
'OEL', 'Amazon', 'Virtuozzo', 'XenServer', 'Alibaba', 'EulerOS'],
'OEL', 'Amazon', 'Virtuozzo', 'XenServer', 'Alibaba',
'EulerOS', 'openEuler'],
'Debian': ['Debian', 'Ubuntu', 'Raspbian', 'Neon', 'KDE neon',
'Linux Mint', 'SteamOS', 'Devuan', 'Kali', 'Cumulus Linux',
'Pop!_OS', ],

@ -0,0 +1,28 @@
{
"platform.dist": [
"openeuler",
"20.03",
"LTS"
],
"input": {
"/etc/os-release": "NAME=\"openEuler\"\nVERSION=\"20.03 (LTS)\"\nID=\"openEuler\"\nVERSION_ID=\"20.03\"\nPRETTY_NAME=\"openEuler 20.03 (LTS)\"\nANSI_COLOR=\"0;31\"\n\n",
"/etc/system-release": "openEuler release 20.03 (LTS)\n"
},
"result": {
"distribution_release": "LTS",
"distribution": "openEuler",
"distribution_major_version": "20",
"os_family": "RedHat",
"distribution_version": "20.03"
},
"name": "openEuler 20.03",
"distro": {
"codename": "LTS",
"version": "20.03",
"id": "openeuler",
"version_best": "20.03",
"name": "openEuler",
"os_release_info": {},
"lsb_release_info": {}
}
}
Loading…
Cancel
Save