The nova.tests.api.openstack.compute.test_flavors Module

class DisabledFlavorsWithRealDBTest(methodName='runTest')

Bases: nova.test.TestCase

Tests that disabled flavors should not be shown nor listed.

setUp()
tearDown()
test_index_should_list_disabled_flavors_to_admin()
test_index_should_not_list_disabled_flavors_to_user()
test_show_should_include_disabled_flavor_for_admin()
test_show_should_include_disabled_flavor_for_user()

Counterintuitively we should show disabled flavors to all users and not just admins. The reason is that, when a user performs a server-show request, we want to be able to display the pretty flavor name (‘512 MB Instance’) and not just the flavor-id even if the flavor id has been marked disabled.

class FlavorsTest(methodName='runTest')

Bases: nova.test.TestCase

setUp()
test_get_empty_flavor_list()
test_get_flavor_by_id()
test_get_flavor_by_invalid_id()
test_get_flavor_detail_with_limit()
test_get_flavor_list()
test_get_flavor_list_detail()
test_get_flavor_list_detail_min_ram_and_min_disk()

Tests that filtering work on flavor details and that minRam and minDisk filters can be combined

test_get_flavor_list_filter_invalid_min_disk()

Ensure you cannot list flavors with invalid minDisk param.

test_get_flavor_list_filter_invalid_min_ram()

Ensure you cannot list flavors with invalid minRam param.

test_get_flavor_list_filter_min_disk()

Flavor lists may be filtered by minDisk.

test_get_flavor_list_filter_min_ram()

Flavor lists may be filtered by minRam.

test_get_flavor_list_with_marker()
test_get_flavor_with_limit()
class FlavorsXMLSerializationTest(methodName='runTest')

Bases: nova.test.TestCase

test_detail()
test_index()
test_index_empty()
test_show()
test_show_handles_integers()
test_xml_declaration()
empty_instance_type_get_all(inactive=False, filters=None)
fake_instance_type_get_all(inactive=False, filters=None)
fake_instance_type_get_by_flavor_id(flavorid, ctxt=None)
return_instance_type_not_found(flavor_id, ctxt=None)

Previous topic

The nova.tests.api.openstack.compute.test_extensions Module

Next topic

The nova.tests.api.openstack.compute.test_image_metadata Module

This Page