Comment 2 for bug 1485025

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

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

commit efdb4ce5755795d455860297d84d5d97daa704b7
Author: Matt Riedemann <email address hidden>
Date: Fri Aug 14 13:47:12 2015 -0700

    Load flavor when getting instances for simple-tenant-usage

    Per commit a6ff9efda33f4e465d5639618da1e2e2105890b6 which removes the
    flavor compatibility code for system_metadata we no longer need to load
    system_metadata when getting instances in the simple-tenant-usage API.
    Instead we should expect the flavor attribute to be loaded when getting
    the instances.

    This updates the tests a bit since we no longer rely on system_metadata
    so we have to mock out the instance.flavor instead. There were a few
    tests that relied on how instance.get_flavor() used to work with
    system_metadata and since that's not really valid anymore, we change
    those tests to just raise a NotFound from instance.get_flavor() if we're
    testing some other lookup path. As a result, two of the tests became
    basically the same so one was removed.

    Closes-Bug: #1485025

    Change-Id: Ie6b3c470619bd67871b49e75af8044f173bed615