Package DataCollector :: Module TelnetClient
[show private | hide private]
[frames | no frames]

Module DataCollector.TelnetClient

TelnetSession

TelnetSession is used by TelnetSession to issue commands to a machine
and return their output over the telnet protocol.

Device Tree Parameters are:

zTelnetLoginTries - number of times to try login default: 1
zTelnetLoginTimeout - timeout for expect statements during login default: 2
zTelnetPromptTimeout - pause used during prompt discovery default: 0.2
zTelnetCommandTimeout - default timeout when executing a command default: 5
zTelnetLoginRegex - regex to match the login prompt default: 'ogin:.$'
zTelnetPasswordRegex - regext to match the password prompt default: 'assword:.$'

Other Parameters that are used by both TelnetSession and SshTransport:
zCommandPathList - list of path to check for a command
zCommandExistanceCheck - shell command issued to look for executible
                        must echo succ if executible is found
                        default: test -f executible

$Id: TelnetClient.py,v 1.15 2004/04/05 02:05:30 edahl Exp $

Classes
TelnetClient  
TelnetClientProtocol  

Function Summary
  buildOptions(parser, usage)
  check(hostname)
check to see if a device supports telnet
  main()

Variable Summary
str __version__ = '1.15'
int defaultCommandTimeout = 20                                                                    
bool defaultEnable = False
str defaultLoginRegex = 'ogin:.$'
str defaultPasswordRegex = 'assword:'
int defaultPromptTimeout = 10                                                                    
bool defaultTermLength = False
Logger log = <logging.Logger instance at 0x39ad788>
tuple responceMap = ('WILL', 'WONT', 'DO', 'DONT')

Function Details

check(hostname)

check to see if a device supports telnet

Variable Details

__version__

Type:
str
Value:
'1.15'                                                                 

defaultCommandTimeout

Type:
int
Value:
20                                                                    

defaultEnable

Type:
bool
Value:
False                                                                  

defaultLoginRegex

Type:
str
Value:
'ogin:.$'                                                              

defaultPasswordRegex

Type:
str
Value:
'assword:'                                                             

defaultPromptTimeout

Type:
int
Value:
10                                                                    

defaultTermLength

Type:
bool
Value:
False                                                                  

log

Type:
Logger
Value:
<logging.Logger instance at 0x39ad788>                                 

responceMap

Type:
tuple
Value:
('WILL', 'WONT', 'DO', 'DONT')                                         

Generated by Epydoc 2.1 on Thu Aug 16 09:55:16 2007 http://epydoc.sf.net