@

Home 

OpenStack Study: nova

OpenStack Index

Previous

Next

    def test_create_image_too_small(self):

    def test_generate_resized_backing_files(self):

    def test_qcow2_exists_and_has_no_backing_file(self):

    def test_resolve_driver_format(self):

    def test_prealloc_image(self):

        def fake_fetch(target, *args, **kwargs):

    def test_prealloc_image_without_write_access(self):

        def fake_fetch(target, *args, **kwargs):

class LvmTestCase(_ImageTestCase, test.NoDBTestCase):

    def setUp(self):

    def prepare_mocks(self):

    def _create_image(self, sparse):

    def _create_image_generated(self, sparse):

    def _create_image_resize(self, sparse):

    def test_cache(self):

    def test_cache_image_exists(self):

    def test_cache_base_dir_exists(self):

    def test_create_image(self):

    def test_create_image_sparsed(self):

    def test_create_image_generated(self):

    def test_create_image_generated_sparsed(self):

    def test_create_image_resize(self):

    def test_create_image_resize_sparsed(self):

    def test_create_image_negative(self):

    def test_create_image_generated_negative(self):

    def test_prealloc_image(self):

        def fake_fetch(target, *args, **kwargs):

class RbdTestCase(_ImageTestCase, test.NoDBTestCase):

    def setUp(self):

    def prepare_mocks(self):

    def test_cache(self):

    def test_cache_base_dir_exists(self):

    def test_cache_image_exists(self):

    def test_cache_template_exists(self):

    def test_cache_base_dir_exists(self):

    def test_create_image(self):

    def test_prealloc_image(self):

        def fake_fetch(target, *args, **kwargs):

        def fake_resize(rbd_name, size):

    def test_parent_compatible(self):

    def test_image_path(self):

class BackendTestCase(test.NoDBTestCase):

    def setUp(self):

        def fake_chown(path, owner_uid=None):

    def get_image(self, use_cow, image_type):

    def _test_image(self, image_type, image_not_cow, image_cow):

        def assertIsInstance(instance, class_object):

    def test_image_raw(self):

    def test_image_qcow2(self):

    def test_image_lvm(self):

    def test_image_rbd(self):

    def test_image_default(self):

\OpenStack\nova-2014.1\nova\tests\virt\libvirt\test_imagecache.py

def intercept_log_messages():

class ImageCacheManagerTestCase(test.NoDBTestCase):

    def setUp(self):

    def test_read_stored_checksum_missing(self):

    def test_read_stored_checksum(self):

    def test_read_stored_checksum_legacy_essex(self):

    def test_list_base_images(self):

    def test_list_backing_images_small(self):

    def test_list_backing_images_resized(self):

    def test_list_backing_images_instancename(self):

    def test_list_backing_images_disk_notexist(self):

        def fake_get_disk(disk_path):

    def test_find_base_file_nothing(self):

    def test_find_base_file_small(self):

    def test_find_base_file_resized(self):

    def test_find_base_file_all(self):

    def _make_base_file(self, checksum=True):

    def test_remove_base_file(self):

    def test_remove_base_file_original(self):

    def test_remove_base_file_dne(self):

    def test_remove_base_file_oserror(self):

    def test_handle_base_image_unused(self):

    def test_handle_base_image_used(self):

    def test_handle_base_image_used_remotely(self):

    def test_handle_base_image_absent(self):

    def test_handle_base_image_used_missing(self):

    def test_handle_base_image_checksum_fails(self):

    def test_verify_base_images(self):

        def fq_path(path):

        def exists(path):

        def listdir(path):

        def isfile(path):

        def get_disk_backing_file(path):

        def getmtime(path):

        def remove(path):

    def test_verify_base_images_no_base(self):

    def test_is_valid_info_file(self):

    def test_configured_checksum_path(self):

    def test_compute_manager(self):

        def fake_get_all_by_filters(context, *args, **kwargs):

class VerifyChecksumTestCase(test.NoDBTestCase):

    def setUp(self):

    def _make_checksum(self, tmpdir):

    def _write_file(self, info_fname, info_attr, testdata):

    def _check_body(self, tmpdir, info_attr):

    def test_verify_checksum(self):

    def test_verify_checksum_disabled(self):

    def test_verify_checksum_invalid_json(self):

    def test_verify_checksum_invalid_repaired(self):

    def test_verify_checksum_invalid(self):

    def test_verify_checksum_file_missing(self):

\OpenStack\nova-2014.1\nova\tests\virt\libvirt\test_image_utils.py

class ImageUtilsTestCase(test.NoDBTestCase):

    def test_disk_type(self):

    def test_disk_backing(self):

    def test_disk_size(self):

    def test_qemu_info_canon(self):

    def test_qemu_info_canon2(self):

    def test_qemu_backing_file_actual(self):

    def test_qemu_info_convert(self):

    def test_qemu_info_snaps(self):

\OpenStack\nova-2014.1\nova\tests\virt\libvirt\test_libvirt.py

def _concurrency(signal, wait, done, target, is_block_dev=False):

class FakeVirDomainSnapshot(object):

    def __init__(self, dom=None):

    def delete(self, flags):

class FakeVirtDomain(object):

    def __init__(self, fake_xml=None, uuidstr=None):

    def name(self):

    def info(self):

    def create(self):

    def managedSave(self, *args):

    def createWithFlags(self, launch_flags):

    def XMLDesc(self, *args):

    def UUIDString(self):

    def attachDeviceFlags(self, xml, flags):

    def detachDeviceFlags(self, xml, flags):

    def snapshotCreateXML(self, xml, flags):

    def blockCommit(self, disk, base, top, bandwidth=0, flags=0):

    def blockRebase(self, disk, base, bandwidth=0, flags=0):

    def blockJobInfo(self, path, flags):

    def resume(self):

class CacheConcurrencyTestCase(test.TestCase):

    def setUp(self):

        def fake_exists(fname):

        def fake_execute(*args, **kwargs):

        def fake_extend(image, size, use_cow=False):

    def test_same_fname_concurrency(self):

    def test_different_fname_concurrency(self):

