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

# Class ConfigurationProcessor

source code

    object --+
             |
            ConfigurationProcessor

Instance Methods | [hide private]
__init__(self, config, scheduledCmds, sendEvent) config - one of the configurations that was returned by calling getDataSourceCommands on zenhub. | source code
_sendUsernameEvent(self, severity) send an event (or clear it) for username not set | source code
_warnUsernameNotSet(self, command) Warn that the username is not set for device and the SSH command cannot be executed. | source code
updateCommands(self) Go through the Cmd objects in config.commands and update the config on the command with config. | source code

Method Details | [hide private]

### __init__(self, config, scheduledCmds, sendEvent) (Constructor) | source code
    config - one of the configurations that was returned by calling
            getDataSourceCommands on zenhub.
    scheduledCmds - a dictionary that maps (device, command) to Cmd object
            for the commands currently on zencommand's schedule.
    sendEvent - a function that sends events to zenhub using twisted
            perspective broker.
Overrides: object.__init__

### updateCommands(self) | 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.