mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-15 09:46:11 +01:00
ha cluster
This commit is contained in:
@@ -2673,3 +2673,19 @@ class CloudManager:
|
||||
final_dic = {'status': 0, 'fetchStatus': 0, 'error_message': str(msg)}
|
||||
final_json = json.dumps(final_dic)
|
||||
return HttpResponse(final_json)
|
||||
|
||||
def DetachCluster(self):
|
||||
try:
|
||||
|
||||
type = self.data['type']
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/ClusterManager.py --function %s --type %s" % ('DetachCluster', type)
|
||||
ProcessUtilities.popenExecutioner(execPath)
|
||||
|
||||
final_json = json.dumps({'status': 1})
|
||||
return HttpResponse(final_json)
|
||||
|
||||
except BaseException as msg:
|
||||
final_dic = {'status': 0, 'fetchStatus': 0, 'error_message': str(msg)}
|
||||
final_json = json.dumps(final_dic)
|
||||
return HttpResponse(final_json)
|
||||
|
||||
@@ -37,6 +37,8 @@ def router(request):
|
||||
return cm.verifyLogin(request)[1]
|
||||
elif controller == 'RunServerLevelEmailChecks':
|
||||
return cm.RunServerLevelEmailChecks()
|
||||
elif controller == 'DetachCluster':
|
||||
return cm.DetachCluster()
|
||||
elif controller == 'ReadReport':
|
||||
return cm.ReadReport()
|
||||
elif controller == 'ResetEmailConfigurations':
|
||||
|
||||
Reference in New Issue
Block a user