_extend_extra_router_dict does not handle boolean correctly

Bug #1348479 reported by Armando Migliaccio
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Armando Migliaccio

Bug Description

Method:

https://github.com/openstack/neutron/blob/master/neutron/db/l3_attrs_db.py#L50

is used to add extension attributes to the router object during the handling of the API response. When attributes are unspecified, the router is extended with default values.

In the case of boolean attributes things don't work as they should, because a default value as True takes over on the right side of the boolean expression on:

https://github.com/openstack/neutron/blob/master/neutron/db/l3_attrs_db.py#L56

The end user so is led to believe that the server did not honor the request, when effectively it did.

Changed in neutron:
assignee: nobody → Armando Migliaccio (armando-migliaccio)
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/109504

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/109504
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=6bd147df43b1d352230d94f52e0fb4c56e7885d6
Submitter: Jenkins
Branch: master

commit 6bd147df43b1d352230d94f52e0fb4c56e7885d6
Author: armando-migliaccio <email address hidden>
Date: Thu Jul 24 21:44:47 2014 -0700

    Handle bool correctly during _extend_extra_router_dict

    Ensure that extension attributes are always used to
    override the chosen defaults. This was not working
    in the case of default boolean True, as the testing
    condition was wrong.

    Closes-bug: #1348479

    Change-Id: I22bce82c6078a96c0eb4a67e6decb6e9205721a8

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-3 → 2014.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.