#!/usr/bin/python import cgi, cgitb, sys, re, pexpect cgitb.enable () import pycisco print "Content-Type: text/html" print print "
Select a switch to get started!
" print "" def ShowSwitchStatus (switchName): print "Number | " print "Description | " print "Connected | " print "VLAN | " print "Duplex | " print "Speed | " print "Media | " print "Portfast | " print "Errors | " print "
---|---|---|---|---|---|---|---|---|
" + port["name"] + " | " print "" + (port["description"] or "(not set)") + " | " print "" + port["connectstate"] + " | " print "" + port["vlan"] + " | " print "" + port["duplex"] + " | " print "" + port["speed"] + " | " print "" + port["media"] + " | " print "" + port["portfast"] + " | " print "" + port["errors"] + " | " print "