model hooks cannot be overridden by subclasses

Bug #1210387 reported by Mark McClain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Mark McClain

Bug Description

The model hooks are registered as unbound methods which means that any subclass of a mixin will cause an unintended registration of the parent class hooks.

Tags: neutron-core
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/41027

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

Thanks for filing this bug.
I had it on my todo list for a while.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/41027
Committed: http://github.com/openstack/neutron/commit/3f3346e598cc6418a5dae18776810f62d6f5375a
Submitter: Jenkins
Branch: master

commit 3f3346e598cc6418a5dae18776810f62d6f5375a
Author: Mark McClain <email address hidden>
Date: Fri Aug 9 00:53:33 2013 -0400

    allow subclasses to modify the parents model hooks

    fixes bug 1210387

    This change modifies the model hook processing to call the method on the
    instance if a hook is registered as a string. If the hook is a
    callable, then callable is called with the hook arguments.

    Change-Id: Id14ae89f3f12a500920d248226e0ecba8e35e74c

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.