OpenStack Study: nova
OpenStack IndexPreviousNext
def _test_driver_device(self, name):
def _test_driver_default_size(self, name):
def test_driver_swap_block_device(self):
def test_driver_swap_default_size(self):
def test_driver_ephemeral_block_device(self):
def test_driver_ephemeral_default_size(self):
def test_driver_volume_block_device(self):
def test_driver_snapshot_block_device(self):
def test_driver_image_block_device(self):
def test_driver_image_block_device_destination_local(self):
def _test_volume_attach(self, driver_bdm, bdm_dict, fake_volume, check_attach=True, fail_check_attach=False, driver_attach=False, fail_driver_attach=False):
def test_volume_attach(self):
def check_volume_attach_check_attach_fails(self):
def test_volume_attach_no_check_driver_attach(self):
def check_volume_attach_driver_attach_fails(self):
def test_refresh_connection(self):
def test_snapshot_attach_no_volume(self):
def test_snapshot_attach_volume(self):
def test_image_attach_no_volume(self):
def test_image_attach_volume(self):
def test_convert_block_devices(self):
def test_legacy_block_devices(self):
def test_get_swap(self):
def test_is_implemented(self):
\OpenStack\nova-2014.1\nova\tests\virt\test_cpu.py
class CpuSetTestCase(test.NoDBTestCase):
def test_get_cpuset_ids_none_returns_none(self):
def test_get_cpuset_ids_valid_syntax_works(self):
def test_get_cpuset_ids_invalid_syntax_raises(self):
\OpenStack\nova-2014.1\nova\tests\virt\test_driver.py
class FakeDriver(object):
def __init__(self, *args, **kwargs):
class FakeDriver2(FakeDriver):
class ToDriverRegistryTestCase(test.NoDBTestCase):
def assertDriverInstance(self, inst, class_, *args, **kwargs):
def test_driver_dict_from_config(self):
\OpenStack\nova-2014.1\nova\tests\virt\test_imagecache.py
class ImageCacheManagerTests(test.NoDBTestCase):
def test_configurationi_defaults(self):
def test_cache_manager(self):
def test_list_running_instances(self):
def test_list_resizing_instances(self):
\OpenStack\nova-2014.1\nova\tests\virt\test_images.py
class QemuTestCase(test.NoDBTestCase):
def test_qemu_info_with_bad_path(self):
\OpenStack\nova-2014.1\nova\tests\virt\test_virt.py
class TestVirtDriver(test.NoDBTestCase):
def test_block_device(self):
def test_swap_is_usable(self):
class FakeMount(object):
def __init__(self, image, mount_dir, partition=None, device=None):
def do_mount(self):
def do_umount(self):
def do_teardown(self):
class TestDiskImage(test.NoDBTestCase):
def setUp(self):
def mock_proc_mounts(self, mock_open):
def test_mount(self, mock_open):
def fake_instance_for_format(imgfile, mountdir, partition, imgfmt):
def test_umount(self, mock_open):
def fake_instance_for_format(imgfile, mountdir, partition, imgfmt):
def test_teardown(self, mock_open):
def fake_instance_for_format(imgfile, mountdir, partition, imgfmt):
class TestVirtDisk(test.NoDBTestCase):
def setUp(self):
def fake_execute(*cmd, **kwargs):
def test_lxc_setup_container(self):
def proc_mounts(self, mount_point):
def fake_instance_for_format(imgfile, mountdir, partition, imgfmt):
def test_lxc_teardown_container(self):
def proc_mounts(self, mount_point):
def test_lxc_teardown_container_with_namespace_cleaned(self):
def proc_mounts(self, mount_point):
\OpenStack\nova-2014.1\nova\tests\virt\test_virt_disk.py
class VirtDiskTest(test.NoDBTestCase):
def setUp(self):
def test_inject_data(self):
def fake_stat(arg):
def test_inject_data_key(self):
def test_inject_data_key_with_selinux(self):
def test_inject_data_key_with_selinux_append_with_newline(self):
def test_inject_net(self):
def test_inject_metadata(self):
def test_inject_admin_password(self):
def fake_salt():
def test_inject_files_into_fs(self):
def test_inject_files_into_fs_dir_exists(self):
def fake_has_file(*args, **kwargs):
def fake_make_path(*args, **kwargs):
\OpenStack\nova-2014.1\nova\tests\virt\test_virt_disk_vfs_guestfs.py
class VirtDiskVFSGuestFSTest(test.NoDBTestCase):
def setUp(self):
def test_appliance_setup_inspect(self):
def test_appliance_setup_inspect_no_root_raises(self):
def fake_inspect_os():
def test_appliance_setup_inspect_multi_boots_raises(self):
def fake_inspect_os():
def test_appliance_setup_static_nopart(self):
def test_appliance_setup_static_part(self):
def test_makepath(self):
def test_append_file(self):
def test_replace_file(self):
def test_read_file(self):
def test_has_file(self):
def test_set_permissions(self):
def test_set_ownership(self):
def test_close_on_error(self):
\OpenStack\nova-2014.1\nova\tests\virt\test_virt_disk_vfs_localfs.py
def fake_execute(*args, **kwargs):
class VirtDiskVFSLocalFSTestPaths(test.NoDBTestCase):
def setUp(self):
def nonroot_execute(*cmd_parts, **kwargs):
def test_check_safe_path(self):
def test_check_unsafe_path(self):
class VirtDiskVFSLocalFSTest(test.NoDBTestCase):
def test_makepath(self):
def test_append_file(self):
def test_replace_file(self):
def test_read_file(self):
def test_has_file(self):
def test_set_permissions(self):
def test_set_ownership(self):
\OpenStack\nova-2014.1\nova\tests\virt\test_virt_drivers.py
def catch_notimplementederror(f):
def wrapped_func(self, *args, **kwargs):
class _FakeDriverBackendTestCase(object):
def _setup_fakelibvirt(self):
def fake_extend(image, size):
def fake_migrateToURI(*a):
def fake_make_drive(_self, _path):
def fake_get_instance_disk_info(_self, instance, xml=None, block_device_info=None):
def fake_delete_instance_files(_self, _instance):
def _teardown_fakelibvirt(self):
def setUp(self):
def tearDown(self):
class VirtDriverLoaderTestCase(_FakeDriverBackendTestCase, test.TestCase):
def test_load_new_drivers(self):
def test_fail_to_load_new_drivers(self):
def _fake_exit(error):
class _VirtDriverTestCase(_FakeDriverBackendTestCase):
def setUp(self):
def _get_running_instance(self, obj=False):
def test_init_host(self):
def test_list_instances(self):
def test_list_instance_uuids(self):
def test_spawn(self):
def test_snapshot_not_running(self):
def test_snapshot_running(self):
def test_reboot(self):
def test_get_host_ip_addr(self):
def test_set_admin_password(self):
def test_inject_file(self):
def test_resume_state_on_host_boot(self):
def test_rescue(self):
def test_unrescue_unrescued_instance(self):
def test_unrescue_rescued_instance(self):
def test_poll_rebooting_instances(self):
def test_migrate_disk_and_power_off(self):
def test_power_off(self):
def test_power_on_running(self):
def test_power_on_powered_off(self):
def test_soft_delete(self):
def test_restore_running(self):
def test_restore_soft_deleted(self):
def test_pause(self):
def test_unpause_unpaused_instance(self):
def test_unpause_paused_instance(self):
def test_suspend(self):
def test_resume_unsuspended_instance(self):
def test_resume_suspended_instance(self):
def test_destroy_instance_nonexistent(self):
def test_destroy_instance(self):
def test_get_volume_connector(self):
def test_attach_detach_volume(self):
def test_swap_volume(self):
def test_attach_detach_different_power_states(self):
def test_get_info(self):
def test_get_info_for_unknown_instance(self):
def test_get_diagnostics(self):
def test_block_stats(self):
def test_interface_stats(self):
def test_get_console_output(self):
def test_get_vnc_console(self):
def test_get_spice_console(self):
def test_get_rdp_console(self):
def test_get_console_pool_info(self):
def test_refresh_security_group_rules(self):
def test_refresh_security_group_members(self):
def test_refresh_instance_security_rules(self):
def test_refresh_provider_fw_rules(self):
def test_ensure_filtering_for_instance(self):
def test_unfilter_instance(self):
def test_live_migration(self):
def _check_available_resource_fields(self, host_status):
def test_get_host_stats(self):
def test_get_available_resource(self):
def _check_host_cpu_status_fields(self, host_cpu_status):
def test_get_host_cpu_stats(self):
def test_set_host_enabled(self):
def test_get_host_uptime(self):
def test_host_power_action_reboot(self):
def test_host_power_action_shutdown(self):
def test_host_power_action_startup(self):
def test_add_to_aggregate(self):
def test_remove_from_aggregate(self):
def test_events(self):
def handler(event):
def test_event_bad_object(self):
def handler(event):
def test_event_bad_callback(self):
def handler(event):
def test_set_bootable(self):
class AbstractDriverTestCase(_VirtDriverTestCase, test.TestCase):
def setUp(self):
class FakeConnectionTestCase(_VirtDriverTestCase, test.TestCase):
def setUp(self):
def _check_available_resource_fields(self, host_status):
class LibvirtConnTestCase(_VirtDriverTestCase, test.TestCase):
def setUp(self):
def _fake_admin_context(self, *args, **kwargs):
def test_force_hard_reboot(self):
def test_migrate_disk_and_power_off(self):
def test_internal_set_host_enabled(self):
def test_set_host_enabled_when_auto_disabled(self):
def test_set_host_enabled_when_manually_disabled(self):
def test_set_host_enabled_dont_override_manually_disabled(self):
\OpenStack\nova-2014.1\nova\tests\virt\test_volumeutils.py
class VolumeUtilsTestCase(test.TestCase):
def test_get_iscsi_initiator(self):
def test_get_missing_iscsi_initiator(self):
\OpenStack\nova-2014.1\nova\tests\virt\vmwareapi\stubs.py
def fake_get_vim_object(arg):
def fake_is_vim_object(arg, module):
def fake_temp_method_exception():
def fake_temp_session_exception():
def fake_session_file_exception():
def set_stubs(stubs):
def fake_suds_context(calls={}):
\OpenStack\nova-2014.1\nova\tests\virt\vmwareapi\test_configdrive.py
class ConfigDriveTestCase(test.NoDBTestCase):
def setUp(self):
def fake_make_drive(_self, _path):
def fake_upload_iso_to_datastore(iso_path, instance, **kwargs):
def tearDown(self):
def _spawn_vm(self, injected_files=[], admin_password=None, block_device_info=None):
def test_create_vm_with_config_drive_verify_method_invocation(self):
def test_create_vm_without_config_drive(self):
def test_create_vm_with_config_drive(self):
\OpenStack\nova-2014.1\nova\tests\virt\vmwareapi\test_driver_api.py
class fake_vm_ref(object):
def __init__(self):
class fake_service_content(object):
def __init__(self):
class VMwareSudsTest(test.NoDBTestCase):
def setUp(self):
def new_client_init(self, url, **kwargs):
def _vim_create(self):
def fake_retrieve_service_content(fake):
def test_exception_with_deepcopy(self):
class VMwareSessionTestCase(test.NoDBTestCase):
def _fake_is_vim_object(self, module):
def test_call_method_vim_fault(self, mock_sleep):
def _fake_create_session(self):
def _fake_session_is_active(self):
def test_call_method_vim_empty(self):
def _fake_create_session(self):
def _fake_session_is_active(self):
def test_call_method_session_exception(self, mock_sleep):
def _fake_create_session(self):
def test_call_method_session_file_exists_exception(self):
def _fake_create_session(self):
class VMwareAPIConfTestCase(test.NoDBTestCase):
def setUp(self):
def tearDown(self):
def test_configure_without_wsdl_loc_override(self):
def test_configure_without_wsdl_loc_override_using_ipv6(self):
def test_configure_with_wsdl_loc_override(self):
class VMwareAPIVMTestCase(test.NoDBTestCase):
def setUp(self):
def tearDown(self):
def _set_exception_vars(self):
def test_driver_capabilities(self):
def test_login_retries(self):
def _fake_login(_self):
def _fake_check_session(_self):
def test_wait_for_task_exception(self):
def _fake_login(_self):
def fake_poll_task(task_ref, done):
def fake_stop_loop(loop):
def _get_instance_type_by_name(self, type):
def _create_instance(self, node=None, set_image_ref=True, uuid=None, instance_type='m1.large'):
def _create_vm(self, node=None, num_instances=1, uuid=None, instance_type='m1.large'):
def _check_vm_record(self, num_instances=1):
def _check_vm_info(self, info, pwr_state=power_state.RUNNING):
def test_list_instances(self):
def test_list_instances_1(self):
def test_list_instance_uuids(self):
def test_list_instance_uuids_invalid_uuid(self):
def _cached_files_exist(self, exists=True):
def test_instance_dir_disk_created(self):
def test_cache_dir_disk_created(self):
def _iso_disk_type_created(self, instance_type='m1.large'):
def test_iso_disk_type_created(self):
def test_iso_disk_type_created_with_root_gb_0(self):
def test_iso_disk_cdrom_attach(self):
def fake_attach_cdrom(vm_ref, instance, data_store_ref, iso_uploaded_path):
def test_iso_disk_cdrom_attach_with_config_drive(self):
def fake_create_config_drive(instance, injected_files, password, data_store_name, folder, uuid, cookies):
def fake_attach_cdrom(vm_ref, instance, data_store_ref, iso_uploaded_path):
def test_cdrom_attach_with_config_drive(self):
def fake_create_config_drive(instance, injected_files, password, data_store_name, folder, uuid, cookies):
def fake_attach_cdrom(vm_ref, instance, data_store_ref, iso_uploaded_path):
def test_spawn(self):
def _spawn_with_delete_exception(self, fault=None):
def fake_call_method(module, method, *args, **kwargs):
def test_spawn_with_delete_exception_not_found(self):
def test_spawn_with_delete_exception_file_fault(self):
def test_spawn_with_delete_exception_cannot_delete_file(self):
def test_spawn_with_delete_exception_file_locked(self):
def test_spawn_with_delete_exception_general(self):
def test_spawn_disk_extend(self):
def test_spawn_disk_extend_exists(self):
def _fake_extend(instance, requested_size, name, dc_ref):
def test_spawn_disk_extend_sparse(self):
def test_spawn_disk_extend_insufficient_disk_space(self):
def fake_wait_for_task(task_ref):
def fake_call_method(module, method, *args, **kwargs):
def test_spawn_disk_invalid_disk_size(self):
def test_spawn_invalid_disk_format(self):
def test_spawn_with_move_file_exists_exception(self):
def fake_wait_for_task(task_ref):
def fake_call_method(module, method, *args, **kwargs):
def test_spawn_with_move_general_exception(self):
def fake_wait_for_task(task_ref):
def fake_call_method(module, method, *args, **kwargs):
def test_spawn_with_move_poll_exception(self):
def fake_call_method(module, method, *args, **kwargs):
def test_spawn_with_move_file_exists_poll_exception(self):
def fake_call_method(module, method, *args, **kwargs):
def _spawn_attach_volume_vmdk(self, set_image_ref=True, vc_support=False):
def test_spawn_attach_volume_vmdk(self):
def test_spawn_attach_volume_vmdk_no_image_ref(self):
def test_spawn_attach_volume_iscsi(self):
def mock_upload_image(self, context, image, instance, **kwargs):
def test_get_vm_ref_using_extra_config(self):
def test_search_vm_ref_by_identifier(self):
def test_get_object_for_optionvalue(self):
def _test_snapshot(self):
def test_snapshot(self):
def test_snapshot_non_existent(self):
def test_snapshot_delete_vm_snapshot(self):
def test_reboot(self):
def test_reboot_with_uuid(self):
def test_reboot_non_existent(self):
def test_poll_rebooting_instances(self):
def test_reboot_not_poweredon(self):
def test_suspend(self):
def test_suspend_non_existent(self):
def test_resume(self):
def test_resume_non_existent(self):
def test_resume_not_suspended(self):
def test_power_on(self):
def test_power_on_non_existent(self):
def test_power_off(self):
def test_power_off_non_existent(self):
def test_power_off_suspended(self):
def test_resume_state_on_host_boot(self):
def test_resume_state_on_host_boot_no_reboot_1(self):
def test_resume_state_on_host_boot_no_reboot_2(self):
def test_get_info(self):
def test_destroy(self):
def test_destroy_no_datastore(self):
def test_destroy_non_existent(self):
def _rescue(self, config_drive=False):
def fake_attach_disk_to_vm(vm_ref, instance, adapter_type, disk_type, vmdk_path=None, disk_size=None, linked_clone=False, controller_key=None, unit_number=None, device_name=None):
def test_rescue(self):
def test_rescue_with_config_drive(self):
def test_unrescue(self):
def fake_detach_disk_from_vm(*args, **kwargs):
def test_pause(self):
def test_unpause(self):
def test_get_diagnostics(self):
def test_get_console_output(self):
def _test_finish_migration(self, power_on, resize_instance=False):
def fake_power_on(instance):
def fake_vmops_update_instance_progress(context, instance, step, total_steps):
def test_finish_migration_power_on(self):
def test_finish_migration_power_off(self):
def test_confirm_migration(self):
def _test_finish_revert_migration(self, power_on):
def fake_power_on(instance):
def fake_get_orig_vm_name_label(instance):
def fake_get_vm_ref_from_name(session, vm_name):
def fake_get_vm_ref_from_uuid(session, vm_uuid):
def fake_call_method(*args, **kwargs):
def fake_wait_for_task(*args, **kwargs):
def test_finish_revert_migration_power_on(self):
def test_finish_revert_migration_power_off(self):
def test_get_console_pool_info(self):
def test_get_vnc_console_non_existent(self):
def _test_get_vnc_console(self):
def test_get_vnc_console(self):
def test_get_vnc_console_noport(self):
def test_host_ip_addr(self):
def test_get_volume_connector(self):
def _test_vmdk_connection_info(self, type):
def test_volume_attach_vmdk(self):
def test_volume_detach_vmdk(self):
def test_attach_vmdk_disk_to_vm(self):
def test_detach_vmdk_disk_from_vm(self):
def test_volume_attach_iscsi(self):
def test_volume_detach_iscsi(self):
def test_attach_iscsi_disk_to_vm(self):
def test_rescan_iscsi_hba(self):
def test_find_st(self):
def test_detach_iscsi_disk_from_vm(self):
def test_connection_info_get(self):
def test_connection_info_get_after_destroy(self):
def test_refresh_instance_security_rules(self):
def test_image_aging_image_used(self):
def _get_timestamp_filename(self):
def _override_time(self):
def _fake_get_timestamp_filename(fake):
def _timestamp_file_exists(self, exists=True):
def _image_aging_image_marked_for_deletion(self):
def test_image_aging_image_marked_for_deletion(self):
def _timestamp_file_removed(self):
def test_timestamp_file_removed_spawn(self):
def test_timestamp_file_removed_aging(self):
def test_image_aging_disabled(self):
def _image_aging_aged(self, aging_time=100):
def test_image_aging_aged(self):
def test_image_aging_not_aged(self):
class VMwareAPIHostTestCase(test.NoDBTestCase):
def setUp(self):
def tearDown(self):
def test_host_state(self):
def _test_host_action(self, method, action, expected=None):
def test_host_reboot(self):
def test_host_shutdown(self):
def test_host_startup(self):
def test_host_maintenance_on(self):
def test_host_maintenance_off(self):
def test_get_host_uptime(self):
class VMwareAPIVCDriverTestCase(VMwareAPIVMTestCase):
def setUp(self):
def tearDown(self):
def test_list_instances(self):
def test_list_instances_from_nodes(self):
def _setup_mocks_for_session(self, mock_init):
def test_init_host_and_cleanup_host(self, mock_init):
def test_cleanup_host_with_no_login(self, mock_init, mock_logger):
def test_host_power_action(self):
def test_host_maintenance_mode(self):
def test_set_host_enabled(self):
def test_datastore_regex_configured(self):
def test_get_available_resource(self):
def test_invalid_datastore_regex(self):
def test_get_available_nodes(self):
def test_spawn_multiple_node(self):
def fake_is_neutron():
def test_finish_migration_power_on(self):
def test_finish_migration_power_off(self):
def test_finish_migration_power_on_resize(self):
def test_finish_revert_migration_power_on(self):
def test_finish_revert_migration_power_off(self):
def test_snapshot(self):
def test_snapshot_using_file_manager(self):
def test_spawn_invalid_node(self):
def test_spawn_with_sparse_image(self):
def test_plug_vifs(self):
def test_unplug_vifs(self):
def test_migrate_disk_and_power_off(self):
def fake_update_instance_progress(context, instance, step, total_steps):
def fake_get_host_ref_from_name(dest):
def test_disassociate_vmref_from_instance(self):
def test_clone_vmref_for_instance(self):
def test_associate_vmref_for_instance(self):
def test_confirm_migration(self):
def test_spawn_attach_volume_vmdk(self):
def test_spawn_attach_volume_vmdk_no_image_ref(self):
def test_pause(self):
def test_unpause(self):
def test_datastore_dc_map(self):
def test_rollback_live_migration_at_destination(self):
\OpenStack\nova-2014.1\nova\tests\virt\vmwareapi\test_ds_util.py
class fake_session(object):
def __init__(self, ret=None):
def _get_vim(self):
def _call_method(self, module, method, *args, **kwargs):
def _wait_for_task(self, task_ref):
class DsUtilTestCase(test.NoDBTestCase):
def setUp(self):
def tearDown(self):
def test_build_datastore_path(self):
def test_split_datastore_path(self):
def test_file_delete(self):
def fake_call_method(module, method, *args, **kwargs):
def test_file_move(self):
def fake_call_method(module, method, *args, **kwargs):
def test_mkdir(self):
def fake_call_method(module, method, *args, **kwargs):
def test_file_exists(self):
def fake_call_method(module, method, *args, **kwargs):
def test_file_exists_fails(self):
def fake_call_method(module, method, *args, **kwargs):
\OpenStack\nova-2014.1\nova\tests\virt\vmwareapi\test_error_util.py
class ErrorUtilTestCase(test.NoDBTestCase):
def setUp(self):
def test_fault_checker_empty_response(self):
def test_fault_checker_missing_props(self):
def test_fault_checker_no_missing_props(self):
def test_exception_summary_exception_as_list(self):
def test_exception_summary_string(self):
def test_vim_fault_exception_string(self):
def test_vim_fault_exception(self):
\OpenStack\nova-2014.1\nova\tests\virt\vmwareapi\test_imagecache.py
class ImageCacheManagerTestCase(test.NoDBTestCase):
def setUp(self):
def tearDown(self):
def test_timestamp_cleanup(self):
def fake_get_timestamp(ds_browser, ds_path):
def test_get_timestamp(self):
def fake_get_sub_folders(session, ds_browser, ds_path):
def test_get_timestamp_filename(self):
def test_get_datetime_from_filename(self):
def test_get_ds_browser(self):
def fake_get_dynamic_property(vim, mobj, type, property_name):
def test_list_base_images(self):
def fake_get_dynamic_property(vim, mobj, type, property_name):
def fake_get_sub_folders(session, ds_browser, ds_path):
def test_age_cached_images(self):
def fake_get_ds_browser(ds_ref):
def fake_get_timestamp(ds_browser, path):
def fake_mkdir(session, ts_path, dc_ref):
def fake_file_delete(session, path, dc_ref):
def fake_timestamp_cleanup(dc_ref, ds_browser, ds_ref, ds_name, path):
def test_update(self):
def fake_list_datastore_images(ds_path, datastore):
def fake_age_cached_images(context, datastore, dc_info, ds_path):
\OpenStack\nova-2014.1\nova\tests\virt\vmwareapi\test_read_write_util.py
class ReadWriteUtilTestCase(test.NoDBTestCase):
def setUp(self):
def test_ipv6_host(self):
\OpenStack\nova-2014.1\nova\tests\virt\vmwareapi\test_vif.py
class VMwareVifTestCase(test.NoDBTestCase):
def setUp(self):
def tearDown(self):
def test_ensure_vlan_bridge(self):
def test_ensure_vlan_bridge_without_vlan(self):
def test_ensure_vlan_bridge_with_network(self):
def test_ensure_vlan_bridge_with_existing_dvs(self):
def test_get_network_ref_neutron(self):
def test_get_network_ref_flat_dhcp(self):
def test_get_network_ref_bridge(self):
def test_get_network_ref_bridge(self):
def test_get_network_ref_bridges(self):
def test_get_network_ref_integration(self):
def test_get_network_ref_bridge_none(self):
def test_get_network_ref_integration_multiple(self):
def test_get_neutron_network(self):
def test_get_neutron_network_opaque_network_not_found(self):
def test_get_neutron_network_bridge_network_not_found(self):
def test_create_port_group_already_exists(self):
def fake_call_method(module, method, *args, **kwargs):
def test_create_port_group_exception(self):
def fake_call_method(module, method, *args, **kwargs):
def test_get_neutron_network_invalid_property(self):
def fake_call_method(module, method, *args, **kwargs):
\OpenStack\nova-2014.1\nova\tests\virt\vmwareapi\test_vim_util.py
def _fake_get_object_properties(vim, collector, mobj, type, properties):
def _fake_get_object_properties_missing(vim, collector, mobj, type, properties):
class VMwareVIMUtilTestCase(test.NoDBTestCase):
def setUp(self):
def test_get_dynamic_properties_missing(self):
def test_get_dynamic_properties_missing_path_exists(self):
def test_get_dynamic_properties_with_token(self):
def test_get_dynamic_properties_no_objects(self, mock_get_object_props):
def test_get_inner_objects(self):
\OpenStack\nova-2014.1\nova\tests\virt\vmwareapi\test_vmops.py
class VMwareVMOpsTestCase(test.NoDBTestCase):
def setUp(self):
def test_get_disk_format_none(self):
def test_get_disk_format_iso(self):
def test_get_disk_format_bad(self):
def test_get_machine_id_str(self):
def test_is_neutron_nova(self):
def test_is_neutron_neutron(self):
def test_is_neutron_quantum(self):
def test_use_linked_clone_override_nf(self):
def test_use_linked_clone_override_nt(self):
def test_use_linked_clone_override_ny(self):
def test_use_linked_clone_override_ft(self):
def test_use_linked_clone_override_nt(self):
def test_use_linked_clone_override_yf(self):
def _setup_create_folder_mocks(self):
def test_create_folder_if_missing(self):
def test_create_folder_if_missing_exception(self):
def test_check_if_folder_file_exists_with_existing(self, mock_exists):
def test_check_if_folder_file_exists_no_existing(self, mock_exists):
def test_get_valid_vms_from_retrieve_result(self):
def test_get_valid_vms_from_retrieve_result_with_invalid(self):
def test_delete_vm_snapshot(self):
def fake_call_method(module, method, *args, **kwargs):
def test_create_vm_snapshot(self):
def fake_call_method(module, method, *args, **kwargs):
\OpenStack\nova-2014.1\nova\tests\virt\vmwareapi\test_vm_util.py
class fake_session(object):
def __init__(self, *ret):
def _call_method(self, *args):
def _get_vim(self):
class partialObject(object):
def __init__(self, path='fake-path'):
class VMwareVMUtilTestCase(test.NoDBTestCase):
def setUp(self):
def tearDown(self):
def test_get_datastore_ref_and_name(self):
def test_get_datastore_ref_and_name_with_regex(self):
def test_get_stats_from_cluster(self):
def fake_call_method(*args):
def test_get_datastore_ref_and_name_with_token(self):
def test_get_datastore_ref_and_name_with_list(self):
def test_get_datastore_ref_and_name_with_regex_error(self):
def test_get_datastore_ref_and_name_without_datastore(self):
def test_get_host_ref_from_id(self):
def test_get_host_ref_no_hosts_in_cluster(self):
def test_get_datastore_ref_and_name_no_host_in_cluster(self):
def test_get_host_name_for_vm(self, _get_ref_from_uuid):
def test_property_from_property_set(self):
def test_get_datastore_ref_and_name_inaccessible_ds(self):
def test_get_resize_spec(self):
def test_get_cdrom_attach_config_spec(self):
def test_lsilogic_controller_spec(self):
def _vmdk_path_and_adapter_type_devices(self, filename, parent=None):
def test_get_vmdk_path_and_adapter_type(self):
def test_get_vmdk_path_and_adapter_type_with_match(self):
def test_get_vmdk_path_and_adapter_type_with_nomatch(self):
def test_get_vmdk_adapter_type(self):
def test_find_allocated_slots(self):
def test_allocate_controller_key_and_unit_number_ide_default(self):
def test_allocate_controller_key_and_unit_number_ide(self):
def test_allocate_controller_key_and_unit_number_scsi(self):
def _test_get_vnc_config_spec(self, port):
def test_get_vnc_config_spec(self):
def _create_fake_vms(self):
def test_get_vnc_port(self):
def test_get_vnc_port_exhausted(self):
def test_get_all_cluster_refs_by_name_none(self):
def test_get_all_cluster_refs_by_name_exists(self):
def test_get_all_cluster_refs_by_name_missing(self):
def test_propset_dict_simple(self):
def test_propset_dict_complex(self):
def _test_detach_virtual_disk_spec(self, destroy_disk=False):
def test_detach_virtual_disk_spec(self):
def test_detach_virtual_disk_destroy_spec(self):
def test_get_vm_create_spec(self):
\OpenStack\nova-2014.1\nova\tests\virt\vmwareapi\test_vm_util_datastore_selection.py
class VMwareVMUtilDatastoreSelectionTestCase(test.NoDBTestCase):
def setUp(self):
def build_result_set(self, mock_data, name_list=None):
def propset_name_list(self):
def test_filter_datastores_simple(self):
def test_filter_datastores_empty(self):
def test_filter_datastores_no_match(self):
def test_filter_datastores_specific_match(self):
def test_filter_datastores_missing_props(self):
def test_filter_datastores_best_match(self):
\OpenStack\nova-2014.1\nova\tests\virt\vmwareapi\test_volumeops.py
class VMwareVolumeOpsTestCase(test.NoDBTestCase):
def setUp(self):
def _test_detach_disk_from_vm(self, destroy_disk=False):
def fake_call_method(module, method, *args, **kwargs):
def test_detach_with_destroy_disk_from_vm(self):
def test_detach_without_destroy_disk_from_vm(self):
def _fake_call_get_dynamic_property(self, uuid, result):
def fake_call_method(vim, method, vm_ref, type, prop):
def test_get_volume_uuid(self):
def test_get_volume_uuid_not_found(self):
\OpenStack\nova-2014.1\nova\tests\virt\vmwareapi\__init__.py
\OpenStack\nova-2014.1\nova\tests\virt\xenapi\client\test_objects.py
class XenAPISessionObjectTestCase(stubs.XenAPITestBaseNoDB):
def setUp(self):
def test_call_method_via_attr(self):
class ObjectsTestCase(stubs.XenAPITestBaseNoDB):
def setUp(self):
def test_VM(self):
def test_SR(self):
def test_VDI(self):
def test_VBD(self):
def test_PBD(self):
def test_PIF(self):
def test_VLAN(self):
def test_host(self):
def test_network(self):
def test_pool(self):
class VBDTestCase(stubs.XenAPITestBaseNoDB):
def setUp(self):
def test_plug(self):
def test_vbd_plug_check_synchronized(self, mock_synchronized):
def test_unplug(self):
def test_vbd_plug_check_synchronized(self, mock_synchronized):
\OpenStack\nova-2014.1\nova\tests\virt\xenapi\client\test_session.py
class ApplySessionHelpersTestCase(stubs.XenAPITestBaseNoDB):
def setUp(self):
def test_apply_session_helpers_add_VM(self):
def test_apply_session_helpers_add_SR(self):
def test_apply_session_helpers_add_VDI(self):
def test_apply_session_helpers_add_VBD(self):
def test_apply_session_helpers_add_PBD(self):
def test_apply_session_helpers_add_PIF(self):
def test_apply_session_helpers_add_VLAN(self):
def test_apply_session_helpers_add_host(self):
def test_apply_session_helpers_add_host(self):
def test_apply_session_helpers_add_pool(self):
\OpenStack\nova-2014.1\nova\tests\virt\xenapi\client\__init__.py
\OpenStack\nova-2014.1\nova\tests\virt\xenapi\image\test_bittorrent.py
class TestBittorrentStore(stubs.XenAPITestBaseNoDB):
def setUp(self):
def mock_iter_eps(namespace):
def test_download_image(self):
def test_upload_image(self):
def bad_fetcher(instance, image_id):
def another_fetcher(instance, image_id):
class MockEntryPoint(object):
def load(self):
class LookupTorrentURLTestCase(test.NoDBTestCase):
def setUp(self):
def _mock_iter_none(self, namespace):
def _mock_iter_single(self, namespace):
def test_default_fetch_url_no_base_url_set(self):
def test_default_fetch_url_base_url_is_set(self):
def test_with_extension(self):
def test_multiple_extensions_found(self):
def mock_iter_multiple(namespace):
\OpenStack\nova-2014.1\nova\tests\virt\xenapi\image\test_glance.py
class TestGlanceStore(stubs.XenAPITestBaseNoDB):
def setUp(self):
def _get_params(self):
def _get_download_params(self):
def test_download_image(self):
def _get_upload_params(self, auto_disk_config=True, expected_os_type='default'):
def _test_upload_image(self, auto_disk_config, expected_os_type='default'):
def test_upload_image(self):
def test_upload_image_None_os_type(self):
def test_upload_image_no_os_type(self):
def test_upload_image_auto_config_disk_disabled(self):
def test_upload_image_raises_exception(self):
def test_upload_image_retries_then_raises_exception(self):
def test_upload_image_retries_on_signal_exception(self):
\OpenStack\nova-2014.1\nova\tests\virt\xenapi\image\test_utils.py
class GlanceImageTestCase(test.NoDBTestCase):
def _get_image(self):
def _stub_out_glance_services(self):
def test__image_id(self):
def test__image_service(self):
def test_meta(self):
def test_meta_caching(self):
def test_download_to(self):
def test_is_raw_tgz_empty_meta(self):
def test_is_raw_tgz_for_raw_tgz(self):
def test_data(self):
class RawImageTestCase(test.NoDBTestCase):
def test_get_size(self):
def test_stream_to(self):
class TestIterableBasedFile(test.NoDBTestCase):
def test_constructor(self):
def test_read_one_character(self):
def test_read_stores_remaining_characters(self):
def test_read_remaining_characters(self):
def test_read_reached_end_of_file(self):
def test_empty_chunks(self):
class RawTGZTestCase(test.NoDBTestCase):
def test_as_tarfile(self):
def test_as_file(self):
def test_get_size(self):
def test_get_size_called_twice(self):
def test_stream_to_without_size_retrieved(self):
def test_stream_to_with_size_retrieved(self):
\OpenStack\nova-2014.1\nova\tests\virt\xenapi\image\test_vdi_through_dev.py
def fake_context(result=None):
class TestDelegatingToCommand(test.NoDBTestCase):
def test_upload_image_is_delegated_to_command(self):
class TestUploadToGlanceAsRawTgz(test.NoDBTestCase):
def test_upload_image(self):
def test__perform_upload(self):
def test__get_vdi_ref(self):
def test__get_virtual_size(self):
def test__create_pipe(self):
class TestTarGzProducer(test.NoDBTestCase):
def test_constructor(self):
def test_start(self):
def test_get_metadata(self):
\OpenStack\nova-2014.1\nova\tests\virt\xenapi\image\__init__.py
\OpenStack\nova-2014.1\nova\tests\virt\xenapi\stubs.py
def stubout_firewall_driver(stubs, conn):
def fake_none(self, *args):
def stubout_instance_snapshot(stubs):
def fake_fetch_image(context, session, instance, name_label, image, type):
def fake_wait_for_vhd_coalesce(*args):
def stubout_session(stubs, cls, product_version=(5, 6, 2), product_brand='XenServer', **opt_args):
def stubout_get_this_vm_uuid(stubs):
def f(session):
def stubout_image_service_download(stubs):
def fake_download(*args, **kwargs):
def stubout_stream_disk(stubs):
def fake_stream_disk(*args, **kwargs):
def stubout_determine_is_pv_objectstore(stubs):
def f(*args):
def stubout_is_snapshot(stubs):
def f(*args):
def stubout_lookup_image(stubs):
def f(_1, _2, _3, _4):
def stubout_fetch_disk_image(stubs, raise_failure=False):
def _fake_fetch_disk_image(context, session, instance, name_label, image, image_type):
def stubout_create_vm(stubs):
def f(*args):
def stubout_attach_disks(stubs):
def f(*args):
def _make_fake_vdi():
class FakeSessionForVMTests(fake.SessionBase):
def host_call_plugin(self, _1, _2, plugin, method, _5):
def VM_start(self, _1, ref, _2, _3):
def VM_start_on(self, _1, vm_ref, host_ref, _2, _3):
def VDI_snapshot(self, session_ref, vm_ref, _1):
def SR_scan(self, session_ref, sr_ref):
class FakeSessionForFirewallTests(FakeSessionForVMTests):
def __init__(self, uri, test_case=None):
def host_call_plugin(self, _1, _2, plugin, method, args):
def stub_out_vm_methods(stubs):
def fake_acquire_bootlock(self, vm):
def fake_release_bootlock(self, vm):
def fake_generate_ephemeral(*args):
def fake_wait_for_device(dev):
class FakeSessionForVolumeTests(fake.SessionBase):
def VDI_introduce(self, _1, uuid, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11):
class FakeSessionForVolumeFailedTests(FakeSessionForVolumeTests):
def VDI_introduce(self, _1, uuid, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11):
def PBD_unplug(self, _1, ref):
def SR_forget(self, _1, ref):
def stub_out_migration_methods(stubs):
def fake_import_all_migrated_disks(session, instance):
def fake_wait_for_instance_to_start(self, *args):
def fake_get_vdi(session, vm_ref, userdevice='0'):
def fake_sr(session, *args):
def fake_get_sr_path(*args):
def fake_destroy(*args, **kwargs):
def fake_generate_ephemeral(*args):
class FakeSessionForFailedMigrateTests(FakeSessionForVMTests):
def VM_assert_can_migrate(self, session, vmref, migrate_data, live, vdi_map, vif_map, options):
def host_migrate_receive(self, session, hostref, networkref, options):
def VM_migrate_send(self, session, vmref, migrate_data, islive, vdi_map, vif_map, options):
class XenAPITestBase(test.TestCase):
def setUp(self):
class XenAPITestBaseNoDB(test.NoDBTestCase):
def setUp(self):
\OpenStack\nova-2014.1\nova\tests\virt\xenapi\test_agent.py
def _get_fake_instance(**kwargs):
class AgentTestCaseBase(test.NoDBTestCase):
def _create_agent(self, instance):
class AgentImageFlagsTestCase(AgentTestCaseBase):
def test_agent_is_present(self):
def test_agent_is_disabled(self):
def test_agent_uses_deafault_when_prop_invalid(self):
def test_agent_default_not_present(self):
def test_agent_default_present(self):
class SysMetaKeyTestBase():
def _create_agent_with_value(self, value):
def test_get_sys_meta_key_true(self):
def test_get_sys_meta_key_false(self):
def test_get_sys_meta_key_invalid_is_false(self):
def test_get_sys_meta_key_missing_is_false(self):
class SkipSshFlagTestCase(SysMetaKeyTestBase, AgentTestCaseBase):
def test_skip_ssh_key_inject(self):
class SkipFileInjectAtBootFlagTestCase(SysMetaKeyTestBase, AgentTestCaseBase):
def test_skip_inject_files_at_boot(self):
class InjectSshTestCase(AgentTestCaseBase):
def test_inject_ssh_key_succeeds(self):
def _test_inject_ssh_key_skipped(self, instance):
def test_inject_ssh_key_skipped_no_key_data(self):
def test_inject_ssh_key_skipped_windows(self):
def test_inject_ssh_key_skipped_cloud_init_present(self):
class FileInjectionTestCase(AgentTestCaseBase):
def test_inject_file(self):
def test_inject_files(self):
def test_inject_files_skipped_when_cloud_init_installed(self):
class SetAdminPasswordTestCase(AgentTestCaseBase):
def test_exchange_key_with_agent(self, mock_simple_dh, mock_call_agent):
def test_set_admin_password_works(self, mock_exchange, mock_save, mock_call_agent):
def test_set_admin_password_silently_fails(self, mock_exchange, mock_add_fault):
class UpgradeRequiredTestCase(test.NoDBTestCase):
def test_less_than(self):
def test_greater_than(self):
def test_equal(self):
def test_non_lexical(self):
def test_length(self):
class CallAgentTestCase(AgentTestCaseBase):
def test_call_agent_success(self, mock_uuid):
def _call_agent_setup(self, session, mock_uuid, returncode='0', success_codes=None, exception=None):
def _assert_agent_called(self, session, mock_uuid):
def test_call_agent_works_with_defaults(self, mock_uuid):
def test_call_agent_fails_with_timeout(self, mock_uuid):
def test_call_agent_fails_with_not_implemented(self, mock_uuid):
def test_call_agent_fails_with_other_error(self, mock_uuid):
def test_call_agent_fails_with_returned_error(self, mock_uuid):
class XenAPIBasedAgent(AgentTestCaseBase):
def test_call_agent_swallows_error(self, mock_call_agent, mock_add_instance_fault):
def test_call_agent_throws_error(self, mock_call_agent, mock_add_instance_fault):
\OpenStack\nova-2014.1\nova\tests\virt\xenapi\test_driver.py
class XenAPIDriverTestCase(stubs.XenAPITestBaseNoDB):
def host_stats(self, refresh=True):
def test_available_resource(self):
def test_overhead(self):
def test_set_bootable(self):
\OpenStack\nova-2014.1\nova\tests\virt\xenapi\test_vmops.py
class VMOpsTestBase(stubs.XenAPITestBaseNoDB):
def setUp(self):
def _setup_mock_vmops(self, product_brand=None, product_version=None):
def create_vm(self, name, state="Running"):
def tearDown(self):
class VMOpsTestCase(VMOpsTestBase):
def setUp(self):
def _setup_mock_vmops(self, product_brand=None, product_version=None):
def _get_mock_session(self, product_brand, product_version):
def _test_finish_revert_migration_after_crash(self, backup_made, new_made, vm_shutdown=True):
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_xsm_sr_check_relaxed_cached(self):
def fake_make_plugin_call(plugin, method, **args):
def test_get_vm_opaque_ref_raises_instance_not_found(self):
class InjectAutoDiskConfigTestCase(VMOpsTestBase):
def setUp(self):
OpenStack IndexPreviousNext
|