The nova.tests.compute.test_resource_tracker Module

Tests for compute resource tracking

class BaseTestCase(methodName='runTest')

Bases: nova.test.TestCase

setUp()
class FakeContext(is_admin=False)

Bases: object

elevated()
class FakeVirtDriver

Bases: nova.virt.driver.ComputeDriver

get_available_resource()
class MissingComputeNodeTestCase(methodName='runTest')

Bases: nova.tests.compute.test_resource_tracker.BaseTestCase

setUp()
testCreatedComputeNode()
testEnabled()
class MissingServiceTestCase(methodName='runTest')

Bases: nova.tests.compute.test_resource_tracker.BaseTestCase

setUp()
testMissingService()

No service record in DB.

class ResourceTestCase(methodName='runTest')

Bases: nova.tests.compute.test_resource_tracker.BaseTestCase

setUp()
testClaimAndAbort()
testClaimAndFinish()
testContextClaim()
testContextClaimWithException()
testExpiredClaims()

Test that old claims get cleaned up automatically if not finished or aborted explicitly.

testFreeDiskResourceValue()
testFreeRamResourceValue()
testInstanceClaim()
testInstanceContextClaim()
testInsufficientDiskClaim()

Exceed disk limit of 5GB

testInsufficientMemoryClaim()

Exceed memory limit of 5MB

testInsufficientMemoryClaimWithOversubscription()

Exceed oversubscribed memory limit of 10MB

testUpdateComputeNode()
testUpdateLoadStatsForInstance()
class UnsupportedDriverTestCase(methodName='runTest')

Bases: nova.tests.compute.test_resource_tracker.BaseTestCase

Resource tracking should be disabled when the virt driver doesn’t support it.

setUp()
testDisabled()
testDisabledAbortClaim()
testDisabledClaim()
testDisabledContextClaim()
testDisabledFinishClaim()
testDisabledFreeResources()
testDisabledInstanceClaim()
testDisabledInstanceContextClaim()
class UnsupportedVirtDriver

Bases: nova.virt.driver.ComputeDriver

Pretend version of a lame virt driver

get_available_resource()

Previous topic

The nova.tests.compute.test_compute_utils Module

Next topic

The nova.tests.compute.test_rpcapi Module

This Page