CedarBackup3.actions.validate — cedar-backup3 3.10.0 documentation

# CedarBackup3.actions.validate

Implements the standard ‘validate’ action. :author: Kenneth J. Pronovici <pronovic@ieee.org>

## Module Contents

CedarBackup3.actions.validate.logger

CedarBackup3.actions.validate.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 (String representing a path on disk) – Path to configuration file on disk

    - options (Options object) – Program command-line options

    - config (Config object) – Program configuration

  Raises:

    ValueError – If some configuration value is invalid