bug fix: cm

This commit is contained in:
Usman Nasir
2021-04-01 11:47:47 +05:00
parent d2c141a40f
commit a5b9a68955
3 changed files with 246 additions and 63 deletions

View File

@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
from .cloudManager import CloudManager
import json
from loginSystem.models import Administrator
@@ -33,12 +32,30 @@ def router(request):
else:
return cm.verifyLogin(request)[1]
## Debug Log
import os
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
from plogical.processUtilities import ProcessUtilities
if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile('Current controller: %s' % (controller))
##
if controller == 'verifyLogin':
return cm.verifyLogin(request)[1]
elif controller == 'RunServerLevelEmailChecks':
return cm.RunServerLevelEmailChecks()
elif controller == 'DetachCluster':
return cm.DetachCluster()
elif controller == 'FetchMasterBootStrapStatus':
return cm.FetchMasterBootStrapStatus()
elif controller == 'FetchChildBootStrapStatus':
return cm.FetchChildBootStrapStatus()
elif controller == 'BootMaster':
return cm.BootMaster()
elif controller == 'BootChild':
return cm.BootChild()
elif controller == 'SetupCluster':
return cm.SetupCluster()
elif controller == 'ReadReport':