Example #1
0
	def createBuild():
		response = {}
		if KrakenConfiguration.taskEngine.control.inspect().active() is None:
			#Celery worker is Down. It should avoid to continue and warn the client.
			response = {"message": "Celery worker is down. Start the KrakenRDI worker using '-w' option"}
		else:
			if validateApiRequest(request, abort, schema="createBuild"):
				structure = setDefaultsBuild(request.json)
				response = KrakenServer.buildService.build(structure)
		return jsonify(response)
Example #2
0
 def filterTools():
     response = {}
     if validateApiRequest(request, abort, schema="filterToolSchema"):
         structure = setDefaultsTool(request.json)
         response = KrakenServer.toolService.filter(structure)
     return jsonify(response)
Example #3
0
 def deleteContainer():
     response = {}
     if validateApiRequest(request, abort, schema="deleteContainer"):
         structure = setDefaultsContainer(request.json)
         response = KrakenServer.containerService.delete(structure)
     return jsonify(response)
Example #4
0
	def detailBuild():
		response = {}
		if validateApiRequest(request, abort, schema="detailBuild"):
			structure = setDefaultsBuild(request.json)
			response = KrakenServer.buildService.detail(structure)
		return jsonify(response)