class FakeVolumeDriver(object):

    def __init__(self, *args, **kwargs):

    def attach_volume(self, *args):

    def detach_volume(self, *args):

    def get_xml(self, *args):

    def connect_volume(self, *args):

class FakeConfigGuestDisk(object):

    def __init__(self, *args, **kwargs):

class FakeConfigGuest(object):

    def __init__(self, *args, **kwargs):

class FakeNodeDevice(object):

    def __init__(self, fakexml):

    def XMLDesc(self, *args):

class LibvirtConnTestCase(test.TestCase):

    def setUp(self):

        def fake_extend(image, size, use_cow=False):

    def relpath(self, path):

    def tearDown(self):

    def create_fake_libvirt_mock(self, **kwargs):

    def fake_lookup(self, instance_name):

    def fake_execute(self, *args, **kwargs):

    def _create_service(self, **kwargs):

    def _get_host_disabled(self, host):

    def test_set_host_enabled_with_disable(self):

    def test_set_host_enabled_with_enable(self):

    def test_set_host_enabled_with_enable_state_enabled(self):

    def test_set_host_enabled_with_disable_state_disabled(self):

    def test_set_host_enabled_swallows_exceptions(self):

    def create_instance_obj(self, context, **params):

    def test_prepare_pci_device(self):

    def test_prepare_pci_device_exception(self):

    def test_detach_pci_devices_exception(self):

    def test_detach_pci_devices(self):

    def test_detach_pci_devices_timeout(self):

    def test_get_connector(self):

    def test_close_callback(self):

        def set_close_callback(cb, opaque):

    def test_close_callback_bad_signature(self):

    def test_close_callback_not_defined(self):

    def test_cpu_features_bug_1217630(self):

    def test_lxc_get_host_capabilities_failed(self):

    def test_get_guest_config(self):

    def test_get_guest_config_clock(self):

    def test_get_guest_config_windows(self):

    def test_get_guest_config_with_two_nics(self):

    def test_get_guest_config_bug_1118829(self):

    def test_get_guest_config_with_root_device_name(self):

    def test_get_guest_config_with_block_device(self):

    def test_get_guest_config_with_configdrive(self):

    def test_get_guest_config_with_virtio_scsi_bus(self):

    def test_get_guest_config_with_virtio_scsi_bus_bdm(self):

    def test_get_guest_config_with_vnc(self):

    def test_get_guest_config_with_vnc_and_tablet(self):

    def test_get_guest_config_with_spice_and_tablet(self):

    def test_get_guest_config_with_spice_and_agent(self):

    def test_get_guest_config_with_type_xen(self):

    def test_get_guest_config_with_vnc_and_spice(self):

    def test_invalid_watchdog_action(self):

    def test_get_guest_config_with_watchdog_action_through_image_meta(self):

    def test_get_guest_config_with_watchdog_action_through_flavor(self):

    def test_get_guest_config_with_watchdog_action_meta_overrides_flavor(self):

    def test_unsupported_video_driver_through_image_meta(self):

    def test_get_guest_config_with_video_driver_through_image_meta(self):

    def test_get_guest_config_with_qga_through_image_meta(self):

    def test_get_guest_config_with_video_driver_vram(self):

    def test_video_driver_flavor_limit_not_set(self):

    def test_video_driver_ram_above_flavor_limit(self):

    def test_get_guest_config_without_qga_through_image_meta(self):

    def test_get_guest_config_with_rng_device(self):

    def test_get_guest_config_with_rng_not_allowed(self):

    def test_get_guest_config_with_rng_limits(self):

    def test_get_guest_config_with_rng_backend(self):

    def test_get_guest_config_with_rng_dev_not_present(self):

    def _create_fake_service_compute(self):

    def test_get_guest_config_with_pci_passthrough_kvm(self):

    def test_get_guest_config_with_pci_passthrough_xen(self):

    def test_get_guest_config_os_command_line_through_image_meta(self):

    def test_get_guest_config_armv7(self):

        def get_host_capabilities_stub(self):

    def test_get_guest_config_aarch64(self):

        def get_host_capabilities_stub(self):

    def test_get_guest_config_machine_type_through_image_meta(self):

    def _test_get_guest_config_ppc64(self, device_index):

    def test_get_guest_config_ppc64_through_image_meta_vnc_enabled(self):

    def test_get_guest_config_ppc64_through_image_meta_spice_enabled(self):

    def test_get_guest_cpu_config_none(self):

    def test_get_guest_cpu_config_default_kvm(self):

        def get_lib_version_stub():

    def test_get_guest_cpu_config_default_uml(self):

    def test_get_guest_cpu_config_default_lxc(self):

    def test_get_guest_cpu_config_host_passthrough_new(self):

        def get_lib_version_stub():

    def test_get_guest_cpu_config_host_model_new(self):

        def get_lib_version_stub():

    def test_get_guest_cpu_config_custom_new(self):

        def get_lib_version_stub():

    def test_get_guest_cpu_config_host_passthrough_old(self):

        def get_lib_version_stub():

    def test_get_guest_cpu_config_host_model_old(self):

        def get_lib_version_stub():

        def get_host_capabilities_stub(self):

    def test_get_guest_cpu_config_custom_old(self):

        def get_lib_version_stub():

    def test_xml_and_uri_no_ramdisk_no_kernel(self):

    def test_xml_and_uri_no_ramdisk_no_kernel_xen_hvm(self):

    def test_xml_and_uri_no_ramdisk_no_kernel_xen_pv(self):

    def test_xml_and_uri_no_ramdisk(self):

    def test_xml_and_uri_no_kernel(self):

    def test_xml_and_uri(self):

    def test_xml_and_uri_rescue(self):

    def test_xml_and_uri_rescue_no_kernel_no_ramdisk(self):

    def test_xml_and_uri_rescue_no_kernel(self):

    def test_xml_and_uri_rescue_no_ramdisk(self):

    def test_xml_uuid(self):

    def test_lxc_container_and_uri(self):

    def test_xml_disk_prefix(self):

    def test_xml_user_specified_disk_prefix(self):

    def test_xml_disk_driver(self):

    def test_xml_disk_bus_virtio(self):

    def test_xml_disk_bus_ide(self):

    def test_xml_disk_bus_ide_and_virtio(self):

    def test_list_instances(self):

    def test_list_instance_uuids(self):

    def test_list_defined_instances(self):

    def test_list_instances_when_instance_deleted(self):

        def fake_lookup(instance_name):

    def test_list_instance_uuids_when_instance_deleted(self):

        def fake_lookup(instance_name):

    def test_list_instances_throws_nova_exception(self):

        def fake_lookup(instance_name):

    def test_list_instance_uuids_throws_nova_exception(self):

        def fake_lookup(instance_name):

    def test_get_all_block_devices(self):

        def fake_lookup(id):

    def test_get_disks(self):

        def fake_lookup(id):

        def fake_lookup_name(name):

    def test_snapshot_in_ami_format(self):

    def test_lxc_snapshot_in_ami_format(self):

    def test_snapshot_in_raw_format(self):

        def convert_image(source, dest, out_format):

    def test_lxc_snapshot_in_raw_format(self):

        def convert_image(source, dest, out_format):

    def test_snapshot_in_qcow2_format(self):

    def test_lxc_snapshot_in_qcow2_format(self):

    def test_snapshot_no_image_architecture(self):

    def test_lxc_snapshot_no_image_architecture(self):

    def test_snapshot_no_original_image(self):

    def test_lxc_snapshot_no_original_image(self):

    def test_snapshot_metadata_image(self):

    def test_snapshot_with_os_type(self):

    def test__create_snapshot_metadata(self):

    def test_attach_invalid_volume_type(self):

    def test_attach_blockio_invalid_hypervisor(self):

    def test_attach_blockio_invalid_version(self):

        def get_lib_version_stub():

    def test_multi_nic(self):

    def _behave_supports_direct_io(self, raise_open=False, raise_write=False, exc=ValueError()):

    def test_supports_direct_io(self):

    def _check_xml_and_container(self, instance):

    def _check_xml_and_disk_prefix(self, instance, prefix=None):

        def _get_prefix(p, default):

    def _check_xml_and_disk_driver(self, image_meta):

        def os_open_stub(path, flags, *args, **kwargs):

        def connection_supports_direct_io_stub(dirpath):

    def _check_xml_and_disk_bus(self, image_meta, block_device_info, wantConfig):

    def _check_xml_and_uuid(self, image_meta):

    def _check_xml_and_uri(self, instance, expect_ramdisk, expect_kernel, rescue=None, expect_xen_hvm=False, xen_only=False):

    def test_ensure_filtering_rules_for_instance_timeout(self):

        def fake_none(self, *args):

        def fake_raise(self):

    def test_check_can_live_migrate_dest_all_pass_with_block_migration(self):

    def test_check_can_live_migrate_dest_all_pass_no_block_migration(self):

    def test_check_can_live_migrate_dest_incompatible_cpu_raises(self):

    def test_check_can_live_migrate_dest_cleanup_works_correctly(self):

    def test_check_can_live_migrate_source_works_correctly(self):

    def test_check_can_live_migrate_source_vol_backed_works_correctly(self):

    def test_check_can_live_migrate_source_vol_backed_w_disk_raises(self):

    def test_check_can_live_migrate_source_vol_backed_fails(self):

    def test_check_can_live_migrate_dest_fail_shared_storage_with_blockm(self):

    def test_check_can_live_migrate_no_shared_storage_no_blck_mig_raises(self):

    def test_check_can_live_migrate_source_with_dest_not_enough_disk(self):

    def test_live_migration_raises_exception(self):

        def fake_lookup(instance_name):

    def test_rollback_live_migration_at_destination(self):

    def _do_test_create_images_and_backing(self, disk_type):

    def test_create_images_and_backing_qcow2(self):

    def test_create_images_and_backing_raw(self):

    def test_create_images_and_backing_ephemeral_gets_created(self):

    def test_create_images_and_backing_disk_info_none(self):

    def test_pre_live_migration_works_correctly_mocked(self):

        def fake_none(*args, **kwargs):

    def test_pre_live_migration_block_with_config_drive_mocked(self):

        def fake_true(*args, **kwargs):

    def test_pre_live_migration_vol_backed_works_correctly_mocked(self):

    def test_pre_live_migration_plug_vifs_retry_fails(self):

        def fake_plug_vifs(instance, network_info):

    def test_pre_live_migration_plug_vifs_retry_works(self):

        def fake_plug_vifs(instance, network_info):

    def test_get_instance_disk_info_works_correctly(self):

        def fake_lookup(instance_name):

    def test_post_live_migration(self):

    def test_get_instance_disk_info_excludes_volumes(self):

        def fake_lookup(instance_name):

    def test_spawn_with_network_info(self):

        def fake_none(*args, **kwargs):

        def fake_getLibVersion():

        def fake_getCapabilities():

        def fake_baselineCPU(cpu, flag):

    def test_spawn_without_image_meta(self):

        def fake_none(*args, **kwargs):

        def fake_create_image(*args, **kwargs):

        def fake_get_info(instance):

    def test_spawn_from_volume_calls_cache(self):

        def fake_none(*args, **kwargs):

        def fake_cache(*args, **kwargs):

        def fake_get_info(instance):

    def test_spawn_with_pci_devices(self):

        def fake_none(*args, **kwargs):

        def fake_get_info(instance):

        def fake_node_device_lookup_by_name(address):

    def test_chown_disk_config_for_instance(self):

    def _test_create_image_plain(self, os_type='', filename='', mkfs=False):

        def fake_image(self, instance, name, image_type=''):

        def fake_none(*args, **kwargs):

        def fake_get_info(instance):

    def test_create_image_plain_os_type_blank(self):

    def test_create_image_plain_os_type_none(self):

    def test_create_image_plain_os_type_set_no_fs(self):

    def test_create_image_plain_os_type_set_with_fs(self):

    def test_create_image_with_swap(self):

        def fake_image(self, instance, name, image_type=''):

        def fake_none(*args, **kwargs):

        def fake_get_info(instance):

    def test_create_ephemeral_default(self):

    def test_create_ephemeral_with_conf(self):

    def test_create_ephemeral_with_arbitrary(self):

    def test_create_swap_default(self):

    def test_get_console_output_file(self):

    def test_get_console_output_pty(self):

    def test_get_host_ip_addr(self):

    def test_broken_connection(self):

    def test_command_with_broken_connection(self):

    def test_broken_connection_disable_service(self):

    def test_service_resume_after_broken_connection(self):

    def test_broken_connection_no_wrapped_conn(self):

    def test_immediate_delete(self):

        def fake_lookup_by_name(instance_name):

        def fake_delete_instance_files(instance):

    def _test_destroy_removes_disk(self, volume_fail=False):

        def fake_destroy(instance):

        def fake_os_path_exists(path):

        def fake_unplug_vifs(instance, network_info):

        def fake_unfilter_instance(instance, network_info):

        def fake_obj_load_attr(self, attrname):

        def fake_save(self, context):

    def test_destroy_removes_disk(self):

    def test_destroy_removes_disk_volume_fails(self):

    def test_destroy_not_removes_disk(self):

        def fake_destroy(instance):

        def fake_os_path_exists(path):

        def fake_unplug_vifs(instance, network_info):

        def fake_unfilter_instance(instance, network_info):

    def test_delete_instance_files(self):

        def fake_obj_load_attr(self, attrname):

    def test_reboot_different_ids(self):

        def fake_lookup_by_name(instance_name):

        def fake_create_domain(**kwargs):

    def test_reboot_same_ids(self):

        def fake_lookup_by_name(instance_name):

        def fake_hard_reboot(*args, **kwargs):

        def fake_sleep(interval):

    def test_soft_reboot_libvirt_exception(self):

    def _test_resume_state_on_host_boot_with_state(self, state):

        def fake_lookup_by_name(instance_name):

        def fake_hard_reboot(*args):

    def test_resume_state_on_host_boot_with_running_state(self):

    def test_resume_state_on_host_boot_with_suspended_state(self):

    def test_resume_state_on_host_boot_with_paused_state(self):

    def test_resume_state_on_host_boot_with_nostate(self):

    def test_resume_state_on_host_boot_with_shutdown_state(self):

    def test_resume_state_on_host_boot_with_crashed_state(self):

    def test_resume_state_on_host_boot_with_instance_not_found_on_driver(self):

        def fake_instance_exists(name):

        def fake_hard_reboot(*args):

    def test_hard_reboot(self):

        def fake_get_info(instance_name):

    def test_power_on(self):

        def _check_xml_bus(name, xml, block_info):

        def fake_get_info(instance_name):

        def _get_inst(with_meta=True):

    def test_resume(self):

    def test_destroy_undefines(self):

        def fake_lookup_by_name(instance_name):

        def fake_get_info(instance_name):

        def fake_delete_instance_files(instance):

    def test_cleanup_rbd(self):

        def fake_lookup_by_name(instance_name):

        def fake_get_info(instance_name):

    def test_destroy_undefines_no_undefine_flags(self):

        def fake_lookup_by_name(instance_name):

        def fake_get_info(instance_name):

        def fake_delete_instance_files(instance):

    def test_destroy_undefines_no_attribute_with_managed_save(self):

        def fake_lookup_by_name(instance_name):

        def fake_get_info(instance_name):

        def fake_delete_instance_files(instance):

    def test_destroy_undefines_no_attribute_no_managed_save(self):

        def fake_lookup_by_name(instance_name):

        def fake_get_info(instance_name):

        def fake_delete_instance_files(instance):

    def test_destroy_timed_out(self):

        def fake_lookup_by_name(instance_name):

        def fake_get_error_code(self):

    def test_private_destroy_not_found(self):

        def fake_lookup_by_name(instance_name):

        def fake_get_info(instance_name):

    def test_undefine_domain_with_not_found_instance(self):

        def fake_lookup(instance_name):

    def test_disk_over_committed_size_total(self):

        def list_instances():

        def get_info(instance_name):

    def test_cpu_info(self):

        def get_host_capabilities_stub(self):

    def test_get_pcidev_info(self):

        def fake_nodeDeviceLookupByName(name):

    def test_pci_device_assignable(self):

    def test_get_pci_passthrough_devices(self):

        def fakelistDevices(caps, fakeargs=0):

        def fake_nodeDeviceLookupByName(name):

    def test_diagnostic_vcpus_exception(self):

        def fake_lookup_name(name):

    def test_diagnostic_blockstats_exception(self):

        def fake_lookup_name(name):

    def test_diagnostic_interfacestats_exception(self):

        def fake_lookup_name(name):

    def test_diagnostic_memorystats_exception(self):

        def fake_lookup_name(name):

    def test_diagnostic_full(self):

        def fake_lookup_name(name):

    def test_failing_vcpu_count(self):

    def test_failing_vcpu_count_none(self):

    def test_get_instance_capabilities(self):

        def get_host_capabilities_stub(self):

    def test_event_dispatch(self):

        def handler(event):

    def test_event_lifecycle(self):

        def handler(event):

    def test_set_cache_mode(self):

    def test_set_cache_mode_invalid_mode(self):

    def test_set_cache_mode_invalid_object(self):

    def _test_shared_storage_detection(self, is_same):

    def test_shared_storage_detection_same_host(self):

    def test_shared_storage_detection_different_host(self):

    def test_shared_storage_detection_easy(self):

    def test_create_domain_define_xml_fails(self):

        def fake_defineXML(xml):

        def fake_error(msg):

    def test_create_domain_with_flags_fails(self):

        def fake_createWithFlags(launch_flags):

        def fake_error(msg):

    def test_create_domain_enable_hairpin_fails(self):

        def fake_enable_hairpin(launch_flags):

        def fake_error(msg):

    def test_get_vnc_console(self):

        def fake_lookup(instance_name):

    def test_get_vnc_console_unavailable(self):

        def fake_lookup(instance_name):

    def test_get_spice_console(self):

        def fake_lookup(instance_name):

    def test_get_spice_console_unavailable(self):

        def fake_lookup(instance_name):

    def _test_attach_detach_interface_get_config(self, method_name):

    def test_attach_interface_get_config(self):

    def test_detach_interface_get_config(self):

    def test_default_root_device_name(self):

    def test_default_device_names_for_instance(self):

    def test_hypervisor_hostname_caching(self):

    def test_get_connection_serial(self):

        def get_conn_currency(driver):

        def connect_with_block(*a, **k):

        def fake_register(*a, **k):

    def test_get_connection_concurrency(self):

        def get_conn_currency(driver):

        def connect_with_block(*a, **k):

        def fake_register(*a, **k):

    def test_post_live_migration_at_destination_with_block_device_info(self):

        def fake_none(*args, **kwargs):

        def fake_getLibVersion():

        def fake_getCapabilities():

        def fake_to_xml(context, instance, network_info, disk_info, image_meta=None, rescue=None, block_device_info=None, write_to_disk=False):

        def fake_lookup_name(instance_name):

        def fake_defineXML(xml):

        def fake_baselineCPU(cpu, flag):

    def test_create_without_pause(self):

    def _test_create_with_network_events(self, neutron_failure=None):

        def wait_timeout():

        def fake_prepare(instance, event_name):

        def test_create(cleanup, create, fw_driver, plug_vifs):

    def test_create_with_network_events_neutron(self, is_neutron):

    def test_create_with_network_events_neutron_nowait(self, is_neutron):

    def test_create_with_network_events_neutron_failed_nonfatal_timeout( self, is_neutron):

    def test_create_with_network_events_neutron_failed_fatal_timeout( self, is_neutron):

    def test_create_with_network_events_neutron_failed_nonfatal_error( self, is_neutron):

    def test_create_with_network_events_neutron_failed_fatal_error( self, is_neutron):

    def test_create_with_network_events_non_neutron(self, is_neutron):

    def test_get_neutron_events(self):

