flesh out is_valid check

Bug #1242830 reported by gordon chung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pycadf
Fix Released
Medium
gordon chung

Bug Description

improve is_valid check to fully validate each CADF type attributes

ie.
- check that attribute has a value and not just descriptor object value.
- check that resource shortform doesn't assign additional properties aside from id attribute

also, explicitly call is_valid() in test cases

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to pycadf (master)

Reviewed: https://review.openstack.org/53757
Committed: http://github.com/stackforge/pycadf/commit/2e436ada18e5b6d37342ff7969b189d4827df45d
Submitter: Jenkins
Branch: master

commit 2e436ada18e5b6d37342ff7969b189d4827df45d
Author: Gordon Chung <email address hidden>
Date: Thu Oct 24 19:04:13 2013 -0400

    improve model validation

    - add isset to check "real" attribute and not descriptor
    - verify only id is set in shortform
    - verify either resource or resourceId value is set, not both.

    blueprint improve-validation
    related-bug: #1242830

    Change-Id: Ie9e3f26c5d30cd36e6013a1f0b77c8fe466cb3f7

gordon chung (chungg)
Changed in pycadf:
assignee: nobody → gordon chung (chungg)
status: New → Fix Committed
Dolph Mathews (dolph)
Changed in pycadf:
milestone: none → 0.6.0
Dolph Mathews (dolph)
Changed in pycadf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.