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))
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))
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))
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))