Revision 237a833c lib/cmdlib/base.py
b/lib/cmdlib/base.py | ||
---|---|---|
283 | 283 |
""" |
284 | 284 |
raise NotImplementedError |
285 | 285 |
|
286 |
def PreparePostHookNodes(self, post_hook_node_uuids): |
|
287 |
"""Extend list of nodes to run the post LU hook. |
|
288 |
|
|
289 |
This method allows LUs to change the list of node UUIDs on which the |
|
290 |
post hook should run after the LU has been executed but before the post |
|
291 |
hook is run. |
|
292 |
|
|
293 |
@type post_hook_node_uuids: list |
|
294 |
@param post_hook_node_uuids: The initial list of node UUIDs to run the |
|
295 |
post hook on, as returned by L{BuildHooksNodes}. |
|
296 |
@rtype: list |
|
297 |
@return: list of node UUIDs on which the post hook should run. The default |
|
298 |
implementation returns the passed in C{post_hook_node_uuids}, but |
|
299 |
custom implementations can choose to alter the list. |
|
300 |
|
|
301 |
""" |
|
302 |
# For consistency with HooksCallBack we ignore the "could be a function" |
|
303 |
# warning |
|
304 |
# pylint: disable=R0201 |
|
305 |
return post_hook_node_uuids |
|
306 |
|
|
286 | 307 |
def HooksCallBack(self, phase, hook_results, feedback_fn, lu_result): |
287 | 308 |
"""Notify the LU about the results of its hooks. |
288 | 309 |
|
... | ... | |
401 | 422 |
""" |
402 | 423 |
raise AssertionError("BuildHooksNodes called for NoHooksLU") |
403 | 424 |
|
425 |
def PreparePostHookNodes(self, post_hook_node_uuids): |
|
426 |
"""Empty PreparePostHookNodes for NoHooksLU. |
|
427 |
|
|
428 |
""" |
|
429 |
raise AssertionError("PreparePostHookNodes called for NoHooksLU") |
|
430 |
|
|
404 | 431 |
|
405 | 432 |
class Tasklet: |
406 | 433 |
"""Tasklet base class. |
Also available in: Unified diff