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()
-
testContextClaimWithException()
-
testCpuOversubscription()
Test client-supplied oversubscription of CPU
-
testCpuStats()
-
testCpuUnlimited()
Test default of unlimited CPU
-
testDiskOversubscription()
Test client-supplied oversubscription of disk space
-
testExpiredClaims()
Test that old claims get cleaned up automatically if not finished
or aborted explicitly.
-
testFreeDiskResourceValue()
-
testFreeRamResourceValue()
-
testInstanceClaim()
-
testInstanceContextClaim()
-
testInsufficientCpuClaim()
-
testInsufficientDiskClaimWithOversubscription()
Exceed oversubscribed disk limit of 10GB
-
testInsufficientMemoryClaimWithOversubscription()
Exceed oversubscribed memory limit of 10MB
-
testMemoryOversubscription()
Test client-supplied oversubscription of memory
-
testUnlimitDiskClaim()
Test default of unlimited disk space
-
testUnlimitedMemoryClaim()
Test default of unlimited memory
-
testUpdateComputeNode()
-
testUpdateLoadStatsForInstance()
-
testUpdateUseOnlyForTracked()
Only update usage is a previous claim has added instance to
list of tracked instances.
-
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()
-
testDisabledFinishClaim()
-
testDisabledInstanceClaim()
-
testDisabledInstanceContextClaim()
-
testDisabledUpdateUsage()
-
class UnsupportedVirtDriver
Bases: nova.virt.driver.ComputeDriver
Pretend version of a lame virt driver
-
get_available_resource()