[Netdevicelib-checkins] CVS: netdevicelib/src/netdevicelib/examples getConfig.py,1.1,1.2
Status: Alpha
Brought to you by:
bluecoat93
From: <net...@li...> - 2001-08-26 21:31:50
|
Update of /cvsroot/netdevicelib/netdevicelib/src/netdevicelib/examples In directory usw-pr-cvs1:/tmp/cvs-serv8581/netdevicelib/examples Modified Files: getConfig.py Log Message: * implement TelnetConnection.enable() * implement TelnetConnection.isEnabled() * add virtual methods to Connection base class * Connection destructor now closes the connection * getConfig.py takes the enable password as a parameter Index: getConfig.py =================================================================== RCS file: /cvsroot/netdevicelib/netdevicelib/src/netdevicelib/examples/getConfig.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** getConfig.py 2001/08/26 20:36:51 1.1 --- getConfig.py 2001/08/26 21:31:48 1.2 *************** *** 13,18 **** # Check the command-line arguments ! if len( sys.argv ) < 4: ! print "Usage: version.py device username password" sys.exit(0) --- 13,18 ---- # Check the command-line arguments ! if len( sys.argv ) < 5: ! print "Usage: version.py device username password enable-password" sys.exit(0) *************** *** 25,28 **** --- 25,31 ---- # Login to the device. Assumes username/password login (i.e. TACACS) conn.login( sys.argv[2], sys.argv[3] ) + + # Enable + conn.enable( sys.argv[4] ) # Run the command on the device |