Package CedarBackup2 :: Package extend :: Module capacity
[hide private]
[frames] | no frames]

Module capacity

source code

Provides an extension to check remaining media capacity.

Some users have asked for advance warning that their media is beginning to fill up. This is an extension that checks the current capacity of the media in the writer, and prints a warning if the media is more than X% full, or has fewer than X bytes of capacity remaining.


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

Classes [hide private]
  PercentageQuantity
Class representing a percentage quantity.
  CapacityConfig
Class representing capacity configuration.
  LocalConfig
Class representing this extension's configuration document.
Functions [hide private]
 
executeAction(configPath, options, config)
Executes the capacity action.
source code
Variables [hide private]
  logger = logging.getLogger("CedarBackup2.log.extend.capacity")
Function Details [hide private]

executeAction(configPath, options, config)

source code 

Executes the capacity action.

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 - Under many generic error conditions
  • IOError - If there are I/O problems reading or writing files