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

# Class CmdBase

source code

    object --+
             |
            CmdBase

Class used for all Zenoss commands

Instance Methods | [hide private]
__init__(self, noopts=0) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | 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
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

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

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, noopts=0) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature 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