class HostStateTestCase(test.TestCase):

    def test_update_status(self):

class NWFilterFakes:

    def __init__(self):

    def nwfilterLookupByName(self, name):

    def filterDefineXMLMock(self, xml):

class IptablesFirewallTestCase(test.TestCase):

    def setUp(self):

    def _create_instance_ref(self):

    def test_static_filters(self):

        def fake_iptables_execute(*cmd, **kwargs):

    def test_filters_for_instance_with_ip_v6(self):

    def test_filters_for_instance_without_ip_v6(self):

    def test_multinic_iptables(self):

    def test_do_refresh_security_group_rules(self):

    def test_unfilter_instance_undefines_nwfilter(self):

    def test_provider_firewall_rules(self):

class NWFilterTestCase(test.TestCase):

    def setUp(self):

    def test_cidr_rule_nwfilter_xml(self):

    def teardown_security_group(self):

    def setup_and_return_security_group(self):

    def _create_instance(self):

    def test_creates_base_rule_first(self):

        def _filterDefineXMLMock(xml):

        def _ensure_all_called(mac, allow_dhcp):

    def test_unfilter_instance_undefines_nwfilters(self):

    def test_nwfilter_parameters(self):

class LibvirtUtilsTestCase(test.TestCase):

    def test_create_image(self):

    def test_create_cow_image(self):

    def test_pick_disk_driver_name(self):

    def test_pick_disk_driver_name_xen_4_0_0(self):

    def test_get_disk_size(self):

    def test_copy_image(self):

    def test_write_to_file(self):

    def test_write_to_file_with_umask(self):

    def test_chown(self):

    def _do_test_extract_snapshot(self, dest_format='raw', out_format='raw'):

    def test_extract_snapshot_raw(self):

    def test_extract_snapshot_iso(self):

    def test_extract_snapshot_qcow2(self):

    def test_load_file(self):

    def test_file_open(self):

    def test_get_fs_info(self):

        def fake_statvfs(path):

    def test_fetch_image(self):

    def test_fetch_raw_image(self):

        def fake_execute(*cmd, **kwargs):

        def fake_rename(old, new):

        def fake_unlink(path):

        def fake_rm_on_error(path, remove=None):

        def fake_qemu_img_info(path):

    def test_get_disk_backing_file(self):

        def fake_execute(*args, **kwargs):

        def return_true(*args, **kwargs):

