Comment 5 for bug 1577727

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/313234
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9e0032362188d3b4c6ad21881a08275591461d03
Submitter: Jenkins
Branch: master

commit 9e0032362188d3b4c6ad21881a08275591461d03
Author: dineshbhor <email address hidden>
Date: Fri Apr 29 12:46:55 2016 +0000

    Return 400 HTTP error for invalid flavor attributes

    Currently create flavor API raises 500 error if you
    pass large value to ram, disk, vcpu, swap, ephemeral,
    rxtx_factor flavor properties. All integral flavor
    properties are validated against db.MAX_INT(2147483647)
    for maximum limit and raised exception.InvalidInput for
    invalid input.

    Added validation of maximum limit for flavor properties
    in schema. Kept the validation of flavor properties as it
    is in nova.compute.flavors as it is used by legacy flavor
    create. Moved the SQL_SP_FLOAT_MAX constant to nova.db.api
    so that it can be used in schema as well as in test files.

    APIImpact: Return 400 status code for invalid flavor
    properties.

    Closes-Bug: #1577727
    Change-Id: I4e50534d67ee90c585b6679644e06ee3569c8c97