def start(request, appid): """ API to start an application with defined launchtype and identified by the application-id """ print "In started" launchtype = request.GET.get("launchtype", None) if launchtype is not None: launch_views.launchapp(request, appid, launchtype) return HttpResponse("started Application", status=202) else: return HttpResponse("Cannot start application", status=400)
def startapp_locally(request, appid): """ API endpoint that starts an application """ print "In started" launchtype = request.GET.get("launchtype", None) apptag = request.GET.get("apptag", None) if launchtype is not None and apptag is not None: response = launch_views.launchapp(request, appid, launchtype,apptag) return HttpResponse(response,status=HTTP_200_OK) else: return HttpResponse(json.dumps({ 'errormessage': 'Error !!, Cannot start the application locally. The request should both contain launchtype and apptag params'}),status=HTTP_400_BAD_REQUEST)
def startapp_locally(request, appid): """ API endpoint that starts an application """ print "In started" launchtype = request.GET.get("launchtype", None) apptag = request.GET.get("apptag", None) if launchtype is not None and apptag is not None: response = launch_views.launchapp(request, appid, launchtype, apptag) return HttpResponse(response, status=HTTP_200_OK) else: return HttpResponse(json.dumps({ 'errormessage': 'Error !!, Cannot start the application locally. The request should both contain launchtype and apptag params' }), status=HTTP_400_BAD_REQUEST)