Add the Hook Point API

Hook points allow installing a package that provide a decorator for some
function / method. The intent is to use it for organization specific
code.

The sample config contains an example.

See: https://review.openstack.org/171689/
Implements: blueprint hook-point-api
Change-Id: If98d9450cfd6b1a2a3cb23d8bc51940c1b6ee37a
This commit is contained in:
Eric Larson
2015-03-12 15:30:44 -05:00
parent edd4125b47
commit d08a661812
5 changed files with 287 additions and 1 deletions

View File

@@ -373,3 +373,24 @@ debug = False
# Path for Oslo Concurrency to store lock files, defaults to the value
# of the state_path setting.
#lock_path = $state_path
########################
## Hook Points
########################
# Hook Points are enabled when added to the config and there has been
# a package that provides the corresponding named designate.hook_point
# entry point.
# [hook_point:name_of_hook_point]
# some_param_for_hook = 42
# Hooks can be disabled in the config
# enabled = False
# Hook can also be applied to the import path when the hook has not
# been given an explicit name. The name is created from the hook
# target function / method:
#
# name = '%s.%s' % (func.__module__, func.__name__)
# [hook_point:designate.api.v2.controllers.zones.get_one]