MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / get_os_version

Method get_os_version

class/projectModel/javaModel.py:83–96  ·  view source on GitHub ↗

@name 获取操作系统版本的安装命令 @author lkq<2021-08-25> @param get @return string

(self, get)

Source from the content-addressed store, hash-verified

81 return type(get.domains)
82
83 def get_os_version(self, get):
84 """
85 @name 获取操作系统版本的安装命令
86 @author lkq<2021-08-25>
87 @param get<dict_obj>
88 @return string
89 """
90 # 获取Centos
91 if os.path.exists('/usr/bin/yum') and os.path.exists('/etc/yum.conf'):
92 return 'Centos'
93 # 获取Ubuntu
94 if os.path.exists('/usr/bin/apt-get') and os.path.exists('/usr/bin/dpkg'):
95 return 'Ubuntu'
96 return 'Unknown'
97
98 def get_jdk_version(self, get):
99 ''&#x27;

Callers 15

install_jdkMethod · 0.95
remove_jdkMethod · 0.95
install_tomcatMethod · 0.95
install_tomcat_newMethod · 0.95
get_ssh_intrusionMethod · 0.80
index_ssh_infoMethod · 0.80
error_500Function · 0.80
err_collectionMethod · 0.80
get_login_userMethod · 0.80
SetSshPortMethod · 0.80
request_postMethod · 0.80
GetSystemVersionMethod · 0.80

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected