incorrect evaluation of members property

Bug #1255697 reported by Stephen Gran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Stephen Gran

Bug Description

When evaluating an OS::Neutron::Loadbalancer, if the members property is absent, it currently defaults to None.

This make constructs like

for member in self.properties.get('members', []):
     ....

Fail, since what is returned is None rather than [], as self.properties has a key 'members' with a value of None.

The default should be changed to an empty array so that we don't have to keep guarding against None.

Changed in heat:
assignee: nobody → Stephen Gran (sgran)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/58797
Committed: http://github.com/openstack/heat/commit/a028cbe46cb22b050af3f3131dde8655f6ebc852
Submitter: Jenkins
Branch: master

commit a028cbe46cb22b050af3f3131dde8655f6ebc852
Author: Stephen Gran <email address hidden>
Date: Wed Nov 27 15:40:47 2013 +0000

    Ensure that members is a list

    self.properties.get('members') should not be None. Ensure that
    an empty list is returned instead.

    Change-Id: I01d191eafebac30ad25505b312ff6e936181bdbf
    Closes-Bug: #1255697

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-1 → 2014.1
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.