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

Class TelnetClientProtocol

source code

twisted.internet.protocol.BaseProtocol --+        
                                         |        
        twisted.internet.protocol.Protocol --+    
                                             |    
                   twisted.conch.telnet.Telnet --+
                                                 |
                                                TelnetClientProtocol

Nested Classes [hide private]

Inherited from twisted.conch.telnet.Telnet (private): _OptionState

Instance Methods [hide private]
 
connectionMade(self)
Called when a connection is made.
source code
 
iac_DO(self, feature) source code
 
iac_DONT(self, feature) source code
 
iac_WILL(self, feature) source code
 
iac_WONT(self, feature) source code
 
_iac_responce(self, action, feature) source code
 
write(self, data)
save the last bit of data that we wrote
source code
 
processChunk(self, chunk) source code
 
processLine(self, line)
I call a method that looks like 'telnet_*' where '*' is filled in by the current mode.
source code
 
dataReceived(self, data) source code
 
applicationDataReceived(self, bytes)
Called with application-level data.
source code
 
startTimeout(self, timeout=1, timeoutfunc=None) source code
 
cancelTimeout(self) source code
 
defaultTimeout(self) source code
 
loginTimeout(self, loginTries=0) source code
 
telnet_Login(self, data)
Called when login prompt is received
source code
 
telnet_Password(self, data)
Called when the password prompt is received
source code
 
telnet_Enable(self, data)
change to enable mode on cisco
source code
 
telnet_FindPrompt(self, data)
Called after login to figure out the command prompt
source code
 
telnet_ClearPromptData(self, data) source code
 
telnet_SendCommand(self, data)
Get a command of the command stack and send it
source code
 
telnet_Command(self, data)
process the data from a sent command if there are no more commands move to final state
source code
 
curCommand(self) source code

Inherited from twisted.conch.telnet.Telnet: __init__, commandReceived, connectionLost, disableLocal, disableRemote, do, do_no_false, do_no_true, do_yes_false, do_yes_true, dont, dont_no_false, dont_no_true, dont_yes_false, dont_yes_true, enableLocal, enableRemote, getOptionState, negotiate, requestNegotiation, telnet_DO, telnet_DONT, telnet_WILL, telnet_WONT, unhandledCommand, unhandledSubnegotiation, will, will_no_false, will_no_true, will_yes_false, will_yes_true, wont, wont_no_false, wont_no_true, wont_yes_false, wont_yes_true

Inherited from twisted.conch.telnet.Telnet (private): _do, _dont, _will, _wont, _write

Inherited from twisted.internet.protocol.BaseProtocol: __providedBy__, makeConnection

Class Variables [hide private]
  mode = 'Login'
  timeout = 0
  timeoutID = None
  p1 = ''
  p2 = ''
  commandPrompt = ''
  command = ''
  enabled = -1
  scCallLater = None
  bytes = ''
  lastwrite = ''
  result = ''
  buffer = ''

Inherited from twisted.conch.telnet.Telnet: doMap, dontMap, willMap, wontMap

Inherited from twisted.internet.protocol.Protocol: __implemented__, __provides__

Inherited from twisted.internet.protocol.BaseProtocol: connected

Instance Variables [hide private]

Inherited from twisted.conch.telnet.Telnet: commandMap, negotiationMap, options, state, transport

Method Details [hide private]

connectionMade(self)

source code 

Called when a connection is made.

This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.
Overrides: twisted.internet.protocol.BaseProtocol.connectionMade
(inherited documentation)

processLine(self, line)

source code 
I call a method that looks like 'telnet_*' where '*' is filled in by the current mode. telnet_* methods should return a string which will become the new mode.

dataReceived(self, data)

source code 
Overrides: twisted.conch.telnet.Telnet.dataReceived

applicationDataReceived(self, bytes)

source code 
Called with application-level data.
Overrides: twisted.conch.telnet.Telnet.applicationDataReceived
(inherited documentation)