add support for FusionOS platform
This commit is contained in:
6
build.sh
6
build.sh
@ -48,7 +48,7 @@ done
|
|||||||
|
|
||||||
PLAT_FORM_STR=$(sh "${ROOT_DIR}/build/get_PlatForm_str.sh")
|
PLAT_FORM_STR=$(sh "${ROOT_DIR}/build/get_PlatForm_str.sh")
|
||||||
if [ "${PLAT_FORM_STR}"x == "Failed"x ]; then
|
if [ "${PLAT_FORM_STR}"x == "Failed"x ]; then
|
||||||
echo "We only support openEuler(aarch64), EulerOS(aarch64), CentOS platform."
|
echo "We only support openEuler(aarch64), EulerOS(aarch64), FusionOS, CentOS platform."
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -62,6 +62,8 @@ if [ X$(echo $PLAT_FORM_STR | grep "centos") != X"" ]; then
|
|||||||
dist_version="CentOS"
|
dist_version="CentOS"
|
||||||
elif [ X$(echo $PLAT_FORM_STR | grep "openeuler") != X"" ]; then
|
elif [ X$(echo $PLAT_FORM_STR | grep "openeuler") != X"" ]; then
|
||||||
dist_version="openEuler"
|
dist_version="openEuler"
|
||||||
|
elif [ X$(echo $PLAT_FORM_STR | grep "fusionos") != X"" ]; then
|
||||||
|
dist_version="FusionOS"
|
||||||
elif [ X$(echo $PLAT_FORM_STR | grep "euleros") != X"" ]; then
|
elif [ X$(echo $PLAT_FORM_STR | grep "euleros") != X"" ]; then
|
||||||
dist_version="EulerOS"
|
dist_version="EulerOS"
|
||||||
elif [ X$(echo $PLAT_FORM_STR | grep "ubuntu") != X"" ]; then
|
elif [ X$(echo $PLAT_FORM_STR | grep "ubuntu") != X"" ]; then
|
||||||
@ -69,7 +71,7 @@ elif [ X$(echo $PLAT_FORM_STR | grep "ubuntu") != X"" ]; then
|
|||||||
elif [ X$(echo $PLAT_FORM_STR | grep "asianux") != X"" ]; then
|
elif [ X$(echo $PLAT_FORM_STR | grep "asianux") != X"" ]; then
|
||||||
dist_version="Asianux"
|
dist_version="Asianux"
|
||||||
else
|
else
|
||||||
echo "We only support openEuler(aarch64), EulerOS(aarch64), CentOS, Ubuntu(x86) platform."
|
echo "We only support openEuler(aarch64), EulerOS(aarch64), FusionOS, CentOS, Ubuntu(x86) platform."
|
||||||
echo "Kernel is $kernel"
|
echo "Kernel is $kernel"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -27,6 +27,10 @@ function get_os_str() {
|
|||||||
os_str=openeuler_aarch64
|
os_str=openeuler_aarch64
|
||||||
elif [ "$os_name"x = "openEuler"x ] && [ "$cpu_arc"x = "x86_64"x ]; then
|
elif [ "$os_name"x = "openEuler"x ] && [ "$cpu_arc"x = "x86_64"x ]; then
|
||||||
os_str=openeuler_x86_64
|
os_str=openeuler_x86_64
|
||||||
|
elif [ "$os_name"x = "fusionos"x ] && [ "$cpu_arc"x = "aarch64"x ]; then
|
||||||
|
os_str=fusionos_aarch64
|
||||||
|
elif [ "$os_name"x = "fusionos"x ] && [ "$cpu_arc"x = "x86_64"x ]; then
|
||||||
|
os_str=fusionos_x86_64
|
||||||
elif [ "$os_name"x = "ubuntu"x ] && [ "$cpu_arc"x = "x86_64"x ]; then
|
elif [ "$os_name"x = "ubuntu"x ] && [ "$cpu_arc"x = "x86_64"x ]; then
|
||||||
os_str=ubuntu18.04_x86_64
|
os_str=ubuntu18.04_x86_64
|
||||||
elif [ "$os_name"x = "asianux"x ] && [ "$cpu_arc"x = "x86_64"x ]; then
|
elif [ "$os_name"x = "asianux"x ] && [ "$cpu_arc"x = "x86_64"x ]; then
|
||||||
|
@ -28,4 +28,4 @@ class CommConstants:
|
|||||||
UPGRADE_SQL_FILE = "upgrade_sql.tar.gz"
|
UPGRADE_SQL_FILE = "upgrade_sql.tar.gz"
|
||||||
# not support grep upgrade
|
# not support grep upgrade
|
||||||
FIRST_GREY_UPGRADE_NUM = -1
|
FIRST_GREY_UPGRADE_NUM = -1
|
||||||
DIST_NAME_TUPLE = ("redhat", "euleros", "centos", "openEuler")
|
DIST_NAME_TUPLE = ("redhat", "euleros", "centos", "openEuler", "FusionOS")
|
||||||
|
@ -83,7 +83,7 @@ class OsFile:
|
|||||||
return init_system_file
|
return init_system_file
|
||||||
if distname == "SuSE" and os.path.isfile(init_file_suse):
|
if distname == "SuSE" and os.path.isfile(init_file_suse):
|
||||||
init_file = init_file_suse
|
init_file = init_file_suse
|
||||||
elif distname in ("redhat", "centos", "euleros", "oracle", "openEuler") \
|
elif distname in ("redhat", "centos", "euleros", "oracle", "openEuler", "FusionOS") \
|
||||||
and os.path.isfile(init_file_redhat):
|
and os.path.isfile(init_file_redhat):
|
||||||
init_file = init_file_redhat
|
init_file = init_file_redhat
|
||||||
elif distname == "kylin" and os.path.isfile(init_file_kylin):
|
elif distname == "kylin" and os.path.isfile(init_file_kylin):
|
||||||
|
@ -316,7 +316,7 @@ General options:
|
|||||||
group = grp.getgrgid(pwd.getpwnam(self.user).pw_gid).gr_name
|
group = grp.getgrgid(pwd.getpwnam(self.user).pw_gid).gr_name
|
||||||
distname, version, idnum = LinuxDistro.linux_distribution()
|
distname, version, idnum = LinuxDistro.linux_distribution()
|
||||||
# check if OS version is redhat or Euler
|
# check if OS version is redhat or Euler
|
||||||
if (distname in ("redhat", "euleros", "centos", "openEuler")):
|
if (distname in ("redhat", "euleros", "centos", "openEuler", "FusionOS")):
|
||||||
if (self.deleteGroup != True and self.deleteUser == True
|
if (self.deleteGroup != True and self.deleteUser == True
|
||||||
and self.user == group):
|
and self.user == group):
|
||||||
GaussLog.exitWithError(ErrorCode.GAUSS_500["GAUSS_50001"] %
|
GaussLog.exitWithError(ErrorCode.GAUSS_500["GAUSS_50001"] %
|
||||||
|
@ -592,7 +592,7 @@ class DefaultValue():
|
|||||||
NetWorkConfFile = ""
|
NetWorkConfFile = ""
|
||||||
distname, version, idnum = LinuxDistro.linux_distribution()
|
distname, version, idnum = LinuxDistro.linux_distribution()
|
||||||
distname = distname.lower()
|
distname = distname.lower()
|
||||||
if (distname in ("redhat", "centos", "euleros", "openEuler")):
|
if (distname in ("redhat", "centos", "euleros", "openEuler", "fusionos")):
|
||||||
NetWorkConfFile = "%s/ifcfg-%s" % (RedHatNetWorkConfPath,
|
NetWorkConfFile = "%s/ifcfg-%s" % (RedHatNetWorkConfPath,
|
||||||
networkCardNum)
|
networkCardNum)
|
||||||
else:
|
else:
|
||||||
@ -601,7 +601,7 @@ class DefaultValue():
|
|||||||
|
|
||||||
if (not os.path.exists(NetWorkConfFile)):
|
if (not os.path.exists(NetWorkConfFile)):
|
||||||
if (distname in (
|
if (distname in (
|
||||||
"redhat", "centos", "euleros", "openeuler")):
|
"redhat", "centos", "euleros", "openeuler", "fusionos")):
|
||||||
cmd = "find %s -iname 'ifcfg-*-%s' -print" % (
|
cmd = "find %s -iname 'ifcfg-*-%s' -print" % (
|
||||||
RedHatNetWorkConfPath, networkCardNum)
|
RedHatNetWorkConfPath, networkCardNum)
|
||||||
elif (distname == "debian" and version == "buster/sid"):
|
elif (distname == "debian" and version == "buster/sid"):
|
||||||
@ -784,7 +784,7 @@ class DefaultValue():
|
|||||||
"""
|
"""
|
||||||
distname, version, _ = LinuxDistro.linux_distribution()
|
distname, version, _ = LinuxDistro.linux_distribution()
|
||||||
if (distname.lower() in ("suse", "redhat", "centos", "euleros",
|
if (distname.lower() in ("suse", "redhat", "centos", "euleros",
|
||||||
"openeuler")):
|
"openeuler", "fusionos")):
|
||||||
cmd = g_file.SHELL_CMD_DICT["checkPassword"] % (checkUser,
|
cmd = g_file.SHELL_CMD_DICT["checkPassword"] % (checkUser,
|
||||||
"'^Last.*Change'")
|
"'^Last.*Change'")
|
||||||
else:
|
else:
|
||||||
@ -805,7 +805,7 @@ class DefaultValue():
|
|||||||
if ("password must be changed" in result):
|
if ("password must be changed" in result):
|
||||||
raise Exception(ErrorCode.GAUSS_503["GAUSS_50307"])
|
raise Exception(ErrorCode.GAUSS_503["GAUSS_50307"])
|
||||||
if (distname.lower() in ("redhat", "centos", "euleros",
|
if (distname.lower() in ("redhat", "centos", "euleros",
|
||||||
"openeuler")):
|
"openeuler", "fusionos")):
|
||||||
if ("password must be changed" in result):
|
if ("password must be changed" in result):
|
||||||
raise Exception(ErrorCode.GAUSS_503["GAUSS_50307"])
|
raise Exception(ErrorCode.GAUSS_503["GAUSS_50307"])
|
||||||
|
|
||||||
@ -881,7 +881,7 @@ class DefaultValue():
|
|||||||
return initSystemFile
|
return initSystemFile
|
||||||
if (distname == "SuSE" and os.path.isfile(initFileSuse)):
|
if (distname == "SuSE" and os.path.isfile(initFileSuse)):
|
||||||
initFile = initFileSuse
|
initFile = initFileSuse
|
||||||
elif (distname in ("redhat", "centos", "euleros", "openEuler") and
|
elif (distname in ("redhat", "centos", "euleros", "openEuler", "FusionOS") and
|
||||||
os.path.isfile(initFileRedhat)):
|
os.path.isfile(initFileRedhat)):
|
||||||
initFile = initFileRedhat
|
initFile = initFileRedhat
|
||||||
elif (distname == "debian" and version == "buster/sid" and
|
elif (distname == "debian" and version == "buster/sid" and
|
||||||
|
@ -631,7 +631,7 @@ def isSupportSystemOs():
|
|||||||
output : NA
|
output : NA
|
||||||
"""
|
"""
|
||||||
osName = LinuxDistro.linux_distribution()[0]
|
osName = LinuxDistro.linux_distribution()[0]
|
||||||
if osName in ["redhat", "centos", "euleros", "openEuler"]:
|
if osName in ["redhat", "centos", "euleros", "openEuler", "FusionOS"]:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
@ -809,7 +809,7 @@ def getOSInitFile():
|
|||||||
if (distname == "SuSE" and os.path.isfile(initFileSuse)):
|
if (distname == "SuSE" and os.path.isfile(initFileSuse)):
|
||||||
initFile = initFileSuse
|
initFile = initFileSuse
|
||||||
elif (distname in (
|
elif (distname in (
|
||||||
"redhat", "centos", "euleros", "openEuler") and os.path.isfile(
|
"redhat", "centos", "euleros", "openEuler", "FusionOS") and os.path.isfile(
|
||||||
initFileRedhat)):
|
initFileRedhat)):
|
||||||
initFile = initFileRedhat
|
initFile = initFileRedhat
|
||||||
else:
|
else:
|
||||||
|
@ -68,7 +68,7 @@ class CheckBond(BaseItem):
|
|||||||
ifcfgFileRedhat = "/etc/sysconfig/network-scripts/ifcfg-%s" \
|
ifcfgFileRedhat = "/etc/sysconfig/network-scripts/ifcfg-%s" \
|
||||||
% networkCards
|
% networkCards
|
||||||
distname, version, idnum = LinuxDistro.linux_distribution()
|
distname, version, idnum = LinuxDistro.linux_distribution()
|
||||||
if (distname in ["redhat", "centos", "euleros", "openEuler"]):
|
if (distname in ["redhat", "centos", "euleros", "openEuler", "FusionOS"]):
|
||||||
cmd = "echo BONDING_MODULE_OPTS='mode=%d " \
|
cmd = "echo BONDING_MODULE_OPTS='mode=%d " \
|
||||||
"miimon=100 use_carrier=0' >> %s " % (1, ifcfgFileRedhat)
|
"miimon=100 use_carrier=0' >> %s " % (1, ifcfgFileRedhat)
|
||||||
else:
|
else:
|
||||||
|
@ -51,6 +51,9 @@ class CheckOSVer(BaseItem):
|
|||||||
elif distName == "openeuler":
|
elif distName == "openeuler":
|
||||||
self.result.rst = ResultStatus.OK
|
self.result.rst = ResultStatus.OK
|
||||||
self.result.val = "The current OS is openEuler %s." % version
|
self.result.val = "The current OS is openEuler %s." % version
|
||||||
|
elif distName == "fusionos":
|
||||||
|
self.result.rst = ResultStatus.OK
|
||||||
|
self.result.val = "The current OS is FusionOS %s." % version
|
||||||
else:
|
else:
|
||||||
self.result.rst = ResultStatus.NG
|
self.result.rst = ResultStatus.NG
|
||||||
self.result.val = "The current OS[%s %s] " \
|
self.result.val = "The current OS[%s %s] " \
|
||||||
@ -70,7 +73,7 @@ class CheckOSVer(BaseItem):
|
|||||||
analysis = ""
|
analysis = ""
|
||||||
VerGroupDisk = {'RedHat6': [], 'RedHat7': [], 'Euler': [],
|
VerGroupDisk = {'RedHat6': [], 'RedHat7': [], 'Euler': [],
|
||||||
'SuSE11SP1': [], 'SuSE11SP234': [], 'SuSE12': [],
|
'SuSE11SP1': [], 'SuSE11SP234': [], 'SuSE12': [],
|
||||||
'openEuler': []}
|
'openEuler': [], 'FusionOS': []}
|
||||||
for v in itemResult.getLocalItems():
|
for v in itemResult.getLocalItems():
|
||||||
analysis += "%s: %s\n" % (v.host, v.val)
|
analysis += "%s: %s\n" % (v.host, v.val)
|
||||||
verInfo = v.val.strip().split(' ')[4:]
|
verInfo = v.val.strip().split(' ')[4:]
|
||||||
@ -84,6 +87,8 @@ class CheckOSVer(BaseItem):
|
|||||||
VerGroupDisk['Euler'].append(verInfo)
|
VerGroupDisk['Euler'].append(verInfo)
|
||||||
elif verInfo[0] == "openEuler":
|
elif verInfo[0] == "openEuler":
|
||||||
VerGroupDisk['openEuler'].append(verInfo)
|
VerGroupDisk['openEuler'].append(verInfo)
|
||||||
|
elif verInfo[0] == "FusionOS":
|
||||||
|
VerGroupDisk['FusionOS'].append(verInfo)
|
||||||
elif verInfo[0] == "SuSE":
|
elif verInfo[0] == "SuSE":
|
||||||
if verInfo[1] == "11.1":
|
if verInfo[1] == "11.1":
|
||||||
VerGroupDisk['SuSE11SP1'].append(verInfo)
|
VerGroupDisk['SuSE11SP1'].append(verInfo)
|
||||||
|
@ -47,7 +47,7 @@ from netifaces import interfaces, ifaddresses, AF_INET, AF_INET6
|
|||||||
_supported_dists = (
|
_supported_dists = (
|
||||||
'SuSE', 'debian', 'fedora', 'redhat', 'centos', 'euleros', "openEuler",
|
'SuSE', 'debian', 'fedora', 'redhat', 'centos', 'euleros', "openEuler",
|
||||||
'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo',
|
'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo',
|
||||||
'UnitedLinux', 'turbolinux')
|
'FusionOS', 'UnitedLinux', 'turbolinux')
|
||||||
_release_filename = re.compile(r'(\w+)[-_](release|version)')
|
_release_filename = re.compile(r'(\w+)[-_](release|version)')
|
||||||
_lsb_release_version = re.compile(r'(.+)'
|
_lsb_release_version = re.compile(r'(.+)'
|
||||||
' release '
|
' release '
|
||||||
@ -61,12 +61,13 @@ SUSE = "suse"
|
|||||||
REDHAT = "redhat"
|
REDHAT = "redhat"
|
||||||
CENTOS = "centos"
|
CENTOS = "centos"
|
||||||
EULEROS = "euleros"
|
EULEROS = "euleros"
|
||||||
|
FUSIONOS = "fusionos"
|
||||||
KYLIN = "kylin"
|
KYLIN = "kylin"
|
||||||
OPENEULER = "openeuler"
|
OPENEULER = "openeuler"
|
||||||
ASIANUX = "asianux"
|
ASIANUX = "asianux"
|
||||||
DEBIAN = "debian"
|
DEBIAN = "debian"
|
||||||
UBUNTU = "ubuntu"
|
UBUNTU = "ubuntu"
|
||||||
SUPPORT_WHOLE_PLATFORM_LIST = [SUSE, REDHAT, CENTOS, EULEROS,
|
SUPPORT_WHOLE_PLATFORM_LIST = [SUSE, REDHAT, CENTOS, EULEROS, FUSIONOS,
|
||||||
OPENEULER, KYLIN, ASIANUX, DEBIAN, UBUNTU]
|
OPENEULER, KYLIN, ASIANUX, DEBIAN, UBUNTU]
|
||||||
# RedhatX platform
|
# RedhatX platform
|
||||||
SUPPORT_RHEL_SERIES_PLATFORM_LIST = [REDHAT, CENTOS, "kylin", "asianux"]
|
SUPPORT_RHEL_SERIES_PLATFORM_LIST = [REDHAT, CENTOS, "kylin", "asianux"]
|
||||||
@ -96,6 +97,7 @@ COLON = ":"
|
|||||||
PAK_CENTOS = "CentOS"
|
PAK_CENTOS = "CentOS"
|
||||||
PAK_EULER = "Euler"
|
PAK_EULER = "Euler"
|
||||||
PAK_OPENEULER = "openEuler"
|
PAK_OPENEULER = "openEuler"
|
||||||
|
PAK_FUSIONOS = "FusionOS"
|
||||||
PAK_REDHAT = "RedHat"
|
PAK_REDHAT = "RedHat"
|
||||||
PAK_ASIANUX = "Asianux"
|
PAK_ASIANUX = "Asianux"
|
||||||
PAK_UBUNTU = "Ubuntu"
|
PAK_UBUNTU = "Ubuntu"
|
||||||
@ -105,7 +107,7 @@ PAK_SUSE = "SUSE"
|
|||||||
_supported_dists = (
|
_supported_dists = (
|
||||||
'SuSE', 'debian', 'fedora', 'redhat', 'centos', 'euleros', "openEuler",
|
'SuSE', 'debian', 'fedora', 'redhat', 'centos', 'euleros', "openEuler",
|
||||||
'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo',
|
'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo',
|
||||||
'UnitedLinux', 'turbolinux', 'kylin', 'asianux', 'ubuntu')
|
'FusionOS', 'UnitedLinux', 'turbolinux', 'kylin', 'asianux', 'ubuntu')
|
||||||
_release_filename = re.compile(r'(\w+)[-_](release|version)')
|
_release_filename = re.compile(r'(\w+)[-_](release|version)')
|
||||||
_lsb_release_version = re.compile(r'(.+)'
|
_lsb_release_version = re.compile(r'(.+)'
|
||||||
' release '
|
' release '
|
||||||
@ -1537,6 +1539,12 @@ class LinuxPlatform(GenericPlatform):
|
|||||||
prefixStr, packageVersion,
|
prefixStr, packageVersion,
|
||||||
PAK_OPENEULER,
|
PAK_OPENEULER,
|
||||||
BIT_VERSION, postfixStr))
|
BIT_VERSION, postfixStr))
|
||||||
|
elif distname in FUSIONOS:
|
||||||
|
fileName = os.path.join(dirName, "./../../../",
|
||||||
|
"%s-%s-%s-%s.%s" % (
|
||||||
|
prefixStr, packageVersion,
|
||||||
|
PAK_FUSIONOS,
|
||||||
|
BIT_VERSION, postfixStr))
|
||||||
elif distname in DEBIAN and (version == "buster/sid"):
|
elif distname in DEBIAN and (version == "buster/sid"):
|
||||||
fileName = os.path.join(dirName, "./../../../",
|
fileName = os.path.join(dirName, "./../../../",
|
||||||
"%s-%s-%s-%s.%s" % (
|
"%s-%s-%s-%s.%s" % (
|
||||||
@ -1782,7 +1790,7 @@ class RHELPlatform(LinuxPlatform):
|
|||||||
(distName.lower() == CENTOS and version[0:3] ==
|
(distName.lower() == CENTOS and version[0:3] ==
|
||||||
SUPPORT_EULEROS_VERSION_LIST and
|
SUPPORT_EULEROS_VERSION_LIST and
|
||||||
os.path.isfile(os.path.join("/etc", "euleros-release"))) or
|
os.path.isfile(os.path.join("/etc", "euleros-release"))) or
|
||||||
distName.lower() == OPENEULER):
|
(distName.lower() == OPENEULER) or (distName.lower() == FUSIONOS)):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
@ -1911,6 +1919,7 @@ class RHELPlatform(LinuxPlatform):
|
|||||||
(distName.lower() in SUPPORT_RHEL_SERIES_PLATFORM_LIST and
|
(distName.lower() in SUPPORT_RHEL_SERIES_PLATFORM_LIST and
|
||||||
version[0:3] in SUPPORT_RHEL_SERIES_VERSION_LIST)) or
|
version[0:3] in SUPPORT_RHEL_SERIES_VERSION_LIST)) or
|
||||||
(distName.lower() == OPENEULER) or
|
(distName.lower() == OPENEULER) or
|
||||||
|
(distName.lower() == FUSIONOS) or
|
||||||
(distName.lower() == DEBIAN and version == "buster/sid")
|
(distName.lower() == DEBIAN and version == "buster/sid")
|
||||||
)):
|
)):
|
||||||
return distName.lower(), version[0:3]
|
return distName.lower(), version[0:3]
|
||||||
|
@ -661,7 +661,7 @@ def disRemoveIPC():
|
|||||||
"""
|
"""
|
||||||
g_logger.debug("disbale RemoveIPC.")
|
g_logger.debug("disbale RemoveIPC.")
|
||||||
distName = g_Platform.getCurrentPlatForm()[0]
|
distName = g_Platform.getCurrentPlatForm()[0]
|
||||||
if distName.upper() in ("OPENEULER", "KYLIN"):
|
if distName.upper() in ("OPENEULER", "FUSIONOS", "KYLIN"):
|
||||||
cmd = "setenforce 0"
|
cmd = "setenforce 0"
|
||||||
subprocess.getstatusoutput(cmd)
|
subprocess.getstatusoutput(cmd)
|
||||||
initFile = "/usr/lib/systemd/system/systemd-logind.service"
|
initFile = "/usr/lib/systemd/system/systemd-logind.service"
|
||||||
@ -1391,7 +1391,7 @@ def collectfirewall():
|
|||||||
"""
|
"""
|
||||||
data = firewall()
|
data = firewall()
|
||||||
distname = LinuxDistro.linux_distribution()[0]
|
distname = LinuxDistro.linux_distribution()[0]
|
||||||
if distname in ("redhat", "centos", "euleros", "openEuler"):
|
if distname in ("redhat", "centos", "euleros", "openEuler", "FusionOS"):
|
||||||
data.distname = distname.upper()
|
data.distname = distname.upper()
|
||||||
if g_Platform.isPlatFormEulerOSOrRHEL7X():
|
if g_Platform.isPlatFormEulerOSOrRHEL7X():
|
||||||
cmd = "systemctl status firewalld.service"
|
cmd = "systemctl status firewalld.service"
|
||||||
@ -1406,7 +1406,7 @@ def collectfirewall():
|
|||||||
data.errormsg = output
|
data.errormsg = output
|
||||||
return data
|
return data
|
||||||
|
|
||||||
if distname in ("redhat", "centos", "euleros", "openEuler"):
|
if distname in ("redhat", "centos", "euleros", "openEuler", "FusionOS"):
|
||||||
if g_Platform.isPlatFormEulerOSOrRHEL7X():
|
if g_Platform.isPlatFormEulerOSOrRHEL7X():
|
||||||
if (output.strip()).find("Active: "
|
if (output.strip()).find("Active: "
|
||||||
"active (running)") > 0:
|
"active (running)") > 0:
|
||||||
@ -1791,7 +1791,7 @@ def CheckPlatformInfo():
|
|||||||
data.bits)
|
data.bits)
|
||||||
g_logger.log("False %s %s" % (data.distname, platform_str))
|
g_logger.log("False %s %s" % (data.distname, platform_str))
|
||||||
return
|
return
|
||||||
elif (data.distname == "euleros" or data.distname == "openEuler" or data.distname == "kylin"):
|
elif (data.distname == "euleros" or data.distname == "openEuler" or data.distname == "FusionOS" or data.distname == "kylin"):
|
||||||
mixed_type = "%s" % data.distname
|
mixed_type = "%s" % data.distname
|
||||||
platform_str = "%s_%s_%s" % (data.distname, data.version, data.bits)
|
platform_str = "%s_%s_%s" % (data.distname, data.version, data.bits)
|
||||||
elif (data.distname == "debian" or data.version == "buster/sid"):
|
elif (data.distname == "debian" or data.version == "buster/sid"):
|
||||||
|
@ -27,11 +27,12 @@ CENTOS = "centos"
|
|||||||
EULEROS = "euleros"
|
EULEROS = "euleros"
|
||||||
KYLIN = "kylin"
|
KYLIN = "kylin"
|
||||||
OPENEULER = "openeuler"
|
OPENEULER = "openeuler"
|
||||||
|
FUSIONOS = "fusionos"
|
||||||
ASIANUX = "asianux"
|
ASIANUX = "asianux"
|
||||||
DEBIAN = "debian"
|
DEBIAN = "debian"
|
||||||
UBUNTU = "ubuntu"
|
UBUNTU = "ubuntu"
|
||||||
SUPPORT_WHOLE_PLATFORM_LIST = [SUSE, REDHAT, CENTOS, EULEROS, OPENEULER, KYLIN,
|
SUPPORT_WHOLE_PLATFORM_LIST = [SUSE, REDHAT, CENTOS, EULEROS, OPENEULER, KYLIN,
|
||||||
ASIANUX, DEBIAN, UBUNTU]
|
FUSIONOS, ASIANUX, DEBIAN, UBUNTU]
|
||||||
# RedhatX platform
|
# RedhatX platform
|
||||||
SUPPORT_RHEL_SERIES_PLATFORM_LIST = [REDHAT, CENTOS, "kylin", "asianux"]
|
SUPPORT_RHEL_SERIES_PLATFORM_LIST = [REDHAT, CENTOS, "kylin", "asianux"]
|
||||||
SUPPORT_RHEL6X_VERSION_LIST = ["6.4", "6.5", "6.6", "6.7", "6.8", "6.9", "10"]
|
SUPPORT_RHEL6X_VERSION_LIST = ["6.4", "6.5", "6.6", "6.7", "6.8", "6.9", "10"]
|
||||||
@ -60,6 +61,7 @@ COLON = ":"
|
|||||||
PAK_CENTOS = "CentOS"
|
PAK_CENTOS = "CentOS"
|
||||||
PAK_EULER = "Euler"
|
PAK_EULER = "Euler"
|
||||||
PAK_OPENEULER = "openEuler"
|
PAK_OPENEULER = "openEuler"
|
||||||
|
PAK_FUSIONOS = "FusionOS"
|
||||||
PAK_REDHAT = "RedHat"
|
PAK_REDHAT = "RedHat"
|
||||||
PAK_ASIANUX = "Asianux"
|
PAK_ASIANUX = "Asianux"
|
||||||
PAK_UBUNTU = "Ubuntu"
|
PAK_UBUNTU = "Ubuntu"
|
||||||
@ -71,4 +73,4 @@ PAK_DEBIAN = "Debian"
|
|||||||
_supported_dists = (
|
_supported_dists = (
|
||||||
'SuSE', 'debian', 'fedora', 'redhat', 'centos', 'euleros', "openEuler",
|
'SuSE', 'debian', 'fedora', 'redhat', 'centos', 'euleros', "openEuler",
|
||||||
'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo',
|
'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo',
|
||||||
'UnitedLinux', 'turbolinux', 'ubuntu', 'kylin', 'asianux')
|
"FusionOS", 'UnitedLinux', 'turbolinux', 'ubuntu', 'kylin', 'asianux')
|
||||||
|
@ -25,7 +25,8 @@ from gspylib.common.ErrorCode import ErrorCode
|
|||||||
from os_platform.common import REDHAT, PAK_REDHAT, BIT_VERSION, \
|
from os_platform.common import REDHAT, PAK_REDHAT, BIT_VERSION, \
|
||||||
CENTOS, PAK_EULER, PAK_CENTOS, ASIANUX, SUSE, PAK_ASIANUX, \
|
CENTOS, PAK_EULER, PAK_CENTOS, ASIANUX, SUSE, PAK_ASIANUX, \
|
||||||
EULEROS, OPENEULER, KYLIN, PAK_OPENEULER, SUPPORT_WHOLE_PLATFORM_LIST,\
|
EULEROS, OPENEULER, KYLIN, PAK_OPENEULER, SUPPORT_WHOLE_PLATFORM_LIST,\
|
||||||
BLANK_SPACE, PAK_UBUNTU, DEBIAN, PAK_KYLIN, PAK_SUSE, PAK_DEBIAN
|
BLANK_SPACE, PAK_UBUNTU, DEBIAN, PAK_KYLIN, PAK_SUSE, PAK_DEBIAN, \
|
||||||
|
FUSIONOS, PAK_FUSIONOS
|
||||||
from os_platform.linux_distro import LinuxDistro
|
from os_platform.linux_distro import LinuxDistro
|
||||||
|
|
||||||
|
|
||||||
@ -224,6 +225,11 @@ class LinuxPlatform(object):
|
|||||||
self.package_file_path(prefix_str, packageVersion, PAK_OPENEULER, postfix_str)
|
self.package_file_path(prefix_str, packageVersion, PAK_OPENEULER, postfix_str)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
elif distname == FUSIONOS:
|
||||||
|
file_name_list = [
|
||||||
|
self.package_file_path(prefix_str, packageVersion, PAK_FUSIONOS, postfix_str)
|
||||||
|
]
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise Exception(ErrorCode.GAUSS_519["GAUSS_51900"] +
|
raise Exception(ErrorCode.GAUSS_519["GAUSS_51900"] +
|
||||||
"Supported platforms are: %s." % str(
|
"Supported platforms are: %s." % str(
|
||||||
|
@ -24,7 +24,7 @@ import os
|
|||||||
import platform
|
import platform
|
||||||
from gspylib.common.ErrorCode import ErrorCode
|
from gspylib.common.ErrorCode import ErrorCode
|
||||||
from os_platform.common import BIT_VERSION, EULEROS, SUPPORT_EULEROS_VERSION_LIST, \
|
from os_platform.common import BIT_VERSION, EULEROS, SUPPORT_EULEROS_VERSION_LIST, \
|
||||||
SUPPORT_RHEL_SERIES_PLATFORM_LIST, \
|
FUSIONOS, SUPPORT_RHEL_SERIES_PLATFORM_LIST, \
|
||||||
SUPPORT_RHEL_SERIES_VERSION_LIST, OPENEULER, CENTOS, \
|
SUPPORT_RHEL_SERIES_VERSION_LIST, OPENEULER, CENTOS, \
|
||||||
SUPPORT_RHEL7X_VERSION_LIST, DEBIAN, BLANK_SPACE
|
SUPPORT_RHEL7X_VERSION_LIST, DEBIAN, BLANK_SPACE
|
||||||
from os_platform.linux_distro import LinuxDistro
|
from os_platform.linux_distro import LinuxDistro
|
||||||
@ -58,7 +58,9 @@ class RHELPlatform(LinuxPlatform):
|
|||||||
(dist_name.lower() == CENTOS and version[0:3] ==
|
(dist_name.lower() == CENTOS and version[0:3] ==
|
||||||
SUPPORT_EULEROS_VERSION_LIST and
|
SUPPORT_EULEROS_VERSION_LIST and
|
||||||
os.path.isfile(os.path.join("/etc", "euleros-release"))) or
|
os.path.isfile(os.path.join("/etc", "euleros-release"))) or
|
||||||
dist_name.lower() == OPENEULER):
|
(dist_name.lower() == OPENEULER) or
|
||||||
|
(dist_name.lower() == FUSIONOS)
|
||||||
|
):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@ -168,6 +170,7 @@ class RHELPlatform(LinuxPlatform):
|
|||||||
(dist_name.lower() in SUPPORT_RHEL_SERIES_PLATFORM_LIST and
|
(dist_name.lower() in SUPPORT_RHEL_SERIES_PLATFORM_LIST and
|
||||||
version[0:3] in SUPPORT_RHEL_SERIES_VERSION_LIST)) or
|
version[0:3] in SUPPORT_RHEL_SERIES_VERSION_LIST)) or
|
||||||
(dist_name.lower() == OPENEULER) or
|
(dist_name.lower() == OPENEULER) or
|
||||||
|
(dist_name.lower() == FUSIONOS) or
|
||||||
(dist_name.lower() == DEBIAN and version == "buster/sid")
|
(dist_name.lower() == DEBIAN and version == "buster/sid")
|
||||||
)):
|
)):
|
||||||
return dist_name.lower(), version[0:3]
|
return dist_name.lower(), version[0:3]
|
||||||
|
Reference in New Issue
Block a user