class LibvirtDriverTestCase(test.TestCase):

    def setUp(self):

    def _create_instance(self, params=None):

    def test_migrate_disk_and_power_off_exception(self):

        def fake_get_instance_disk_info(instance, xml=None, block_device_info=None):

        def fake_destroy(instance):

        def fake_get_host_ip_addr():

        def fake_execute(*args, **kwargs):

        def fake_os_path_exists(path):

        def fake_is_storage_shared(dest, inst_base):

    def test_migrate_disk_and_power_off(self):

        def fake_get_instance_disk_info(instance, xml=None, block_device_info=None):

        def fake_destroy(instance):

        def fake_get_host_ip_addr():

        def fake_execute(*args, **kwargs):

    def test_migrate_disk_and_power_off_resize_error(self):

    def test_wait_for_running(self):

        def fake_get_info(instance):

    def _test_finish_migration(self, power_on):

        def fake_can_resize_image(path, size):

        def fake_extend(path, size, use_cow=False):

        def fake_to_xml(context, instance, network_info, disk_info, image_meta=None, rescue=None, block_device_info=None, write_to_disk=False):

        def fake_plug_vifs(instance, network_info):

        def fake_create_image(context, inst, disk_mapping, suffix='', disk_images=None, network_info=None, block_device_info=None, inject_files=True):

        def fake_create_domain(xml, instance=None, launch_flags=0, power_on=True):

        def fake_enable_hairpin(instance):

        def fake_execute(*args, **kwargs):

        def fake_get_info(instance):

    def test_finish_migration_power_on(self):

    def test_finish_migration_power_off(self):

    def _test_finish_revert_migration(self, power_on):

        def fake_execute(*args, **kwargs):

        def fake_plug_vifs(instance, network_info):

        def fake_create_domain(xml, instance=None, launch_flags=0, power_on=True):

        def fake_enable_hairpin(instance):

        def fake_get_info(instance):

        def fake_to_xml(context, instance, network_info, disk_info, image_meta=None, rescue=None, block_device_info=None):

    def test_finish_revert_migration_power_on(self):

    def test_finish_revert_migration_power_off(self):

    def _test_finish_revert_migration_after_crash(self, backup_made=True, del_inst_failed=False):

    def test_finish_revert_migration_after_crash(self):

    def test_finish_revert_migration_after_crash_before_new(self):

    def test_finish_revert_migration_after_crash_before_backup(self):

    def test_finish_revert_migration_after_crash_delete_failed(self):

    def test_cleanup_failed_migration(self):

    def test_confirm_migration(self):

    def test_cleanup_resize_same_host(self):

        def fake_os_path_exists(path):

    def test_cleanup_resize_not_same_host(self):

        def fake_os_path_exists(path):

        def fake_undefine_domain(instance):

        def fake_unplug_vifs(instance, network_info):

        def fake_unfilter_instance(instance, network_info):

    def test_get_instance_disk_info_exception(self):

        def fake_lookup_by_name(instance_name):

    def test_lvm_disks(self, listlvs, exists):

    def test_is_booted_from_volume(self):

    def _test_inject_data(self, driver_params, disk_params, disk_inject_data, inj_network, called=True):

        def fake_inj_network(*args, **kwds):

    def _test_inject_data_default_driver_params(self):

    def test_inject_data_adminpass(self):

    def test_inject_data_key(self):

    def test_inject_data_metadata(self):

    def test_inject_data_files(self):

    def test_inject_data_net(self):

class LibvirtVolumeUsageTestCase(test.TestCase):

    def setUp(self):

    def test_get_all_volume_usage(self):

        def fake_block_stats(instance_name, disk):

    def test_get_all_volume_usage_device_not_found(self):

        def fake_lookup(instance_name):

class LibvirtNonblockingTestCase(test.TestCase):

    def setUp(self):

    def test_connection_to_primitive(self):

    def test_tpool_execute_calls_libvirt(self):

class LibvirtVolumeSnapshotTestCase(test.TestCase):

    def setUp(self):

    def tearDown(self):

    def test_volume_snapshot_create(self, quiesce=True):

    def test_volume_snapshot_create_noquiesce(self):

    def test_volume_snapshot_create_outer_success(self):

    def test_volume_snapshot_create_outer_failure(self):

    def test_volume_snapshot_delete_1(self):

    def test_volume_snapshot_delete_2(self):

    def test_volume_snapshot_delete_outer_success(self):

    def test_volume_snapshot_delete_outer_failure(self):

    def test_volume_snapshot_delete_invalid_type(self):

\OpenStack\nova-2014.1\nova\tests\virt\libvirt\test_libvirt_blockinfo.py

class LibvirtBlockInfoTest(test.TestCase):

    def setUp(self):

    def test_volume_in_mapping(self):

        def _assert_volume_in_mapping(device_name, true_or_false):

    def test_find_disk_dev(self):

    def test_get_next_disk_dev(self):

    def test_get_next_disk_dev_boot_index(self):

    def test_get_disk_mapping_simple(self):

    def test_get_disk_mapping_simple_rootdev(self):

    def test_get_disk_mapping_rescue(self):

    def test_get_disk_mapping_lxc(self):

    def test_get_disk_mapping_simple_iso(self):

    def test_get_disk_mapping_simple_swap(self):

    def test_get_disk_mapping_simple_configdrive(self):

    def test_get_disk_mapping_cdrom_configdrive(self):

    def test_get_disk_mapping_disk_configdrive(self):

    def test_get_disk_mapping_ephemeral(self):

    def test_get_disk_mapping_custom_swap(self):

    def test_get_disk_mapping_blockdev_root(self):

    def test_get_disk_mapping_blockdev_eph(self):

    def test_get_disk_mapping_blockdev_many(self):

    def test_get_disk_mapping_complex(self):

    def test_get_disk_mapping_updates_original(self):

    def test_get_disk_bus(self):

    def test_success_get_disk_bus_for_disk_dev(self):

    def test_fail_get_disk_bus_for_disk_dev(self):

    def test_get_config_drive_type_default(self):

    def test_get_config_drive_type_cdrom(self):

    def test_get_config_drive_type_disk(self):

    def test_get_config_drive_type_improper_value(self):

    def test_get_info_from_bdm(self):

    def test_get_device_name(self):

    def test_get_root_info_no_bdm(self, mock_get_bus, mock_find_dev):

    def test_get_root_info_bdm(self, mock_get_info):

    def test_get_boot_order_simple(self):

    def test_get_boot_order_complex(self):

    def test_get_boot_order_overlapping(self):

