| Home | Trees | Indices | Help |
|
|---|
|
|
This is the base Module class that all other modules must extend.
This provides the basic functionality that is expected from a module, which includes the name of the module, handled attributes and diff operation handler functions, change operations and event hooks.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
This function checks a difference in the policy and it's state at the location identified by `path` and `operation`. The function will attempt to find a handler for this change among the registered diff handlers in the PolicyTool. In case the handler is found, it is called and a ChangeSet is expected as the return value. If the ChangeSet is returned, an additional Change operation is appended to the list of changes for updating the internal state of that policy. Since that Change is appended to the end of the list, it is also executed last and only in the case the previous changes have succeeded.
|
Null handler for setting a new default value in the policy.
|
Default handler for setting a new attribute in the policy, which calls the cs_set_attribute and returns it's return value. This is a safe default, since usually there is no difference whether an attribute was added or simply modified.
|
Null handler for modifying a value in the policy.
|
Null handler for removing an attribute from the policy.
|
This function accepts a Change object to be implemented and finds the respective function in the change_operations dict and calls it. In case the handler function is not found, STATE_NOT_HANDLED is returned.
|
This function implements the edit_configfile Change operation. It extracts the attributes from the Change element and calls the append_lines_to_file function.
|
This function inserts lines to an existing configuration file. The new lines are surrounded with identifier tags which are detected in successive runs and so any previous countent with the same identifier tags is replaced.
|
This function executes a system command. If the debug mode has been enabled, then the command is echoed back to the shell instead of executing it.
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Jun 10 15:53:32 2010 | http://epydoc.sourceforge.net |