CedarBackup2.config.ActionDependencies

Package CedarBackup2 :: Module config :: Class ActionDependencies |
[hide private]
[frames] | no frames]

# Class ActionDependencies

source code

    object --+
             |
            ActionDependencies

Class representing dependencies associated with an extended action.

Execution ordering for extended actions is done in one of two ways: either by using index values (lower index gets run first) or by having the extended action specify dependencies in terms of other named actions. This class encapsulates the dependency information for an extended action.

The following restrictions exist on data in this class:

- Any action name must be a non-empty string matching `ACTION_NAME_REGEX`

Instance Methods | [hide private]
__init__(self, beforeList=None, afterList=None) Constructor for the `ActionDependencies` class. | source code
__repr__(self) Official string representation for class instance. | source code
__str__(self) Informal string representation for class instance. | source code
__cmp__(self, other) Definition of equals operator for this class. | source code
_setBeforeList(self, value) Property target used to set the "run before" list. | source code
_getBeforeList(self) Property target used to get the "run before" list. | source code
_setAfterList(self, value) Property target used to set the "run after" list. | source code
_getAfterList(self) Property target used to get the "run after" list. | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties | [hide private]
| beforeList List of named actions that this action must be run before.
| afterList List of named actions that this action must be run after.
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, beforeList=None, afterList=None) (Constructor) | source code
Constructor for the `ActionDependencies` class. Parameters: `beforeList` - List of named actions that this action must be run before `afterList` - List of named actions that this action must be run after Raises: `ValueError` - If one of the values is invalid. Overrides: object.__init__

### __repr__(self) (Representation operator) | source code
Official string representation for class instance. Overrides: object.__repr__

### __str__(self) (Informal representation operator) | source code
Informal string representation for class instance. Overrides: object.__str__

### __cmp__(self, other) (Comparison operator) | source code
Definition of equals operator for this class. Parameters: `other` - Other object to compare to. Returns: -1/0/1 depending on whether self is `<`, `=` or `>` other.

### _setBeforeList(self, value) | source code
Property target used to set the "run before" list. Either the value must be `None` or each element must be a string matching ACTION_NAME_REGEX. Raises: `ValueError` - If the value does not match the regular expression.

### _setAfterList(self, value) | source code
Property target used to set the "run after" list. Either the value must be `None` or each element must be a string matching ACTION_NAME_REGEX. Raises: `ValueError` - If the value does not match the regular expression.

Property Details | [hide private]

### beforeList List of named actions that this action must be run before. Get Method: _getBeforeList(self) - Property target used to get the "run before" list. Set Method: _setBeforeList(self, value) - Property target used to set the "run before" list.

### afterList List of named actions that this action must be run after. Get Method: _getAfterList(self) - Property target used to get the "run after" list. Set Method: _setAfterList(self, value) - Property target used to set the "run after" list.