class DefaultDeviceNamesTestCase(test.TestCase):

    def setUp(self):

    def tearDown(self):

    def _test_default_device_names(self, *block_device_lists):

    def test_only_block_device_mapping(self):

    def test_with_ephemerals(self):

    def test_with_swap(self):

    def test_all_together(self):

\OpenStack\nova-2014.1\nova\tests\virt\libvirt\test_libvirt_config.py

class LibvirtConfigBaseTest(test.NoDBTestCase):

    def assertXmlEqual(self, expectedXmlstr, actualXmlstr):

class LibvirtConfigTest(LibvirtConfigBaseTest):

    def test_config_plain(self):

    def test_config_ns(self):

    def test_config_text(self):

    def test_config_parse(self):

class LibvirtConfigCapsTest(LibvirtConfigBaseTest):

    def test_config_host(self):

class LibvirtConfigGuestTimerTest(LibvirtConfigBaseTest):

    def test_config_platform(self):

    def test_config_pit(self):

    def test_config_hpet(self):

class LibvirtConfigGuestClockTest(LibvirtConfigBaseTest):

    def test_config_utc(self):

    def test_config_localtime(self):

    def test_config_timezone(self):

    def test_config_variable(self):

    def test_config_timers(self):

class LibvirtConfigCPUFeatureTest(LibvirtConfigBaseTest):

    def test_config_simple(self):

