def __init__(self, serverId, port, host, url, lab): self.host = host self.port = port self.url = url self.lab = lab self.serverId = serverId self.cs = CheckService()
path = request.values.get("path") data=fileService.readFile(host,path) return jsonify(data=data, error=False, msg="") @app.route("/updateConfig",methods=['GET', 'POST']) def updateConfig(): host = request.values.get("host") data = request.values.get("data") path = request.values.get("path") data=fileService.overwriteFile(host,path,data) return jsonify(data=data, error=False, msg="") if __name__ == '__main__': dao = BichonDao() cpu = CpuService() mem = MemService() disk = FileSystemService() process = ProcessService() check = CheckService() net = NetService() iptable=IptableService() execService=ExecService() fileService=FileService() taskHelper = TaskHelper() app.run(debug=True)
def __init__(self, serverId,port, host): self.host = host self.port = port self.serverId=serverId self.c = CheckService()