兼容suse12.5使用centos安装包进行安装
This commit is contained in:
@ -84,7 +84,7 @@ SUSE11 = "11"
|
||||
SUSE12 = "12"
|
||||
SUPPORT_SUSE_VERSION_LIST = [SUSE11, SUSE12]
|
||||
SUPPORT_SUSE11X_VERSION_LIST = ["1", "2", "3", "4"]
|
||||
SUPPORT_RHEL12X_VERSION_LIST = ["0", "1", "2", "3"]
|
||||
SUPPORT_SUSE12X_VERSION_LIST = ["0", "1", "2", "3", "4", "5"]
|
||||
BIT_VERSION = "64bit"
|
||||
|
||||
# ---------------command path--------------------
|
||||
@ -99,6 +99,7 @@ PAK_OPENEULER = "openEuler"
|
||||
PAK_REDHAT = "RedHat"
|
||||
PAK_ASIANUX = "Asianux"
|
||||
PAK_UBUNTU = "Ubuntu"
|
||||
PAK_SUSE = "SUSE"
|
||||
|
||||
#######################################################
|
||||
_supported_dists = (
|
||||
@ -1502,7 +1503,12 @@ class LinuxPlatform(GenericPlatform):
|
||||
elif distname == SUSE and version.split('.')[0] in ("11", "12"):
|
||||
fileName = os.path.join(dirName, "./../../../",
|
||||
"%s-%s-%s-%s.%s" % (
|
||||
prefixStr, packageVersion, "SUSE11",
|
||||
prefixStr, packageVersion, PAK_CENTOS,
|
||||
BIT_VERSION, postfixStr))
|
||||
if not os.path.isfile(fileName):
|
||||
fileName = os.path.join(dirName, "./../../../",
|
||||
"%s-%s-%s-%s.%s" % (
|
||||
prefixStr, packageVersion, PAK_SUSE,
|
||||
BIT_VERSION, postfixStr))
|
||||
elif distname in EULEROS and (idnum in ["SP2", "SP3", "SP5"]):
|
||||
fileName = os.path.join(dirName, "./../../../",
|
||||
@ -1722,7 +1728,7 @@ class SLESPlatform(LinuxPlatform):
|
||||
((version == SUSE11 and
|
||||
patchlevel in SUPPORT_SUSE11X_VERSION_LIST) or
|
||||
(version == SUSE12 and
|
||||
patchlevel in SUPPORT_RHEL12X_VERSION_LIST))):
|
||||
patchlevel in SUPPORT_SUSE12X_VERSION_LIST))):
|
||||
platformVersion = "%s.%s" % (version, patchlevel)
|
||||
return distName.lower(), platformVersion
|
||||
else:
|
||||
|
@ -45,7 +45,7 @@ from base_utils.os.net_util import NetUtil
|
||||
from domain_utils.domain_common.cluster_constants import ClusterConstants
|
||||
from os_platform.linux_distro import LinuxDistro
|
||||
from os_platform.common import SUPPORT_RHEL6X_VERSION_LIST, \
|
||||
SUPPORT_RHEL7X_VERSION_LIST, SUPPORT_RHEL12X_VERSION_LIST, \
|
||||
SUPPORT_RHEL7X_VERSION_LIST, SUPPORT_SUSE12X_VERSION_LIST, \
|
||||
SUPPORT_SUSE11X_VERSION_LIST, SUPPORT_RHEL8X_VERSION_LIST
|
||||
|
||||
sys.path.insert(0, localDirPath + "/../../lib")
|
||||
@ -1764,7 +1764,7 @@ def CheckPlatformInfo():
|
||||
platform_str = "%s_%s_SP%s_%s" % (data.distname, data.version,
|
||||
data.patchlevel, data.bits)
|
||||
elif data.version == "12" and \
|
||||
data.patchlevel in SUPPORT_RHEL12X_VERSION_LIST:
|
||||
data.patchlevel in SUPPORT_SUSE12X_VERSION_LIST:
|
||||
mixed_type = "%s%s" % (data.distname, data.version)
|
||||
platform_str = "%s_%s_SP%s_%s" % (data.distname, data.version,
|
||||
data.patchlevel, data.bits)
|
||||
|
@ -48,7 +48,7 @@ SUSE11 = "11"
|
||||
SUSE12 = "12"
|
||||
SUPPORT_SUSE_VERSION_LIST = [SUSE11, SUSE12]
|
||||
SUPPORT_SUSE11X_VERSION_LIST = ["1", "2", "3", "4"]
|
||||
SUPPORT_RHEL12X_VERSION_LIST = ["0", "1", "2", "3"]
|
||||
SUPPORT_SUSE12X_VERSION_LIST = ["0", "1", "2", "3", "4", "5"]
|
||||
BIT_VERSION = "64bit"
|
||||
|
||||
# ---------------command path--------------------
|
||||
@ -64,6 +64,7 @@ PAK_REDHAT = "RedHat"
|
||||
PAK_ASIANUX = "Asianux"
|
||||
PAK_UBUNTU = "Ubuntu"
|
||||
PAK_KYLIN = "Kylin"
|
||||
PAK_SUSE = "SUSE"
|
||||
|
||||
#######################################################
|
||||
_supported_dists = (
|
||||
|
@ -25,7 +25,7 @@ from gspylib.common.ErrorCode import ErrorCode
|
||||
from os_platform.common import REDHAT, PAK_REDHAT, BIT_VERSION, \
|
||||
CENTOS, PAK_EULER, PAK_CENTOS, ASIANUX, SUSE, PAK_ASIANUX, \
|
||||
EULEROS, OPENEULER, KYLIN, PAK_OPENEULER, SUPPORT_WHOLE_PLATFORM_LIST,\
|
||||
BLANK_SPACE, PAK_UBUNTU, DEBIAN, PAK_KYLIN
|
||||
BLANK_SPACE, PAK_UBUNTU, DEBIAN, PAK_KYLIN, PAK_SUSE
|
||||
from os_platform.linux_distro import LinuxDistro
|
||||
|
||||
|
||||
@ -191,7 +191,12 @@ class LinuxPlatform(object):
|
||||
elif distname == SUSE and version.split('.')[0] in ("11", "12"):
|
||||
file_name = os.path.join(dir_name, "./../../",
|
||||
"%s-%s-%s-%s.%s" % (
|
||||
prefix_str, packageVersion, "SUSE11",
|
||||
prefix_str, packageVersion, PAK_CENTOS,
|
||||
BIT_VERSION, postfix_str))
|
||||
if not os.path.isfile(file_name):
|
||||
file_name = os.path.join(dir_name, "./../../",
|
||||
"%s-%s-%s-%s.%s" % (
|
||||
prefix_str, packageVersion, PAK_SUSE,
|
||||
BIT_VERSION, postfix_str))
|
||||
elif distname in EULEROS and (idnum in ["SP2", "SP3", "SP5"]):
|
||||
new_prefix_str = "%s-%s" % (prefix_str, packageVersion)
|
||||
|
@ -24,7 +24,7 @@ import subprocess
|
||||
|
||||
import platform
|
||||
from gspylib.common.ErrorCode import ErrorCode
|
||||
from os_platform.common import SUPPORT_RHEL12X_VERSION_LIST, \
|
||||
from os_platform.common import SUPPORT_SUSE12X_VERSION_LIST, \
|
||||
SUPPORT_SUSE11X_VERSION_LIST, SUSE12, SUSE11, BIT_VERSION, \
|
||||
SUPPORT_SUSE_VERSION_LIST, SUSE, BLANK_SPACE
|
||||
from os_platform.linux_distro import LinuxDistro
|
||||
@ -150,7 +150,7 @@ class SLESPlatform(LinuxPlatform):
|
||||
((version == SUSE11 and
|
||||
patchlevel in SUPPORT_SUSE11X_VERSION_LIST) or
|
||||
(version == SUSE12 and
|
||||
patchlevel in SUPPORT_RHEL12X_VERSION_LIST))):
|
||||
patchlevel in SUPPORT_SUSE12X_VERSION_LIST))):
|
||||
platform_version = "%s.%s" % (version, patchlevel)
|
||||
return dist_name.lower(), platform_version
|
||||
else:
|
||||
|
Reference in New Issue
Block a user