ha cluster

This commit is contained in:
Usman Nasir
2021-03-29 17:23:18 +05:00
parent a94bfcdae9
commit 7be1e80b60
4 changed files with 119 additions and 18 deletions

View File

@@ -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)

View File

@@ -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':