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.
Reviewed: https:/ /review. openstack. org/213340 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=efdb4ce5755 795d455860297d8 4d5d97daa704b7
Committed: https:/
Submitter: Jenkins
Branch: master
commit efdb4ce5755795d 455860297d84d5d 97daa704b7
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 a6ff9efda33f4e4 65d5639618da1e2 e2105890b6 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 get_flavor( ) used to work with get_flavor( ) if we're
so we have to mock out the instance.flavor instead. There were a few
tests that relied on how instance.
system_metadata and since that's not really valid anymore, we change
those tests to just raise a NotFound from instance.
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: Ie6b3c470619bd6 7871b49e75af804 4f173bed615