class LibvirtConfigGuestCPUFeatureTest(LibvirtConfigBaseTest):

    def test_config_simple(self):

class LibvirtConfigCPUTest(LibvirtConfigBaseTest):

    def test_config_simple(self):

    def test_config_complex(self):

    def test_config_topology(self):

class LibvirtConfigGuestCPUTest(LibvirtConfigBaseTest):

    def test_config_simple(self):

    def test_config_complex(self):

    def test_config_host(self):

class LibvirtConfigGuestSMBIOSTest(LibvirtConfigBaseTest):

    def test_config_simple(self):

class LibvirtConfigGuestSysinfoTest(LibvirtConfigBaseTest):

    def test_config_simple(self):

    def test_config_bios(self):

    def test_config_system(self):

    def test_config_mixed(self):

class LibvirtConfigGuestDiskTest(LibvirtConfigBaseTest):

    def test_config_file(self):

    def test_config_file_parse(self):

    def test_config_file_serial(self):

    def test_config_file_serial_parse(self):

    def test_config_block(self):

    def test_config_block_parse(self):

    def test_config_network(self):

    def test_config_network_parse(self):

    def test_config_network_no_name(self):

    def test_config_network_multihost(self):

    def test_config_network_auth(self):

    def test_config_iotune(self):

    def test_config_blockio(self):

class LibvirtConfigGuestSnapshotDiskTest(LibvirtConfigBaseTest):

    def test_config_file(self):

    def test_config_file_parse(self):

class LibvirtConfigGuestFilesysTest(LibvirtConfigBaseTest):

    def test_config_mount(self):

class LibvirtConfigGuestInputTest(LibvirtConfigBaseTest):

    def test_config_tablet(self):

class LibvirtConfigGuestGraphicsTest(LibvirtConfigBaseTest):

    def test_config_graphics(self):

class LibvirtConfigGuestHostdev(LibvirtConfigBaseTest):

    def test_config_pci_guest_host_dev(self):

    def test_parse_GuestHostdev(self):

    def test_parse_GuestHostdev_non_pci(self):

class LibvirtConfigGuestHostdevPCI(LibvirtConfigBaseTest):

    def test_config_guest_hosdev_pci(self):

    def test_parse_guest_hosdev_pci(self):

    def test_parse_guest_hosdev_usb(self):

class LibvirtConfigGuestSerialTest(LibvirtConfigBaseTest):

    def test_config_file(self):

class LibvirtConfigGuestConsoleTest(LibvirtConfigBaseTest):

    def test_config_pty(self):

class LibvirtConfigGuestChannelTest(LibvirtConfigBaseTest):

    def test_config_spice_minimal(self):

    def test_config_spice_full(self):

    def test_config_qga_full(self):

class LibvirtConfigGuestInterfaceTest(LibvirtConfigBaseTest):

    def test_config_ethernet(self):

    def test_config_bridge(self):

    def test_config_bridge_ovs(self):

    def test_config_8021Qbh(self):

    def test_config_direct(self):

class LibvirtConfigGuestTest(LibvirtConfigBaseTest):

    def test_config_lxc(self):

    def test_config_xen_pv(self):

    def test_config_xen_hvm(self):

    def test_config_kvm(self):

    def test_config_machine_type(self):

    def test_ConfigGuest_parse_devices(self):

    def test_ConfigGuest_parse_devices_wrong_type(self):

    def test_ConfigGuest_parese_cpu(self):

class LibvirtConfigGuestSnapshotTest(LibvirtConfigBaseTest):

    def test_config_snapshot(self):

    def test_config_snapshot_with_disks(self):

class LibvirtConfigNodeDeviceTest(LibvirtConfigBaseTest):

    def test_config_virt_usb_device(self):

    def test_config_virt_device(self):

    def test_config_phy_device(self):

    def test_config_non_device(self):

    def test_config_fail_device(self):

    def test_config_2cap_device(self):

class LibvirtConfigNodeDevicePciCapTest(LibvirtConfigBaseTest):

    def test_config_device_pci_cap(self):

    def test_config_device_pci_2cap(self):

        def test_config_read_only_disk(self):

class LibvirtConfigNodeDevicePciSubFunctionCap(LibvirtConfigBaseTest):

    def test_config_device_pci_subfunction(self):

class LibvirtConfigGuestVideoTest(LibvirtConfigBaseTest):

    def test_config_video_driver(self):

    def test_config_video_driver_vram_heads(self):

class LibvirtConfigGuestSeclabel(LibvirtConfigBaseTest):

    def test_config_seclabel_config(self):

    def test_config_seclabel_baselabel(self):

class LibvirtConfigGuestRngTest(LibvirtConfigBaseTest):

    def test_config_rng_driver(self):

    def test_config_rng_driver_with_rate(self):

class LibvirtConfigGuestControllerTest(LibvirtConfigBaseTest):

    def test_config_guest_contoller(self):

class LibvirtConfigGuestWatchdogTest(LibvirtConfigBaseTest):

    def test_config_watchdog(self):

    def test_config_watchdog_default_action(self):

\OpenStack\nova-2014.1\nova\tests\virt\libvirt\test_libvirt_utils.py

class LibvirtUtilsTestCase(test.NoDBTestCase):

    def test_get_disk_type(self):

    def test_logical_volume_size(self):

        def fake_execute(*cmd, **kwargs):

    def test_lvm_clear(self):

        def fake_lvm_size(path):

        def fake_execute(*cmd, **kwargs):

    def test_list_rbd_volumes(self):

    def test_remove_rbd_volumes(self):

    def test_copy_image_local_cp(self, mock_execute):

    def test_copy_image_rsync(self, mock_execute):

    def test_copy_image_scp(self, mock_execute):

