Revision 1fce5219 lib/cmdlib.py

b/lib/cmdlib.py
153 153
    """
154 154
    raise NotImplementedError
155 155

  
156
  def HooksCallBack(self, phase, hook_results, feedback_fn, lu_result):
157
    """Notify the LU about the results of its hooks.
158

  
159
    This method is called every time a hooks phase is executed, and notifies
160
    the Logical Unit about the hooks' result. The LU can then use it to alter
161
    its result based on the hooks.  By default the method does nothing and the
162
    previous result is passed back unchanged but any LU can define it if it
163
    wants to use the local cluster hook-scripts somehow.
164

  
165
    Args:
166
      phase: the hooks phase that has just been run
167
      hooks_results: the results of the multi-node hooks rpc call
168
      feedback_fn: function to send feedback back to the caller
169
      lu_result: the previous result this LU had, or None in the PRE phase.
170

  
171
    """
172
    return lu_result
173

  
156 174

  
157 175
class NoHooksLU(LogicalUnit):
158 176
  """Simple LU which runs no hooks.

Also available in: Unified diff