Package ZenRRD :: Module zencommand
[hide private]
[frames] | no frames]

Module zencommand

source code

Classes [hide private]
  TimeoutError
Error for a defered call taking too long to complete
  ProcessRunner
Provide deferred process execution
  MySshClient
Connection to SSH server at the remote device
  SshPool
Cache all the Ssh connections so they can be managed
  SshRunner
Run a single command across a cached SSH connection
  DeviceConfig
  DataPointConfig
  Cmd
Holds the config of every command to be run
  Options
  zencommand
Daemon code to schedule commands and run them.
Functions [hide private]
 
Timeout(deferred, seconds, obj)
Cause an error on a deferred when it is taking too long to complete
source code
 
warnUsernameNotSet(device, sshCmd, sendEvent, suppressed)
Warn that the username is not set for device and the SSH command cannot be executed.
source code
 
updateCommands(config, currentDict, sendEvent)
Go through the Cmd objects in config.commands and update the config on the command with config.
source code
Variables [hide private]
  __doc__ = """ZenComm...
  log = logging.getLogger("zen.zencommand")
  MAX_CONNECTIONS = 256
Function Details [hide private]

updateCommands(config, currentDict, sendEvent)

source code 

Go through the Cmd objects in config.commands and update the config on the
command with config. If currentDict has the command on it then use that
one, otherwise use the command from config. If the device does not have a
username set, then don't yield commands that use SSH.

Parameters:
    
    config - one of the configurations that was returned by calling
    getDataSourceCommands on zenhub.
    
    currentDict - a dictionary that maps (device, command) to Cmd object
    for the commands currently on zencommand's schedule.


Variables Details [hide private]

__doc__

Value:
"""ZenCommand

Run Command plugins periodically.

"""