Test suite for XenAPI.
Bases: nova.test.TestCase
Test that cmp_version compares a as equal to b
Test that cmp_version compares a as greater than b
Test that cmp_version compares by length as last resort
Test that cmp_version compares a as less than b
Test that cmp_version compares non-lexically
Bases: object
Fake Session class for HostState testing.
Bases: object
Fake XenApi for testing HostState.
Bases: nova.test.TestCase
Tests HostState, which holds metrics from XenServer that get reported back to the Schedulers.
Bases: nova.test.TestCase
Unit tests for code that detects the ImageType.
If we’re using Glance, then defer to the image_type field, which in this case will be ‘raw’.
If we’re using Glance, then defer to the image_type field, which in this case will be ‘vhd’.
If a kernel is specified, the image type is DISK (aka machine).
If the kernel isn’t specified, and we’re not using Glance, then DISK_RAW is assumed.
Bases: nova.test.TestCase
Unit tests for Diffie-Hellman code.
Bases: nova.test.TestCase
Test ImageType class.
Can convert from string to type id.
Can convert from type id to type string.
Bases: nova.test.TestCase
Unit test for verifying migration-related actions.
Bases: nova.test.TestCase
Unit tests for VM operations.
“Test spawning with an empty dns list
Simulates an error while downloading an image.
Verifies that VDIs created are properly cleaned up.
Simulates an error while creating VM record.
It verifies that VDIs created are properly cleaned up.
Bases: nova.test.TestCase
Unit tests for Volume operations.
This shows how to test Ops classes’ methods.
This shows how to test when exceptions are raised.
This shows how to test helper classes’ methods.
This shows how to test helper classes’ methods.
vm_utils.with_vdi_attached_here needs to be stubbed out because it calls down to the filesystem to attach a vdi. This provides a decorator to handle that.