DRY pool meta-controllers

Bug #1351462 reported by Kurt Griffiths
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
Medium
Rose Ames

Bug Description

Lots of duplicated code in the pool meta-controllers that RouterController.__getattr__ was supposed to avoid. How can we clean this up?

Tags: debt
Revision history for this message
Rose Ames (rose-w) wrote :

I see two issues with __getattr__.

First, a lot of the controller methods take positional arguments other than queue, and then convert them to keyword arguments for the control method. Second, they have varying behaviour when lookup fails (some raise an error, others return None or an empty list or whatever).

I have a feeling that handling all that with __getattr__ would be pretty ugly. Would it make more sense to just eliminate the target = self._lookup lines with a utility method or a decorator?

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

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

Changed in zaqar:
status: Triaged → In Progress
no longer affects: zaqar/kilo
Changed in zaqar:
milestone: none → kilo-1
Changed in zaqar:
milestone: kilo-1 → kilo-2
Revision history for this message
Flavio Percoco (flaper87) wrote :
Changed in zaqar:
milestone: kilo-2 → kilo-1
Thierry Carrez (ttx)
Changed in zaqar:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in zaqar:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on zaqar (master)

Change abandoned by Victoria Martínez de la Cruz (<email address hidden>) on branch: master
Review: https://review.openstack.org/129109
Reason: This change has been addressed in https://review.openstack.org/#/c/132907/.

Thierry Carrez (ttx)
Changed in zaqar:
milestone: kilo-1 → 2015.1.0
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.