Comment 11 for bug 1046870

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

Reviewed: https://review.openstack.org/23203
Committed: http://github.com/openstack/nova/commit/1c6cc18b0cef25bfff8566c2a646cd8bcbbe132a
Submitter: Jenkins
Branch: master

commit 1c6cc18b0cef25bfff8566c2a646cd8bcbbe132a
Author: Sean Dague <email address hidden>
Date: Thu Feb 28 15:32:33 2013 -0500

    validate security_groups on server create

    security_groups were getting passed all the way into the database
    without ever checking for their existance. This allowed for crudding
    up the db with bad data, as well as succeeding when an admin typoed
    a security group, and getting no active security group.

    Also, security_group is actually an array, which is not implied by
    it being a singular variable. Make it a plural variable to cause
    less confusion in the future.

    And given that we multiply change security_groups from None =>
    ['default'], get rid of a utility function that serves no purpose
    to handle the None or string cases.

    To test this correctly, stub out the db call, so we manage to get
    all the way down to the bottom of the stack sanely. Also ensure that
    the negative case gets us the expected HTTPBadRequest.

    Partial fix for nova bugs needed to reenable test_servers_negative
    in Tempest. Fixes bug #1046870

    Change-Id: I5b477f7bc1992abb47e014f137b8010cc76b2113