Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The hook.py file should extend the Hook class defined in resource_management/libraries/script/hook.py.  The naming convention is to name the hook class after the hook folder such as AfterInstallHook if the class is in the after-INSTALL folder.  The hook.py file must define the hook(self, env) function.  Here is an example hook:

from resource_management.libraries.script.hook import Hook
 
class AfterInstallHook(Hook):
 
  def hook(self, env):
    import params
    env.set_params(params)
    # Call any functions to set up the stack after install
 
if __name__ == "__main__":
  AfterInstallHook().execute()