Plugin interface should perform argument count check

Bug #805905 reported by Salvatore Orlando
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Salvatore Orlando

Bug Description

Quantum verifies that the plugin class provides an implementation for every abstract method specified in QuantumPluginBase; however it does not ensure that the argument count is correct; this might lead to errors when plugin methods are invoked.

The attached branch contains a modified version of the __subclasshook__ method which verifies that the implementation provided for each abstract method has the correct number of arguments.

Related branches

Changed in quantum:
status: New → Opinion
assignee: nobody → Salvatore Orlando (salvatore-orlando)
Revision history for this message
Somik Behera (somikbehera) wrote :

Sounds valid and changes look good. I would run unit tests and propose for merge and the netstack-core could approve.

Changed in quantum:
status: Opinion → Confirmed
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

Hi Somik,

unfortunately unit tests are not yet in place.
I have made progress on the unit-test branch but I do not have yet the tests for the plugin infrastructure.
The branch is under ~netstack ownership (lp:~netstack/quantum/quantum-unit-tests).
Maybe you can help me adding these tests.

Salvatore

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

Branch will be proposed for merge as soon as unit tests branch lands into trunk

Changed in quantum:
status: Confirmed → In Progress
Changed in quantum:
status: In Progress → Fix Committed
Changed in quantum:
importance: Undecided → Low
dan wendlandt (danwent)
Changed in quantum:
status: Fix Committed → Fix Released
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.