def adom_list(request): faz_ip = request.GET.get('ip', '') faz_adom = request.GET.get('adom', '') test = RunReport.RunRTM(faz_ip, faz_adom) adomList = test.getAdomList() result = json.dumps(adomList) return HttpResponse(result)
def device_list(request): faz_ip = request.GET.get('ip', '') faz_adom = request.GET.get('adom', '') test = RunReport.RunRTM(faz_ip, faz_adom) deviceList = test.getDeviceInfo() result = json.dumps(deviceList) return HttpResponse(result)
def compare(request): faz_ip = request.GET.get('ip', '') faz_adom = request.GET.get('adom', '') test = RunReport.RunRTM(faz_ip, faz_adom) return_info = '' return_info = test.do_compare() return HttpResponse(return_info)
def chart_info(request): faz_ip = request.GET.get('ip', '') faz_adom = request.GET.get('adom', '') test = RunReport.RunRTM(faz_ip, faz_adom) chart_name = request.GET.get('chart', '') #use chart name to run rtm report: result_dict = test.get_chart_info(chart_name) result = json.dumps(result_dict) return HttpResponse(result)
def load_image(request): faz_ip = request.GET.get('ip', '') faz_adom = request.GET.get('adom', '') test = RunReport.RunRTM(faz_ip, faz_adom) build_number = str(request.GET.get('build', '')) model_type = str(request.GET.get('model', '')).upper() return_info = '' return_info = test.load_image(build_number, model_type) result = json.dumps(model_type + ' ' + build_number) return HttpResponse(result + ' ' + return_info)
def rtm_chart(request): faz_ip = request.GET.get('ip', '') faz_adom = request.GET.get('adom', '') test = RunReport.RunRTM(faz_ip, faz_adom) chart_name = request.GET.get('chart', '') state = str(request.GET.get('state', '')) #use chart name to run rtm report: test._RunRTM__devid = request.GET.get('devid', '') result_dict = test.run_single_rtm_report(chart_name, state) result = json.dumps(result_dict) return HttpResponse(result)