예제 #1
0
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)
예제 #2
0
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)
예제 #3
0
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)
예제 #4
0
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)
예제 #5
0
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)
예제 #6
0
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)