Can't skip constraint validation if the value is None

Bug #1444898 reported by huangtianhua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
huangtianhua

Bug Description

The code as bellow, if the value is None, the constraint validation won't do:
def get_value(self, value, validate=False):
......
# property value resolves to None if resource it depends on is not
        # created. So, if value is None skip constraint validation.
        if value is not None and validate:
            self.schema.validate_constraints(_value, self.context)
......

The bug/1339942 has been merged, and it fixes checks reference on another
resource and skips validation if resource is in INIT state.
So if there is no dependency, we need to do the constraint validation of None value.

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

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

Reviewed: https://review.openstack.org/174728
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=4f0a8883167ecc03fbe74d5a72f3b2edc5c137a9
Submitter: Jenkins
Branch: master

commit 4f0a8883167ecc03fbe74d5a72f3b2edc5c137a9
Author: huangtianhua <email address hidden>
Date: Fri Apr 17 14:56:02 2015 +0800

    Do constraint validation for None value property

    Should do constraint validation for None value property
    when validate if the property has no dependency of any other
    Init resource.

    Change-Id: Ie22d01de517f25b1f160c84c8c94b8950e528399
    Closes-Bug: #1444898

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