validate_dict functions don't convert booleans

Bug #1207881 reported by Salvatore Orlando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Salvatore Orlando

Bug Description

validate_dict functions are used for validating composite attribute.
For each item, they perform validation using one of the standard validators provided in attributes.py

When it comes to boolean, however they do not convert literals such as 'false' and 'true'.
Hence they are passed to the plugin as string, causing an error when the data are persisted, as the database would be expecting a boolean.

this is currently affecting at least the ext-gw-mode API extension.

Tags: api
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/40004

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/40004
Committed: http://github.com/openstack/neutron/commit/b8b28bd679746040bb520e7b273d0e822820cac1
Submitter: Jenkins
Branch: master

commit b8b28bd679746040bb520e7b273d0e822820cac1
Author: Salvatore Orlando <email address hidden>
Date: Fri Aug 2 11:47:09 2013 -0700

    Enable conversion for composite attribute items

    Bug 1207881

    Enable 'dict validators' to convert composite attributes' items
    using a 'convert_to' specification in a way similar to first-level
    API attributes.
    This is needed in order to ensure boolean sub-attributes are
    properly handled.

    Change-Id: I7f466befaa88112cf7e9b77d854ac292b2af638f

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.