In the spirit of #1111254: Document the Hostmaster API, I'd love to see some more documentation of hooks in Provision.

Now, Drush hooks are pretty interesting (http://drush.ws/docs/drush.api.php), with built-in pre-, post-, -validate and -rollback hooks. So, I'm not really sure whether these need to be documented any further...

Since these never seem to be passed with parameters, I guess they depend on contexts (eek!). So, this then brings us to the infamous d() function. Despite the reassurances ("The d accessor is not to be feared!" ref.: http://community.aegirproject.org/node/322), I'm still pretty diffident to jump into this particular deep end.

Comments

helmo’s picture

There is provision.api.php in the code.

Today was not the first time that I found myself wondering what the best function name was for a provision hook I need.

After digging around I therefore added a bunch of comment lines like "Implementation of drush_hook_COMMAND_validate()."
Hope it helps, it should not be difficult to do this for more functions.

helmo’s picture

Status: Active » Needs review

Setting the status appropriately.

Still applies to 6.x-1.x, 6.x-2.x and 7.x-2.x

Anonymous’s picture

Status: Needs review » Fixed

Happy with this for now, it makes sense to confirm to how drush documents its own hooks. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 3527dd3 on dev-drupal-8, 6.x-2.x, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x by mig5:
    Issue #1205956 by helmo - Document the Provision API
    
    
  • Commit 24fdd29 on 6.x-1.x, dev-drupal-8, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x by mig5:
    Issue #1205956 by helmo - Document the Provision API