Home | Trees | Index | Help |
|
---|
Package CedarBackup2 :: Module cli :: Class _ActionSet |
|
object
--+
|
_ActionSet
Class representing a set of actions to be executed.
This class does three different things. First, it ensures that the
actions specified on the command-line are sensible. The command-line can
only list either standard actions or extended actions specified in
configuration. Also, certain actions (in NONCOMBINE_ACTIONS
) cannot be combined with
other actions.
Second, it enforces an execution order on the specified actions. Any time actions are combined on the command line (either standard actions or extended actions), we must make sure they get executed in a sensible order.
Third, it ensures that any pre-action or post-action hooks are scheduled and executed appropriately. Hooks are configured by building a dictionary mapping between hook action name and command. Pre-action are executed immediately before their associated action, and post-action hooks are executed immediately after their associated action.Method Summary | |
---|---|
Constructor for the _ActionSet class. | |
Executes all actions and extended actions, in the proper order. | |
Build set of actions to be executed. (Static method) | |
Builds dictionary mapping extension name to extension. (Static method) | |
Build internal dictionaries mapping action name to hook. (Static method) | |
Derive pre- and post-action hooks, if any, associated with named action. (Static method) | |
Validate that the set of specified actions is sensible. (Static method) | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Instance Method Details |
---|
__init__(self,
actions,
extensions,
hooks)
|
executeActions(self, configPath, options, config)Executes all actions and extended actions, in the proper order. The built-in actions will generally use the options and config values. We also pass in the config path so that extensions modules can re-parse configuration if they want to, to add in extra information.
|
Static Method Details |
---|
_buildActionSet(actions, extensionDict, preHookDict, postHookDict)Build set of actions to be executed. The set of actions is built in the proper order, so
_ActionItem .
|
_buildExtensionDict(extensions)Builds dictionary mapping extension name to extension.
|
_buildHookDicts(hooks)Build internal dictionaries mapping action name to hook.
|
_deriveHooks(action, preHookDict, postHookDict)Derive pre- and post-action hooks, if any, associated with named action.
|
_validateActions(actions, extensionNames)Validate that the set of specified actions is sensible. Any specified action must either be a standard action or must be among the extended actions defined in configuration. The actions from withinNONCOMBINE_ACTIONS may not be combined
with other actions.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Sep 4 13:49:34 2006 | http://epydoc.sf.net |