\OpenStack\nova-2014.1\nova\tests\virt\libvirt\test_libvirt_vif.py

class LibvirtVifTestCase(test.TestCase):

    def setUp(self):

        def fake_execute(*cmd, **kwargs):

    def _get_conn(self, uri="qemu:

        def __inner():

    def _get_node(self, xml):

    def _assertMacEquals(self, node, vif):

    def _assertTypeEquals(self, node, type, attr, source, br_want, prefix=None):

    def _assertTypeAndMacEquals(self, node, type, attr, source, vif, br_want=None, size=0, prefix=None):

    def _assertModel(self, xml, model_want=None, driver_want=None):

    def _get_conf(self):

    def _get_instance_xml(self, driver, vif, image_meta=None):

    def test_multiple_nics(self):

    def test_model_novirtio(self):

    def test_model_kvm(self):

    def test_model_kvm_custom(self):

    def test_model_kvm_bogus(self):

    def _test_model_qemu(self, *vif_objs, **kw):

    def test_model_qemu_no_firewall(self):

    def test_model_qemu_iptables(self):

    def test_model_xen(self):

    def test_generic_driver_none(self):

    def _check_bridge_driver(self, d, vif, br_want):

    def test_generic_driver_bridge(self):

    def _check_ivs_ethernet_driver(self, d, vif, dev_prefix):

    def _check_ovs_ethernet_driver(self, d, vif, dev_prefix):

    def test_ovs_ethernet_driver(self):

    def test_unplug_ivs_ethernet(self):

    def test_plug_ovs_hybrid(self):

    def test_unplug_ovs_hybrid(self):

    def test_unplug_ovs_hybrid_bridge_does_not_exist(self):

    def test_plug_ivs_hybrid(self):

    def test_unplug_ivs_hybrid(self):

    def test_unplug_ivs_hybrid_bridge_does_not_exist(self):

    def test_unplug_iovisor(self):

    def test_plug_iovisor(self, device_exists):

    def test_ivs_ethernet_driver(self):

    def _check_ivs_virtualport_driver(self, d, vif, want_iface_id):

    def _check_ovs_virtualport_driver(self, d, vif, want_iface_id):

    def test_generic_ovs_virtualport_driver(self):

    def test_generic_ivs_virtualport_driver(self):

    def test_hybrid_plug_without_nova_firewall(self):

    def test_direct_plug_with_port_filter_cap_no_nova_firewall(self):

    def _check_neutron_hybrid_driver(self, d, vif, br_want):

    def test_generic_hybrid_driver(self):

    def test_ivs_hybrid_driver(self):

    def test_mlnx_direct_vif_driver(self):

    def test_midonet_ethernet_vif_driver(self):

    def test_generic_8021qbh_driver(self):

    def test_generic_iovisor_driver(self):

    def test_generic_8021qbg_driver(self):

\OpenStack\nova-2014.1\nova\tests\virt\libvirt\test_libvirt_volume.py

class LibvirtVolumeTestCase(test.NoDBTestCase):

    def setUp(self):

        def fake_execute(*cmd, **kwargs):

    def _assertNetworkAndProtocolEquals(self, tree):

    def _assertFileTypeEquals(self, tree, file_path):

    def _assertDiskInfoEquals(self, tree, disk_info):

    def _test_libvirt_volume_driver_disk_info(self):

    def test_libvirt_volume_disk_info_type(self):

    def test_libvirt_volume_disk_info_dev(self):

    def test_libvirt_volume_disk_info_bus(self):

    def test_libvirt_volume_driver_serial(self):

    def test_libvirt_volume_driver_blockio(self):

    def test_libvirt_volume_driver_iotune(self):

    def test_libvirt_volume_driver_readonly(self):

    def iscsi_connection(self, volume, location, iqn):

    def test_libvirt_iscsi_driver(self):

    def test_libvirt_iscsi_driver_still_in_use(self):

    def iser_connection(self, volume, location, iqn):

    def sheepdog_connection(self, volume):

    def test_libvirt_sheepdog_driver(self):

    def rbd_connection(self, volume):

    def test_libvirt_rbd_driver(self):

    def test_libvirt_rbd_driver_hosts(self):

    def test_libvirt_rbd_driver_auth_enabled(self):

    def test_libvirt_rbd_driver_auth_enabled_flags_override(self):

    def test_libvirt_rbd_driver_auth_disabled(self):

    def test_libvirt_rbd_driver_auth_disabled_flags_override(self):

    def test_libvirt_kvm_volume(self):

    def test_libvirt_kvm_volume_with_multipath(self):

    def test_libvirt_kvm_volume_with_multipath_still_in_use(self):

        def _get_multipath_device_name(path):

    def test_libvirt_kvm_volume_with_multipath_getmpdev(self):

    def test_libvirt_kvm_iser_volume_with_multipath(self):

    def test_libvirt_kvm_iser_volume_with_multipath_getmpdev(self):

    def test_libvirt_nfs_driver(self):

    def test_libvirt_nfs_driver_already_mounted(self):

    def test_libvirt_nfs_driver_with_opts(self):

    def aoe_connection(self, shelf, lun):

    def test_libvirt_aoe_driver(self):

    def test_libvirt_glusterfs_driver(self):

    def test_libvirt_glusterfs_driver_already_mounted(self):

    def test_libvirt_glusterfs_driver_qcow2(self):

    def test_libvirt_glusterfs_driver_with_opts(self):

    def test_libvirt_glusterfs_libgfapi(self):

    def fibrechan_connection(self, volume, location, wwn):

    def test_libvirt_fibrechan_driver(self):

    def test_libvirt_fibrechan_getpci_num(self):

    def test_libvirt_scality_driver(self):

        def _access_wrapper(path, flags):

\OpenStack\nova-2014.1\nova\tests\virt\libvirt\__init__.py

\OpenStack\nova-2014.1\nova\tests\virt\test_block_device.py

class TestDriverBlockDevice(test.NoDBTestCase):

    def setUp(self):

    def test_no_device_raises(self):

OpenStack Index

Previous

Next