Package Products :: Package ZenUtils :: Module CmdBase :: Class CmdBase |
[hide private]
[frames] | no frames]

# Class CmdBase

source code

    object --+
             |
            CmdBase

Known Subclasses:
  - ZenDaemon.ZenDaemon
  - , ZenEvents.xtest.XTest
  - , ZenScriptBase.ZenScriptBase
  - , ConfDaemon.ConfDaemon
  - , ZenEvents.zensendsyslog.ZenSendSyslog
  - , ZenBackupBase.ZenBackupBase
  - , ZenModel.zenbuild.zenbuild

Class used for all Zenoss commands

Instance Methods | [hide private]
__init__(self, noopts=0) | source code
getConfigFileDefaults(self, filename) Parse a config file which has key-value pairs delimited by white space, and update the parser's option defaults with these values. | source code
checkLogpath(self) Validate the logpath is valid | source code
setupLogging(self) Set common logging options | source code
buildParser(self) Create the options parser | source code
buildOptions(self) Basic options setup. | source code
pretty_print_config_comment(self, comment) Quick and dirty pretty printer for comments that happen to be longer than can comfortably be seen on the display. | source code
generate_configs(self, parser, options) Create a configuration file based on the long-form of the option names | source code
generate_xml_table(self, parser, options) Create a Docbook table based on the long-form of the option names | source code
generate_xml_configs(self, parser, options) Create an XML file that can be used to create Docbook files as well as used as the basis for GUI-based daemon option configuration. | source code
parseOptions(self) Uses the optparse parse previously populated and performs common options. | source code

Class Variables | [hide private]
| doesLogging = `True`

Method Details | [hide private]

### __init__(self, noopts=0) (Constructor) | source code
Overrides: object.__init__ (inherited documentation)

### getConfigFileDefaults(self, filename) | source code
Parse a config file which has key-value pairs delimited by white space, and update the parser's option defaults with these values. Parameters: `filename` (string) - name of configuration file

### buildOptions(self) | source code
Basic options setup. Other classes should call this before adding more options

### generate_configs(self, parser, options) | source code
Create a configuration file based on the long-form of the option names Parameters: `parser` - an optparse parser object which contains defaults, help `options` - parsed options list containing actual values

### generate_xml_table(self, parser, options) | source code
Create a Docbook table based on the long-form of the option names Parameters: `parser` - an optparse parser object which contains defaults, help `options` - parsed options list containing actual values