Package Products :: Package DataCollector :: Module SshClient :: Class CommandChannel |
[hide private]
[frames] | no frames]

# Class CommandChannel

source code

           twisted.python.log.Logger --+
                                       |
    twisted.conch.ssh.channel.SSHChannel --+
                                           |
                                          CommandChannel

The class that actually interfaces between Zenoss and the device.

Instance Methods | [hide private]
__init__(self, command, conn=None) Initializer | source code
targetIp(self) | source code
openFailed(self, reason) Called when the open fails. | source code
extReceived(self, dataType, data) Called when we receive extended data (usually standard error) | source code
Twisted channel |
channelOpen(self, unused) Initialize the channel and send our command to the device. | source code
request_exit_status(self, data) Gathers the exit code from the device | source code
dataReceived(self, data) Response stream from the device. | source code
closed(self) Cleanup for the channel, as both ends have closed the channel. | source code
Inherited from `twisted.conch.ssh.channel.SSHChannel`: `__str__`, `addWindowBytes`, `closeReceived`, `eofReceived`, `getHost`, `getPeer`, `logPrefix`, `loseConnection`, `requestReceived`, `startWriting`, `stopWriting`, `write`, `writeExtended`, `writeSequence`

Class Variables | [hide private]
`str` | name = `'session'` the name of the channel.
`SSHConnection` | conn = `None` the connection this channel is multiplexed through.

Instance Variables | [hide private]
Inherited from `twisted.conch.ssh.channel.SSHChannel`: `avatar`, `data`, `localClosed`, `localMaxPacket`, `localWindowLeft`, `localWindowSize`, `remoteClosed`, `remoteMaxPacket`, `remoteWindowLeft`

Method Details | [hide private]

### __init__(self, command, conn=None) (Constructor) | source code
Initializer Parameters: `command` (string) - command to run `conn` (Twisted connection object) - connection to create the channel on Overrides: twisted.conch.ssh.channel.SSHChannel.__init__

### targetIp(self) | source code
Decorators: `@property`

### openFailed(self, reason) | source code
Called when the open fails. Overrides: twisted.conch.ssh.channel.SSHChannel.openFailed

### extReceived(self, dataType, data) | source code
Called when we receive extended data (usually standard error) Parameters: `dataType` (integer) - data type code Overrides: twisted.conch.ssh.channel.SSHChannel.extReceived

### channelOpen(self, unused) | source code
Initialize the channel and send our command to the device. Parameters: `unused` (string) - unused (unused) Returns: Twisted channel Twisted channel Overrides: twisted.conch.ssh.channel.SSHChannel.channelOpen

### request_exit_status(self, data) | source code
Gathers the exit code from the device Parameters: `data` (packet) - returned value from device

### dataReceived(self, data) | source code
Response stream from the device. Can be called multiple times. Parameters: `data` (string) - returned value from device Overrides: twisted.conch.ssh.channel.SSHChannel.dataReceived

### closed(self) | source code
Cleanup for the channel, as both ends have closed the channel. Overrides: twisted.conch.ssh.channel.SSHChannel.closed