c24e9da2f8
Current BEFORE_CREATE/DELETE/UPDATE event is outside of the DB transaction. Unlike the precommit primitive in ML2 mech drivers, they don't work in the same DB transaction of resource, so if we want to operate the DB in mech driver related to security group, there would be more unsync issues if we use BEFORE_XXX event directly. Moving the BEFORE_XXX event inside may also break some current codes, as maybe RPC call included. This patch adds new PRECOMMIT_CREATE/DELETE/UPDATE event type for callback function, and use it in the securitygroup/rules DB transaction. PRECOMMIT_XXX is in the DB transaction and only purpose is to do DB operations in its callback. A CallbackFailure will be triggered when exception comes from the callback of the new event. Change-Id: Icd2849bd84dab6733a572e8c85f242afcefc6c78 Closes-Bug: #1522172 |
||
---|---|---|
.. | ||
__init__.py | ||
events.py | ||
exceptions.py | ||
manager.py | ||
registry.py | ||
resources.py |