Comment 2 for bug 1237611

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

Reviewed: https://review.openstack.org/50875
Committed: http://github.com/openstack/nova/commit/831e6013544326e32a1e252917301618c9ea7626
Submitter: Jenkins
Branch: master

commit 831e6013544326e32a1e252917301618c9ea7626
Author: Abhijeet Malawade <email address hidden>
Date: Thu Oct 10 00:00:07 2013 -0700

    Flavor name should not contain only white spaces

    Returns 400 Bad request instead of 200 Ok if flavor name
    contains only whitespaces.
    Flavor name containing any leading and trailing whitespaces will be
    trimmed before validation and before saving it to the backend.

    Added unit test cases for both v2 and v3 api's. For v3 api instead of
    stubbing flavors 'create' method stubbed db's 'flavor_create' method.
    Also removed redundant code of stubbing 'flavor_create' method.

    For example
    name = " " #not allowed
    name = "extra large" #allowed
    name = " extra large " #allowed, but leading and trailing whitespaces
                             #will be trimmed (same as instance name)

    Closes-Bug: #1237611

    Change-Id: Ie68be299030a878a752dbfdcdfe5094f8427598a