예제 #1
0
def query_flow(dpid):
    #dpid = request.args.get("dpid")
    flow_table = Rest.get_flow_table(dpid)

    #print flow_table

    return render_template("policy.html", flow_table=flow_table)
예제 #2
0
파일: xinui.py 프로젝트: John-Lin/XinUI
def query_flow(dpid):
    # dpid = request.args.get("dpid")
    flow_table = Rest.get_flow_table(dpid)

    # print flow_table

    return render_template("policy.html", flow_table=flow_table)
예제 #3
0
파일: xinui.py 프로젝트: John-Lin/XinUI
def dpid_policy(dpid):
    sw_dpid_list = Rest.get_switch_list()

    if sw_dpid_list is False or int(dpid) not in sw_dpid_list:
        abort(404)

    flow_table = None
    flow_table = Rest.get_flow_table(dpid)
    global global_flow_table
    global_flow_table = flow_table
    port = Rest.get_switch_port(dpid)

    return render_template("policy.html", sw_dpid_list=sw_dpid_list, dpid=dpid, port=port, flow_table=flow_table)
예제 #4
0
def dpid_policy(dpid):
    sw_dpid_list = Rest.get_switch_list()

    if sw_dpid_list is False or int(dpid) not in sw_dpid_list:
        abort(404)

    flow_table = None
    flow_table = Rest.get_flow_table(dpid)
    global global_flow_table
    global_flow_table = flow_table
    port = Rest.get_switch_port(dpid)

    return render_template("policy.html",
                           sw_dpid_list=sw_dpid_list,
                           dpid=dpid,
                           port=port,
                           flow_table=flow_table)
예제 #5
0
파일: main.py 프로젝트: O4siang/SDN_GUI
def main():
    print "test"
    sw_desc = Rest.get_switch_desc()
    print sw_desc
    sw_dpid_list = Rest.get_switch_list()
    print sw_dpid_list
    
    #if sw_desc is False  or int(dpid) not in sw_dpid_list:     
     #   sw_desc = "not connected"
    for dpid in sw_dpid_list:
        print dpid
        dpid_t = dpid
        flow_table = None
        flow_table = Rest.get_flow_table(dpid)
        global global_flow_table
        global_flow_table = flow_table
        port = Rest.get_switch_port(dpid)
        print "test"
    return render_template("index.html",sw_desc=sw_desc,dpid=dpid_t, port=port, flow_table=flow_table)