Package CedarBackup2 :: Package actions :: Module validate
[show private | hide private]
[frames | no frames]

Module CedarBackup2.actions.validate

Implements the standard 'validate' action.

Author: Kenneth J. Pronovici <pronovic@ieee.org>

Function Summary
  executeValidate(configPath, options, config)
Executes the validate action.

Variable Summary
Logger logger = <logging.Logger instance at 0x4032a74c>

Function Details

executeValidate(configPath, options, config)

Executes the validate action.

This action validates each of the individual sections in the config file. This is a "runtime" validation. The config file itself is already valid in a structural sense, so what we check here that is that we can actually use the configuration without any problems.

There's a separate validation function for each of the configuration sections. Each validation function returns a true/false indication for whether configuration was valid, and then logs any configuration problems it finds. This way, one pass over configuration indicates most or all of the obvious problems, rather than finding just one problem at a time.

Any reported problems will be logged at the ERROR level normally, or at the INFO level if the quiet flag is enabled.
Parameters:
configPath - Path to configuration file on disk.
           (type=String representing a path on disk.)
options - Program command-line options.
           (type=Options object.)
config - Program configuration.
           (type=Config object.)
Raises:
ValueError - If some configuration value is invalid.

Variable Details

logger

Type:
Logger
Value:
<logging.Logger instance at 0x4032a74c>                                

Generated by Epydoc 2.1 on Thu Mar 29 20:58:27 2007 http://epydoc.sf.net