示例#1
0
def pickPorts():
    ip = request.args.get('ip')
    return render_template(
        'base.html',
        pagetitle="choose ports",
        leadtext="Choose the Ports to Configure on Switch %s (%s)" %
        (switchconfig.get_switchname(
            request.args.get('ip')), request.args.get('ip')),
        content=getPickPortsContent(ip))
示例#2
0
def postChange():
    data = {}
    data['vlan_id'] = request.form['rtn_vlan']
    data['intf_id'] = request.form['rtn_ports'].split(",")
    data['intf_desc'] = request.form['desc']
    data['switch_ip'] = request.form['rtn_switchip']

    result = switchconfig.conf_intfs(data)
    return render_template(
        'base.html',
        pagetitle="Config Confirmation",
        leadtext="Congratulations! Your Interfaces Have Been Configured!",
        content=
        "<p>The following configuration was applied to switch %s (%s) based on your reqest</p><br><pre class='text-left'>%s</pre>"
        % (switchconfig.get_switchname(request.form['rtn_switchip']),
           request.form['rtn_switchip'], result))
示例#3
0
def postChange():
    data = {}
    data['vlan_id'] = request.form['rtn_vlan']
    data['intf_id'] = request.form['rtn_ports'].split(",")
    data['intf_desc'] = request.form['desc']
    data['switch_ip'] = request.form['rtn_switchip']

    result = switchconfig.conf_intfs(data)
    return render_template('base.html',
                           pagetitle="Config Confirmation",
                           leadtext="Congratulations! Your Interfaces Have Been Configured!",
                           content="<p>The following configuration was applied to switch %s (%s) based on your reqest</p><br><pre class='text-left'>%s</pre>" % (switchconfig.get_switchname(request.form['rtn_switchip']), request.form['rtn_switchip'], result))
示例#4
0
def pickPorts():
    ip = request.args.get('ip')
    return render_template('base.html',
                           pagetitle="choose ports",
                           leadtext="Choose the Ports to Configure on Switch %s (%s)" % (switchconfig.get_switchname(request.args.get('ip')), request.args.get('ip')),
                           content=getPickPortsContent(ip))