driver interface' validate() should not return anything

Bug #1288363 reported by Ruby Loo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Ruby Loo

Bug Description

Some of the driver interface's validate(), eg pxe.VendorPassthru.validate() returns True. The expected behaviour is for them to raise an exception if validation isn't successful, or return nothing if validation succeeds. In addition to fixing the code, we should add something to the base interface docstrings so that it is clear that nothing should be returned.

aeva black (tenbrae)
Changed in ironic:
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

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

Reviewed: https://review.openstack.org/97855
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=2891f18d598412b8ae48bccd09f331d8013aa20a
Submitter: Jenkins
Branch: master

commit 2891f18d598412b8ae48bccd09f331d8013aa20a
Author: Ruby Loo <email address hidden>
Date: Wed Jun 4 16:47:50 2014 +0000

    Driver interface's validate should return nothing

    Some of the driver interface's validate(), eg pxe.VendorPassthru.validate()
    returns True. The expected behaviour is for them to raise an exception if
    validation isn't successful, or return nothing if validation succeeds.

    This is fixed.

    The docstrings for the validate functions in the base class have been updated
    to mention that they should return None.

    Change-Id: Ic8fb626874ed6cb11494c84dc184d70686441b0f
    Closes-Bug: #1288363

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