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

Method tomcat_vhost_delete

class/projectModel/javaModel.py:1481–1497  ·  view source on GitHub ↗

@name 删除内置tomcat虚拟主机 @author lkq @param version: string @param domain: string @return bool

(self, version, domains, get)

Source from the content-addressed store, hash-verified

1479 return True
1480
1481 def tomcat_vhost_delete(self, version, domains, get):
1482 '''
1483 @name 删除内置tomcat虚拟主机
1484 @author lkq
1485 @param version: string
1486 @param domain: string
1487 @return bool
1488 '''
1489 if not self.Initialization(version): return public.returnMsg(False, "配置文件错误请检查配置文件")
1490 context_path = get.get("project_name", "")
1491 domain = domains[0].split(":")[0]
1492 if self.del_vhost(domain, context_path):
1493 get.version = version
1494 get.type = 'reload'
1495 self.start_tomcat(get)
1496 return public.returnMsg(True, '删除成功')
1497 return public.returnMsg(False, '不存在')
1498
1499 def set_hosts(self, domain):
1500 '''

Callers 1

remove_projectMethod · 0.95

Calls 6

InitializationMethod · 0.95
del_vhostMethod · 0.95
start_tomcatMethod · 0.95
returnMsgMethod · 0.80
getMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected