This patch adds support for DHCP notifications into the Notifier hook, which so far has been pretty much a placeholder for future work. To this aim its priority has been changed in order to ensure the 'after' hook is executed after the 'after' hook for the policy engine. This will ensure that any 'alien' data returned from the plugin is stripped off before being sent to the notifiers, as well as any attribute that the user is not authorized to access. Since delete operations require to send the original object to the notifier, this patch leverages the "prefetch" feature of the policy hook to avoid loading again the object from the plugin. This is not ideal and will be fixed in another patch where prefetching will be performed in its own hook. The ACTION_MAP constant has been factored out in an appropriate module for constants as it is now used by the NotifierHook class as well. The decision of using a new constant module is rather arbitrary as the module neutron.common.constants could have been used as well. With this patch, the notifier hook only sends events signalling completion of operations (e.g.: network.create.end) as these are the only events processed by the DHCP agent. Support for 'start' events will be added in a subsequent patch. Related-Blueprint: pecan-wsgi-switch Change-Id: I69680952f99c404d4535db48db73fc815977f2ee
723 B
723 B