¡@

Home 

OpenStack Study: nova

OpenStack Index

Previous

Next

class CannotDeleteFile(DataObject):

    def __init__(self):

class FileLocked(DataObject):

    def __init__(self):

class VirtualDisk(DataObject):

    def __init__(self, controllerKey=0, unitNumber=0):

class VirtualDiskFlatVer2BackingInfo(DataObject):

    def __init__(self):

class VirtualDiskRawDiskMappingVer1BackingInfo(DataObject):

    def __init__(self):

class VirtualIDEController(DataObject):

    def __init__(self, key=0):

class VirtualLsiLogicController(DataObject):

    def __init__(self, key=0, scsiCtlrUnitNumber=0):

class VirtualLsiLogicSASController(DataObject):

class VirtualPCNet32(DataObject):

    def __init__(self):

class OptionValue(DataObject):

    def __init__(self, key=None, value=None):

class VirtualMachine(ManagedObject):

    def __init__(self, **kwargs):

    def reconfig(self, factory, val):

class Network(ManagedObject):

    def __init__(self):

class ResourcePool(ManagedObject):

    def __init__(self, name="test_ResPool", value="resgroup-test"):

class DatastoreHostMount(DataObject):

    def __init__(self, value='host-100'):

class ClusterComputeResource(ManagedObject):

    def __init__(self, name="test_cluster"):

    def _add_root_resource_pool(self, r_pool):

    def _add_host(self, host_sys):

    def _add_datastore(self, datastore):

    def _update_summary(self):

class Datastore(ManagedObject):

    def __init__(self, name="fake-ds", capacity=1024, free=500):

class HostNetworkSystem(ManagedObject):

    def __init__(self, name="networkSystem"):

class HostStorageSystem(ManagedObject):

    def __init__(self):

class HostSystem(ManagedObject):

    def __init__(self, name="ha-host", connected=True, ds_ref=None):

    def _add_iscsi_target(self, data):

    def _add_port_group(self, spec):

class Datacenter(ManagedObject):

    def __init__(self, name="ha-datacenter", ds_ref=None):

class Task(ManagedObject):

    def __init__(self, task_name, state="running", result=None, error_fault=None):

def create_host_network_system():

def create_host_storage_system():

def create_host(ds_ref=None):

def create_datacenter(name, ds_ref=None):

def create_datastore(name, capacity, free):

def create_res_pool():

def create_network():

def create_cluster(name, ds_ref):

def create_task(task_name, state="running", result=None, error_fault=None):

def _add_file(file_path):

def _remove_file(file_path):

def fake_plug_vifs(*args, **kwargs):

def fake_get_network(*args, **kwargs):

def get_file(file_path):

def fake_fetch_image(context, image, instance, **kwargs):

def fake_upload_image(context, image, instance, **kwargs):

def fake_get_vmdk_size_and_properties(context, image_id, instance):

def _get_vm_mdo(vm_ref):

def _merge_extraconfig(existing, changes):

class FakeFactory(object):

    def create(self, obj_name):

class FakeVim(object):

    def __init__(self, protocol="https", host="localhost", trace=None):

    def get_service_content(self):

    def __repr__(self):

    def __str__(self):

    def _login(self):

    def _logout(self):

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

    def _check_session(self):

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

    def _create_vm(self, method, *args, **kwargs):

    def _reconfig_vm(self, method, *args, **kwargs):

    def _create_copy_disk(self, method, vmdk_file_path):

    def _extend_disk(self, method, size):

    def _snapshot_vm(self, method):

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

    def _delete_snapshot(self, method, *args, **kwargs):

    def _delete_disk(self, method, *args, **kwargs):

    def _delete_file(self, method, *args, **kwargs):

    def _just_return(self):

    def _just_return_task(self, method):

    def _clone_vm(self, method, *args, **kwargs):

    def _unregister_vm(self, method, *args, **kwargs):

    def _search_ds(self, method, *args, **kwargs):

    def _move_file(self, method, *args, **kwargs):

    def _make_dir(self, method, *args, **kwargs):

    def _set_power_state(self, method, vm_ref, pwr_state="poweredOn"):

    def _retrieve_properties_continue(self, method, *args, **kwargs):

    def _retrieve_properties_cancel(self, method, *args, **kwargs):

    def _retrieve_properties(self, method, *args, **kwargs):

    def _add_port_group(self, method, *args, **kwargs):

    def _add_iscsi_send_tgt(self, method, *args, **kwargs):

    def __getattr__(self, attr_name):

\OpenStack\nova-2014.1\nova\virt\vmwareapi\host.py

class Host(object):

    def __init__(self, session):

    def host_power_action(self, host, action):

    def host_maintenance_mode(self, host, mode):

    def set_host_enabled(self, _host, enabled):

class HostState(object):

    def __init__(self, session, host_name):

    def get_host_stats(self, refresh=False):

    def update_status(self):

class VCState(object):

    def __init__(self, session, host_name, cluster):

    def get_host_stats(self, refresh=False):

    def update_status(self):

\OpenStack\nova-2014.1\nova\virt\vmwareapi\imagecache.py

class ImageCacheManager(imagecache.ImageCacheManager):

    def __init__(self, session, base_folder):

    def _folder_delete(self, path, dc_ref):

    def timestamp_folder_get(self, ds_path, image_id):

    def timestamp_cleanup(self, dc_ref, ds_browser, ds_ref, ds_name, ds_path):

    def _get_timestamp(self, ds_browser, ds_path):

    def _get_timestamp_filename(self):

    def _get_datetime_from_filename(self, timestamp_filename):

    def _get_ds_browser(self, ds_ref):

    def _list_datastore_images(self, ds_path, datastore):

    def _age_cached_images(self, context, datastore, dc_info, ds_path):

    def update(self, context, instances, datastores_info):

\OpenStack\nova-2014.1\nova\virt\vmwareapi\io_util.py

class ThreadSafePipe(queue.LightQueue):

    def __init__(self, maxsize, transfer_size):

    def read(self, chunk_size):

    def write(self, data):

    def seek(self, offset, whence=0):

    def tell(self):

    def close(self):

class GlanceWriteThread(object):

    def __init__(self, context, input, image_service, image_id, image_meta=None):

    def start(self):

        def _inner():

    def stop(self):

    def wait(self):

    def close(self):

class IOThread(object):

    def __init__(self, input, output):

    def start(self):

        def _inner():

    def stop(self):

    def wait(self):

\OpenStack\nova-2014.1\nova\virt\vmwareapi\network_util.py

def get_network_with_the_name(session, network_name="vmnet0", cluster=None):

def get_vswitch_for_vlan_interface(session, vlan_interface, cluster=None):

def check_if_vlan_interface_exists(session, vlan_interface, cluster=None):

def get_vlanid_and_vswitch_for_portgroup(session, pg_name, cluster=None):

def create_port_group(session, pg_name, vswitch_name, vlan_id=0, cluster=None):

\OpenStack\nova-2014.1\nova\virt\vmwareapi\read_write_util.py

class GlanceFileRead(object):

    def __init__(self, glance_read_iter):

    def read(self, chunk_size):

    def get_next(self):

    def close(self):

class VMwareHTTPFile(object):

    def __init__(self, file_handle):

    def set_eof(self, eof):

    def get_eof(self):

    def close(self):

    def _build_vim_cookie_headers(self, vim_cookies):

    def write(self, data):

    def read(self, chunk_size):

    def get_size(self):

class VMwareHTTPWriteFile(VMwareHTTPFile):

    def __init__(self, host, data_center_name, datastore_name, cookies, file_path, file_size, scheme="https"):

    def write(self, data):

    def close(self):

class VMwareHTTPReadFile(VMwareHTTPFile):

    def __init__(self, host, data_center_name, datastore_name, cookies, file_path, scheme="https"):

    def read(self, chunk_size):

    def get_size(self):

\OpenStack\nova-2014.1\nova\virt\vmwareapi\vif.py

def _get_associated_vswitch_for_interface(session, interface, cluster=None):

def ensure_vlan_bridge(session, vif, cluster=None, create_vlan=True):

def _is_valid_opaque_network_id(opaque_id, bridge_id, integration_bridge, num_networks):

def _get_network_ref_from_opaque(opaque_networks, integration_bridge, bridge):

def get_neutron_network(session, network_name, cluster, vif):

def get_network_ref(session, cluster, vif, is_neutron):

\OpenStack\nova-2014.1\nova\virt\vmwareapi\vim.py

def get_moref(value, type):

def object_to_dict(obj, list_depth=1):

class VIMMessagePlugin(suds.plugin.MessagePlugin):

    def addAttributeForValue(self, node):

    def marshalled(self, context):

class Vim:

    def __init__(self, protocol="https", host="localhost"):

    def retrieve_service_content(self):

    def get_wsdl_url(protocol, host_name):

    def get_soap_url(protocol, host_name):

    def get_service_content(self):

    def __getattr__(self, attr_name):

        def vim_request_handler(managed_object, **kwargs):

    def _request_managed_object_builder(self, managed_object):

    def __repr__(self):

    def __str__(self):

\OpenStack\nova-2014.1\nova\virt\vmwareapi\vim_util.py

def build_selection_spec(client_factory, name):

def build_traversal_spec(client_factory, name, spec_type, path, skip, select_set):

def build_recursive_traversal_spec(client_factory):

def build_property_spec(client_factory, type="VirtualMachine", properties_to_collect=None, all_properties=False):

def build_object_spec(client_factory, root_folder, traversal_specs):

def build_property_filter_spec(client_factory, property_specs, object_specs):

def get_object_properties(vim, collector, mobj, type, properties):

def get_dynamic_property(vim, mobj, type, property_name):

def get_dynamic_properties(vim, mobj, type, property_names):

def get_objects(vim, type, properties_to_collect=None, all=False):

def get_inner_objects(vim, base_obj, path, inner_type, properties_to_collect=None, all=False):

def cancel_retrieve(vim, token):

def continue_to_get_objects(vim, token):

def get_prop_spec(client_factory, spec_type, properties):

def get_obj_spec(client_factory, obj, select_set=None):

def get_prop_filter_spec(client_factory, obj_spec, prop_spec):

def get_properties_for_a_collection_of_objects(vim, type, obj_list, properties):

def get_about_info(vim):

\OpenStack\nova-2014.1\nova\virt\vmwareapi\vmops.py

class VMwareVMOps(object):

    def __init__(self, session, virtapi, volumeops, cluster=None, datastore_regex=None):

    def list_instances(self):

    def _extend_virtual_disk(self, instance, requested_size, name, dc_ref):

    def _delete_datastore_file(self, instance, datastore_path, dc_ref):

    def _get_vmdk_path(self, ds_name, folder, name):

    def _get_disk_format(self, image_meta):

    def spawn(self, context, instance, image_meta, injected_files, admin_password, network_info, block_device_info=None, instance_name=None, power_on=True):

        def _get_image_properties(root_size):

        def _get_vif_infos():

        def _execute_create_vm():

        def _create_virtual_disk(virtual_disk_path, file_size_in_kb):

        def _fetch_image_on_datastore(upload_name):

        def _copy_virtual_disk(source, dest):

        def _power_on_vm():

    def _create_config_drive(self, instance, injected_files, admin_password, data_store_name, dc_name, upload_folder, cookies):

    def _attach_cdrom_to_vm(self, vm_ref, instance, datastore, file_path):

    def decide_linked_clone(image_linked_clone, global_linked_clone):

    def get_copy_virtual_disk_spec(self, client_factory, adapter_type, disk_type):

    def _create_vm_snapshot(self, instance, vm_ref):

    def _delete_vm_snapshot(self, instance, vm_ref, snapshot):

    def snapshot(self, context, instance, image_id, update_task_state):

        def _get_vm_and_vmdk_attribs():

        def _check_if_tmp_folder_exists():

        def _copy_vmdk_content():

        def _upload_vmdk_to_image_repository():

        def _clean_temp_data():

    def _get_values_from_object_properties(self, props, query):

    def reboot(self, instance, network_info):

    def _delete(self, instance, network_info):

    def destroy(self, instance, network_info, destroy_disks=True, instance_name=None):

    def pause(self, instance):

    def unpause(self, instance):

    def suspend(self, instance):

    def resume(self, instance):

    def rescue(self, context, instance, network_info, image_meta):

    def unrescue(self, instance):

    def power_off(self, instance):

    def _power_on(self, instance, vm_ref=None):

    def power_on(self, context, instance, network_info, block_device_info):

    def _get_orig_vm_name_label(self, instance):

    def _update_instance_progress(self, context, instance, step, total_steps):

    def migrate_disk_and_power_off(self, context, instance, dest, flavor):

    def confirm_migration(self, migration, instance, network_info):

    def finish_revert_migration(self, context, instance, network_info, block_device_info, power_on=True):

    def finish_migration(self, context, migration, instance, disk_info, network_info, image_meta, resize_instance=False, block_device_info=None, power_on=True):

    def live_migration(self, context, instance_ref, dest, post_method, recover_method, block_migration=False):

    def poll_rebooting_instances(self, timeout, instances):

    def get_info(self, instance):

    def _get_diagnostic_from_object_properties(self, props, wanted_props):

    def get_diagnostics(self, instance):

    def get_vnc_console(self, instance):

    def get_vnc_console_vcenter(self, instance):

    def _get_machine_id_str(network_info):

    def _set_machine_id(self, client_factory, instance, network_info):

    def _set_vnc_config(self, client_factory, instance, port):

    def _get_ds_browser(self, ds_ref):

    def get_datacenter_ref_and_name(self, ds_ref):

    def _get_host_ref_from_name(self, host_name):

    def _get_vmfolder_ref(self):

    def _create_folder_if_missing(self, ds_name, ds_ref, folder):

    def check_cache_folder(self, ds_name, ds_ref):

    def check_temp_folder(self, ds_name, ds_ref):

    def _check_if_folder_file_exists(self, ds_browser, ds_ref, ds_name, folder_name, file_name):

    def inject_network_info(self, instance, network_info):

    def manage_image_cache(self, context, instances):

    def _get_valid_vms_from_retrieve_result(self, retrieve_result):

class VMwareVCVMOps(VMwareVMOps):

    def get_copy_virtual_disk_spec(self, client_factory, adapter_type, disk_type):

    def _update_datacenter_cache_from_objects(self, dcs):

    def get_datacenter_ref_and_name(self, ds_ref):

    def list_instances(self):

\OpenStack\nova-2014.1\nova\virt\vmwareapi\vmware_images.py

def start_transfer(context, read_file_handle, data_size, write_file_handle=None, image_service=None, image_id=None, image_meta=None):

def upload_iso_to_datastore(iso_path, instance, **kwargs):

def fetch_image(context, image, instance, **kwargs):

def upload_image(context, image, instance, **kwargs):

def get_vmdk_size_and_properties(context, image, instance):

\OpenStack\nova-2014.1\nova\virt\vmwareapi\vm_util.py

def vm_refs_cache_reset():

def vm_ref_cache_delete(id):

def vm_ref_cache_update(id, vm_ref):

def vm_ref_cache_get(id):

def _vm_ref_cache(id, func, session, data):

def vm_ref_cache_from_instance(func):

def vm_ref_cache_from_name(func):

def get_vm_create_spec(client_factory, instance, name, data_store_name, vif_infos, os_type="otherGuest"):

def get_vm_resize_spec(client_factory, instance):

def create_controller_spec(client_factory, key, adapter_type="lsiLogic"):

def create_network_spec(client_factory, vif_info):

def get_vmdk_attach_config_spec(client_factory, disk_type="preallocated", file_path=None, disk_size=None, linked_clone=False, controller_key=None, unit_number=None, device_name=None):

def get_cdrom_attach_config_spec(client_factory, datastore, file_path, controller_key, cdrom_unit_number):

def get_vmdk_detach_config_spec(client_factory, device, destroy_disk=False):

def get_vm_extra_config_spec(client_factory, extra_opts):

def get_vmdk_path_and_adapter_type(hardware_devices, uuid=None):

def _find_controller_slot(controller_keys, taken, max_unit_number):

def _is_ide_controller(device):

def _is_scsi_controller(device):

def _find_allocated_slots(devices):

def allocate_controller_key_and_unit_number(client_factory, devices, adapter_type):

def get_rdm_disk(hardware_devices, uuid):

def get_copy_virtual_disk_spec(client_factory, adapter_type="lsiLogic", disk_type="preallocated"):

def get_vmdk_create_spec(client_factory, size_in_kb, adapter_type="lsiLogic", disk_type="preallocated"):

def get_rdm_create_spec(client_factory, device, adapter_type="lsiLogic", disk_type="rdmp"):

def create_virtual_cdrom_spec(client_factory, datastore, controller_key, file_path, cdrom_unit_number):

def create_virtual_disk_spec(client_factory, controller_key, disk_type="preallocated", file_path=None, disk_size=None, linked_clone=False, unit_number=None, device_name=None):

def detach_virtual_disk_spec(client_factory, device, destroy_disk=False):

def clone_vm_spec(client_factory, location, power_on=False, snapshot=None, template=False, config=None):

def relocate_vm_spec(client_factory, datastore=None, host=None, disk_move_type="moveAllDiskBackingsAndAllowSharing"):

def get_dummy_vm_create_spec(client_factory, name, data_store_name):

def get_machine_id_change_spec(client_factory, machine_id_str):

def get_add_vswitch_port_group_spec(client_factory, vswitch_name, port_group_name, vlan_id):

def get_vnc_config_spec(client_factory, port):

def get_vnc_port(session):

def _get_allocated_vnc_ports(session):

def search_datastore_spec(client_factory, file_name):

def _get_token(results):

def _get_reference_for_value(results, value):

def _get_object_for_value(results, value):

def _get_object_for_optionvalue(results, value):

def _get_object_from_results(session, results, value, func):

def _cancel_retrieve_if_necessary(session, results):

def _get_vm_ref_from_name(session, vm_name):

def get_vm_ref_from_name(session, vm_name):

def _get_vm_ref_from_uuid(session, instance_uuid):

def _get_vm_ref_from_vm_uuid(session, instance_uuid):

def _get_vm_ref_from_extraconfig(session, instance_uuid):

def get_vm_ref(session, instance):

def search_vm_ref_by_identifier(session, identifier):

def get_host_ref_from_id(session, host_id, property_list=None):

def get_host_id_from_vm_ref(session, vm_ref):

def property_from_property_set(property_name, property_set):

def _property_from_propSet(propSet, name='name'):

def get_host_ref_for_vm(session, instance, props):

def get_host_name_for_vm(session, instance):

def get_host_name_from_host_ref(host_ref):

def get_vm_state_from_name(session, vm_name):

def get_stats_from_cluster(session, cluster):

def get_cluster_ref_from_name(session, cluster_name):

def get_host_ref(session, cluster=None):

def propset_dict(propset):

def _select_datastore(data_stores, best_match, datastore_regex=None):

def get_datastore_ref_and_name(session, cluster=None, host=None, datastore_regex=None):

def _get_allowed_datastores(data_stores, datastore_regex, allowed_types):

def get_available_datastores(session, cluster=None, datastore_regex=None):

def get_vmdk_backed_disk_uuid(hardware_devices, volume_uuid):

def get_vmdk_backed_disk_device(hardware_devices, uuid):

def get_vmdk_volume_disk(hardware_devices, path=None):

def get_res_pool_ref(session, cluster, node_mo_id):

def get_all_cluster_mors(session):

def get_all_res_pool_mors(session):

def get_dynamic_property_mor(session, mor_ref, attribute):

def find_entity_mor(entity_list, entity_name):

def get_all_cluster_refs_by_name(session, path_list):

def get_dict_mor(session, list_obj):

def get_mo_id_from_instance(instance):

def get_vmdk_adapter_type(adapter_type):

def clone_vmref_for_instance(session, instance, vm_ref, host_ref, ds_ref, vmfolder_ref):

def disassociate_vmref_from_instance(session, instance, vm_ref=None, suffix='-orig'):

def associate_vmref_for_instance(session, instance, vm_ref=None, suffix='-orig'):

\OpenStack\nova-2014.1\nova\virt\vmwareapi\volumeops.py

class VMwareVolumeOps(object):

    def __init__(self, session, cluster=None, vc_support=False):

    def attach_disk_to_vm(self, vm_ref, instance, adapter_type, disk_type, vmdk_path=None, disk_size=None, linked_clone=False, device_name=None):

    def _update_volume_details(self, vm_ref, instance, volume_uuid):

    def _get_volume_uuid(self, vm_ref, volume_uuid):

    def detach_disk_from_vm(self, vm_ref, instance, device, destroy_disk=False):

    def discover_st(self, data):

    def get_volume_connector(self, instance):

    def _get_volume_ref(self, volume_ref_name):

    def _get_vmdk_base_volume_device(self, volume_ref):

    def _attach_volume_vmdk(self, connection_info, instance, mountpoint):

    def _attach_volume_iscsi(self, connection_info, instance, mountpoint):

    def attach_volume(self, connection_info, instance, mountpoint):

    def _relocate_vmdk_volume(self, volume_ref, res_pool, datastore):

    def _get_res_pool_of_vm(self, vm_ref):

    def _consolidate_vmdk_volume(self, instance, vm_ref, device, volume_ref):

    def _get_vmdk_backed_disk_device(self, vm_ref, connection_info_data):

    def _detach_volume_vmdk(self, connection_info, instance, mountpoint):

    def _detach_volume_iscsi(self, connection_info, instance, mountpoint):

    def detach_volume(self, connection_info, instance, mountpoint):

    def attach_root_volume(self, connection_info, instance, mountpoint, datastore):

\OpenStack\nova-2014.1\nova\virt\vmwareapi\volume_util.py

class StorageError(Exception):

    def __init__(self, message=None):

def get_host_iqn(session, cluster=None):

def find_st(session, data, cluster=None):

def rescan_iscsi_hba(session, cluster=None, target_portal=None):

def _add_iscsi_send_target_host(session, storage_system_mor, hba_device, target_portal):

\OpenStack\nova-2014.1\nova\virt\vmwareapi\__init__.py

\OpenStack\nova-2014.1\nova\virt\volumeutils.py

def get_iscsi_initiator():

\OpenStack\nova-2014.1\nova\virt\watchdog_actions.py

def is_valid_watchdog_action(val):

\OpenStack\nova-2014.1\nova\virt\xenapi\agent.py

def _call_agent(session, instance, vm_ref, method, addl_args=None, timeout=None, success_codes=None):

def is_upgrade_required(current_version, available_version):

class XenAPIBasedAgent(object):

    def __init__(self, session, virtapi, instance, vm_ref):

    def _add_instance_fault(self, error, exc_info):

    def _call_agent(self, method, addl_args=None, timeout=None, success_codes=None, ignore_errors=True):

    def get_version(self):

    def _get_expected_build(self):

    def update_if_needed(self, version):

    def _perform_update(self, agent_build):

    def _exchange_key_with_agent(self):

    def _save_instance_password_if_sshkey_present(self, new_pass):

    def set_admin_password(self, new_pass):

    def inject_ssh_key(self):

    def inject_files(self, injected_files):

    def inject_file(self, path, contents):

    def resetnetwork(self):

    def _skip_ssh_key_inject(self):

    def _skip_inject_files_at_boot(self):

    def _get_sys_meta_key(self, key):

def find_guest_agent(base_dir):

def should_use_agent(instance):

class SimpleDH(object):

    def __init__(self):

    def generate_private(self):

    def get_public(self):

    def compute_shared(self, other):

    def _run_ssl(self, text, decrypt=False):

    def encrypt(self, text):

    def decrypt(self, text):

\OpenStack\nova-2014.1\nova\virt\xenapi\client\objects.py

class XenAPISessionObject(object):

    def __init__(self, session, name):

    def _call_method(self, method_name, *args):

    def __getattr__(self, method_name):

class VM(XenAPISessionObject):

    def __init__(self, session):

class VBD(XenAPISessionObject):

    def __init__(self, session):

    def plug(self, vbd_ref, vm_ref):

        def synchronized_plug():

    def unplug(self, vbd_ref, vm_ref):

        def synchronized_unplug():

class VDI(XenAPISessionObject):

    def __init__(self, session):

class SR(XenAPISessionObject):

    def __init__(self, session):

class PBD(XenAPISessionObject):

    def __init__(self, session):

class PIF(XenAPISessionObject):

    def __init__(self, session):

class VLAN(XenAPISessionObject):

    def __init__(self, session):

class Host(XenAPISessionObject):

    def __init__(self, session):

class Network(XenAPISessionObject):

    def __init__(self, session):

class Pool(XenAPISessionObject):

    def __init__(self, session):

\OpenStack\nova-2014.1\nova\virt\xenapi\client\session.py

def apply_session_helpers(session):

class XenAPISession(object):

    def __init__(self, url, user, pw):

    def _verify_plugin_version(self):

    def _create_first_session(self, url, user, pw, exception):

    def _populate_session_pool(self, url, user, pw, exception):

    def _get_host_uuid(self):

    def _get_product_version_and_brand(self):

    def _get_software_version(self):

    def get_session_id(self):

    def _get_session(self):

    def _get_host_ref(self):

    def call_xenapi(self, method, *args):

    def call_plugin(self, plugin, fn, args):

    def call_plugin_serialized(self, plugin, fn, *args, **kwargs):

    def call_plugin_serialized_with_retry(self, plugin, fn, num_retries, callback, *args, **kwargs):

    def _is_retryable_exception(self, exc):

    def _create_session(self, url):

    def _unwrap_plugin_exceptions(self, func, *args, **kwargs):

    def get_rec(self, record_type, ref):

    def get_all_refs_and_recs(self, record_type):

\OpenStack\nova-2014.1\nova\virt\xenapi\client\__init__.py

\OpenStack\nova-2014.1\nova\virt\xenapi\driver.py

class XenAPIDriver(driver.ComputeDriver):

    def __init__(self, virtapi, read_only=False):

    def host_state(self):

    def init_host(self, host):

    def instance_exists(self, instance_name):

    def estimate_instance_overhead(self, instance_info):

    def list_instances(self):

    def list_instance_uuids(self):

    def spawn(self, context, instance, image_meta, injected_files, admin_password, network_info=None, block_device_info=None):

    def confirm_migration(self, migration, instance, network_info):

    def finish_revert_migration(self, context, instance, network_info, block_device_info=None, power_on=True):

    def finish_migration(self, context, migration, instance, disk_info, network_info, image_meta, resize_instance=False, block_device_info=None, power_on=True):

    def snapshot(self, context, instance, image_id, update_task_state):

    def reboot(self, context, instance, network_info, reboot_type, block_device_info=None, bad_volumes_callback=None):

    def set_admin_password(self, instance, new_pass):

    def inject_file(self, instance, b64_path, b64_contents):

    def change_instance_metadata(self, context, instance, diff):

    def destroy(self, context, instance, network_info, block_device_info=None, destroy_disks=True):

    def cleanup(self, context, instance, network_info, block_device_info=None, destroy_disks=True):

    def pause(self, instance):

    def unpause(self, instance):

    def migrate_disk_and_power_off(self, context, instance, dest, flavor, network_info, block_device_info=None):

    def suspend(self, instance):

    def resume(self, context, instance, network_info, block_device_info=None):

    def rescue(self, context, instance, network_info, image_meta, rescue_password):

    def set_bootable(self, instance, is_bootable):

    def unrescue(self, instance, network_info):

    def power_off(self, instance):

    def power_on(self, context, instance, network_info, block_device_info=None):

    def soft_delete(self, instance):

    def restore(self, instance):

    def poll_rebooting_instances(self, timeout, instances):

    def reset_network(self, instance):

    def inject_network_info(self, instance, network_info):

    def plug_vifs(self, instance_ref, network_info):

    def unplug_vifs(self, instance_ref, network_info):

    def get_info(self, instance):

    def get_diagnostics(self, instance):

    def get_all_bw_counters(self, instances):

    def get_console_output(self, context, instance):

    def get_vnc_console(self, context, instance):

    def get_volume_connector(self, instance):

    def get_host_ip_addr():

    def attach_volume(self, context, connection_info, instance, mountpoint, disk_bus=None, device_type=None, encryption=None):

    def detach_volume(self, connection_info, instance, mountpoint, encryption=None):

    def get_console_pool_info(self, console_type):

    def get_available_resource(self, nodename):

    def ensure_filtering_rules_for_instance(self, instance_ref, network_info):

    def check_can_live_migrate_destination(self, ctxt, instance_ref, src_compute_info, dst_compute_info, block_migration=False, disk_over_commit=False):

    def check_can_live_migrate_destination_cleanup(self, ctxt, dest_check_data):

    def check_can_live_migrate_source(self, ctxt, instance_ref, dest_check_data):

    def get_instance_disk_info(self, instance_name):

    def live_migration(self, ctxt, instance_ref, dest, post_method, recover_method, block_migration=False, migrate_data=None):

    def rollback_live_migration_at_destination(self, context, instance, network_info, block_device_info):

    def pre_live_migration(self, context, instance_ref, block_device_info, network_info, data, migrate_data=None):

    def post_live_migration(self, ctxt, instance_ref, block_device_info, migrate_data=None):

    def post_live_migration_at_destination(self, ctxt, instance_ref, network_info, block_migration, block_device_info=None):

    def unfilter_instance(self, instance_ref, network_info):

    def refresh_security_group_rules(self, security_group_id):

    def refresh_security_group_members(self, security_group_id):

    def refresh_instance_security_rules(self, instance):

    def refresh_provider_fw_rules(self):

    def get_host_stats(self, refresh=False):

    def host_power_action(self, host, action):

    def set_host_enabled(self, host, enabled):

    def get_host_uptime(self, host):

    def host_maintenance_mode(self, host, mode):

    def add_to_aggregate(self, context, aggregate, host, **kwargs):

    def remove_from_aggregate(self, context, aggregate, host, **kwargs):

    def undo_aggregate_operation(self, context, op, aggregate, host, set_error=True):

    def resume_state_on_host_boot(self, context, instance, network_info, block_device_info=None):

    def get_per_instance_usage(self):

\OpenStack\nova-2014.1\nova\virt\xenapi\fake.py

def log_db_contents(msg=None):

def reset():

def reset_table(table):

def _create_pool(name_label):

def create_host(name_label, hostname='fake_name', address='fake_addr'):

def create_network(name_label, bridge):

def create_vm(name_label, status, **kwargs):

def destroy_vm(vm_ref):

def destroy_vbd(vbd_ref):

def destroy_vdi(vdi_ref):

def create_vdi(name_label, sr_ref, **kwargs):

def after_VDI_create(vdi_ref, vdi_rec):

def create_vbd(vm_ref, vdi_ref, userdevice=0):

def after_VBD_create(vbd_ref, vbd_rec):

def after_VM_create(vm_ref, vm_rec):

def create_pbd(host_ref, sr_ref, attached):

def create_task(name_label):

def _create_local_srs(host_ref):

def create_sr(**kwargs):

def _create_local_pif(host_ref):

def _create_object(table, obj):

def _create_sr(table, obj):

def _create_vlan(pif_ref, vlan_num, network_ref):

def get_all(table):

def get_all_records(table):

def _query_matches(record, query):

def get_all_records_where(table_name, query):

def get_record(table, ref):

def check_for_session_leaks():

def as_value(s):

def as_json(*args, **kwargs):

class Failure(Exception):

    def __init__(self, details):

    def __str__(self):

    def _details_map(self):

class SessionBase(object):

    def __init__(self, uri):

    def pool_get_default_SR(self, _1, pool_ref):

    def VBD_insert(self, _1, vbd_ref, vdi_ref):

    def VBD_plug(self, _1, ref):

    def VBD_unplug(self, _1, ref):

    def VBD_add_to_other_config(self, _1, vbd_ref, key, value):

    def VBD_get_other_config(self, _1, vbd_ref):

    def PBD_create(self, _1, pbd_rec):

    def PBD_plug(self, _1, pbd_ref):

    def PBD_unplug(self, _1, pbd_ref):

    def SR_introduce(self, _1, sr_uuid, label, desc, type, content_type, shared, sm_config):

    def SR_forget(self, _1, sr_ref):

    def SR_scan(self, _1, sr_ref):

    def VM_get_xenstore_data(self, _1, vm_ref):

    def VM_remove_from_xenstore_data(self, _1, vm_ref, key):

    def VM_add_to_xenstore_data(self, _1, vm_ref, key, value):

    def VM_pool_migrate(self, _1, vm_ref, host_ref, options):

    def VDI_remove_from_other_config(self, _1, vdi_ref, key):

    def VDI_add_to_other_config(self, _1, vdi_ref, key, value):

    def VDI_copy(self, _1, vdi_to_copy_ref, sr_ref):

    def VDI_clone(self, _1, vdi_to_clone_ref):

    def host_compute_free_memory(self, _1, ref):

    def _plugin_agent_version(self, method, args):

    def _plugin_agent_key_init(self, method, args):

    def _plugin_agent_password(self, method, args):

    def _plugin_agent_inject_file(self, method, args):

    def _plugin_agent_resetnetwork(self, method, args):

    def _plugin_agent_agentupdate(self, method, args):

    def _plugin_noop(self, method, args):

    def _plugin_pickle_noop(self, method, args):

    def _plugin_migration_transfer_vhd(self, method, args):

    def _plugin_xenhost_host_data(self, method, args):

    def _plugin_poweraction(self, method, args):

    def _plugin_xenhost_set_host_enabled(self, method, args):

    def _plugin_xenhost_host_uptime(self, method, args):

    def _plugin_xenhost_get_pci_device_details(self, method, args):

    def _plugin_xenhost_get_pci_type(self, method, args):

    def _plugin_console_get_console_log(self, method, args):

    def _plugin_nova_plugin_version_get_version(self, method, args):

    def _plugin_xenhost_query_gc(self, method, args):

    def host_call_plugin(self, _1, _2, plugin, method, args):

    def VDI_get_virtual_size(self, *args):

    def VDI_resize_online(self, *args):

    def _VM_reboot(self, session, vm_ref):

    def VM_clean_reboot(self, session, vm_ref):

    def VM_hard_reboot(self, session, vm_ref):

    def VM_hard_shutdown(self, session, vm_ref):

    def VM_suspend(self, session, vm_ref):

    def VM_pause(self, session, vm_ref):

    def pool_eject(self, session, host_ref):

    def pool_join(self, session, hostname, username, password):

    def pool_set_name_label(self, session, pool_ref, name):

    def host_migrate_receive(self, session, destref, nwref, options):

    def VM_assert_can_migrate(self, session, vmref, migrate_data, live, vdi_map, vif_map, options):

    def VM_migrate_send(self, session, mref, migrate_data, live, vdi_map, vif_map, options):

    def VM_remove_from_blocked_operations(self, session, vm_ref, key):

    def xenapi_request(self, methodname, params):

    def _login(self, method, params):

    def _logout(self):

    def __getattr__(self, name):

    def _is_gettersetter(self, name, getter):

    def _is_create(self, name):

    def _is_destroy(self, name):

    def _is_method(self, name, meth):

    def _getter(self, name, params):

    def _setter(self, name, params):

    def _create(self, name, params):

    def _destroy(self, name, params):

    def _async(self, name, params):

    def _check_session(self, params):

    def _check_arg_count(self, params, expected):

    def _get_by_field(self, recs, k, v, return_singleton):

class FakeXenAPI(object):

    def __init__(self):

class _Dispatcher:

    def __init__(self, send, name):

    def __repr__(self):

    def __getattr__(self, name):

    def __call__(self, *args):

\OpenStack\nova-2014.1\nova\virt\xenapi\firewall.py

class Dom0IptablesFirewallDriver(firewall.IptablesFirewallDriver):

    def _plugin_execute(self, *cmd, **kwargs):

    def __init__(self, virtapi, xenapi_session=None, **kwargs):

    def _build_tcp_udp_rule(self, rule, version):

    def _provider_rules(self):

\OpenStack\nova-2014.1\nova\virt\xenapi\host.py

class Host(object):

    def __init__(self, session, virtapi):

    def host_power_action(self, _host, action):

    def host_maintenance_mode(self, host, mode):

    def set_host_enabled(self, host, enabled):

    def get_host_uptime(self, _host):

class HostState(object):

    def __init__(self, session):

    def _get_passthrough_devices(self):

        def _compile_hex(pattern):

        def _parse_pci_device_string(dev_string):

    def get_host_stats(self, refresh=False):

    def update_status(self):

def to_supported_instances(host_capabilities):

def call_xenhost(session, method, arg_dict):

def _uuid_find(context, host, name_label):

def _host_find(context, session, src_aggregate, host_ref):

\OpenStack\nova-2014.1\nova\virt\xenapi\image\bittorrent.py

class BittorrentStore(object):

    def _lookup_torrent_url_fn():

    def download_image(self, context, session, instance, image_id):

    def upload_image(self, context, session, instance, vdi_uuids, image_id):

\OpenStack\nova-2014.1\nova\virt\xenapi\image\glance.py

class GlanceStore(object):

    def _call_glance_plugin(self, session, fn, params):

        def pick_glance(kwargs):

    def _make_params(self, context, session, image_id):

    def download_image(self, context, session, instance, image_id):

    def upload_image(self, context, session, instance, vdi_uuids, image_id):

\OpenStack\nova-2014.1\nova\virt\xenapi\image\utils.py

class GlanceImage(object):

    def __init__(self, context, image_href_or_id):

    def meta(self):

    def download_to(self, fileobj):

    def is_raw_tgz(self):

    def data(self):

class RawImage(object):

    def __init__(self, glance_image):

    def get_size(self):

    def stream_to(self, fileobj):

class IterableToFileAdapter(object):

    def __init__(self, iterable):

    def read(self, size):

class RawTGZImage(object):

    def __init__(self, glance_image):

    def _as_file(self):

    def _as_tarfile(self):

    def get_size(self):

    def stream_to(self, target_file):

\OpenStack\nova-2014.1\nova\virt\xenapi\image\vdi_through_dev.py

class VdiThroughDevStore(object):

    def upload_image(self, context, session, instance, vdi_uuids, image_id):

    def download_image(self, context, session, instance, image_id):

class UploadToGlanceAsRawTgz(object):

    def __init__(self, context, session, instance, vdi_uuids, image_id):

    def _get_virtual_size(self):

    def _get_vdi_ref(self):

    def _perform_upload(self, devpath):

    def _create_pipe(self):

    def upload_image(self):

class TarGzProducer(object):

    def __init__(self, devpath, writefile, size, fname):

    def get_metadata(self):

    def start(self):

    def _open_file(self, *args):

\OpenStack\nova-2014.1\nova\virt\xenapi\image\__init__.py

\OpenStack\nova-2014.1\nova\virt\xenapi\network_utils.py

def find_network_with_name_label(session, name_label):

def find_network_with_bridge(session, bridge):

\OpenStack\nova-2014.1\nova\virt\xenapi\pool.py

class ResourcePool(object):

    def __init__(self, session, virtapi):

    def undo_aggregate_operation(self, context, op, aggregate, host, set_error):

    def add_to_aggregate(self, context, aggregate, host, slave_info=None):

    def remove_from_aggregate(self, context, aggregate, host, slave_info=None):

    def _join_slave(self, aggregate_id, host, compute_uuid, url, user, passwd):

    def _eject_slave(self, aggregate_id, compute_uuid, host_uuid):

    def _init_pool(self, aggregate_id, aggregate_name):

    def _clear_pool(self, aggregate_id):

    def _create_slave_info(self):

def swap_xapi_host(url, host_addr):

\OpenStack\nova-2014.1\nova\virt\xenapi\pool_states.py

def is_hv_pool(metadata):

\OpenStack\nova-2014.1\nova\virt\xenapi\vif.py

class XenVIFDriver(object):

    def __init__(self, xenapi_session):

class XenAPIBridgeDriver(XenVIFDriver):

    def plug(self, instance, vif, vm_ref=None, device=None):

    def _ensure_vlan_bridge(self, network):

    def unplug(self, instance, vif):

class XenAPIOpenVswitchDriver(XenVIFDriver):

    def plug(self, instance, vif, vm_ref=None, device=None):

    def unplug(self, instance, vif):

\OpenStack\nova-2014.1\nova\virt\xenapi\vmops.py

def make_step_decorator(context, instance, update_instance_progress, total_offset=0):

 def bump_progress():

 def step_decorator(f):

class VMOps(object):

    def __init__(self, session, virtapi):

    def agent_enabled(self, instance):

    def _get_agent(self, instance, vm_ref):

    def instance_exists(self, name_label):

    def list_instances(self):

    def list_instance_uuids(self):

    def confirm_migration(self, migration, instance, network_info):

    def _destroy_orig_vm(self, instance, network_info):

    def _attach_mapped_block_devices(self, instance, block_device_info):

    def finish_revert_migration(self, context, instance, block_device_info=None, power_on=True):

    def _restore_orig_vm_and_cleanup_orphan(self, instance, block_device_info=None, power_on=True):

    def finish_migration(self, context, migration, instance, disk_info, network_info, image_meta, resize_instance, block_device_info=None, power_on=True):

        def null_step_decorator(f):

        def create_disks_step(undo_mgr, disk_image_type, image_meta, name_label):

        def completed_callback():

    def _start(self, instance, vm_ref=None, bad_volumes_callback=None):

    def spawn(self, context, instance, image_meta, injected_files, admin_password, network_info=None, block_device_info=None, name_label=None, rescue=False):

        def create_disks_step(undo_mgr, disk_image_type, image_meta, name_label):

    def _spawn(self, context, instance, image_meta, step, create_disks_step, first_boot, injected_files=None, admin_password=None, network_info=None, block_device_info=None, name_label=None, rescue=False, power_on=True, resize=True, completed_callback=None):

        def attach_disks(undo_mgr, vm_ref, vdis, disk_image_type):

        def attach_pci_devices(undo_mgr, vm_ref):

        def determine_disk_image_type_step(undo_mgr):

        def create_kernel_ramdisk_step(undo_mgr):

        def create_vm_record_step(undo_mgr, disk_image_type, kernel_file, ramdisk_file):

        def attach_devices_step(undo_mgr, vm_ref, vdis, disk_image_type):

        def inject_instance_data_step(undo_mgr, vm_ref, vdis):

        def setup_network_step(undo_mgr, vm_ref):

        def boot_instance_step(undo_mgr, vm_ref):

        def configure_booted_instance_step(undo_mgr, vm_ref):

        def apply_security_group_filters_step(undo_mgr):

    def _attach_orig_disk_for_rescue(self, instance, vm_ref):

    def _file_inject_vm_settings(self, instance, vm_ref, vdis, network_info):

    def _ensure_instance_name_unique(self, name_label):

    def _ensure_enough_free_mem(self, instance):

    def _create_vm_record(self, context, instance, name_label, disk_image_type, kernel_file, ramdisk_file, image_meta):

    def _attach_disks(self, instance, vm_ref, name_label, vdis, disk_image_type, network_info, admin_password=None, files=None):

    def _wait_for_instance_to_start(self, instance, vm_ref):

    def _configure_new_instance_with_agent(self, instance, vm_ref, injected_files, admin_password):

    def _prepare_instance_filter(self, instance, network_info):

    def _get_vm_opaque_ref(self, instance, check_rescue=False):

    def _acquire_bootlock(self, vm):

    def _release_bootlock(self, vm):

    def snapshot(self, context, instance, image_id, update_task_state):

    def _get_orig_vm_name_label(self, instance):

    def _update_instance_progress(self, context, instance, step, total_steps):

    def _resize_ensure_vm_is_shutdown(self, instance, vm_ref):

    def _migrate_disk_resizing_down(self, context, instance, dest, flavor, vm_ref, sr_path):

        def fake_step_to_match_resizing_up():

        def rename_and_power_off_vm(undo_mgr):

        def create_copy_vdi_and_resize(undo_mgr, old_vdi_ref):

        def transfer_vhd_to_dest(new_vdi_ref, new_vdi_uuid):

    def _migrate_disk_resizing_up(self, context, instance, dest, vm_ref, sr_path):

        def fake_step_to_show_snapshot_complete():

        def transfer_immutable_vhds(root_vdi_uuids):

        def _process_ephemeral_chain_recursive(ephemeral_chains, active_vdi_uuids):

        def transfer_ephemeral_disks_then_all_leaf_vdis():

        def power_down_and_transfer_leaf_vhds(root_vdi_uuid, ephemeral_vdi_uuids=None):

    def _apply_orig_vm_name_label(self, instance, vm_ref):

    def _ensure_not_resize_down_ephemeral(self, instance, flavor):

    def migrate_disk_and_power_off(self, context, instance, dest, flavor, block_device_info):

    def _detach_block_devices_from_orig_vm(self, instance, block_device_info):

    def _resize_up_vdis(self, instance, vdis):

    def reboot(self, instance, reboot_type, bad_volumes_callback=None):

    def set_admin_password(self, instance, new_pass):

    def inject_file(self, instance, path, contents):

    def _sanitize_xenstore_key(key):

    def _inject_instance_metadata(self, instance, vm_ref):

        def store_meta(topdir, data_dict):

    def _inject_auto_disk_config(self, instance, vm_ref):

        def store_auto_disk_config(key, value):

    def change_instance_metadata(self, instance, diff):

        def process_change(location, change):

        def update_meta():

    def _find_root_vdi_ref(self, vm_ref):

    def _destroy_vdis(self, instance, vm_ref):

    def _destroy_kernel_ramdisk(self, instance, vm_ref):

    def _destroy_rescue_instance(self, rescue_vm_ref, original_vm_ref):

    def destroy(self, instance, network_info, block_device_info=None, destroy_disks=True):

    def _destroy(self, instance, vm_ref, network_info=None, destroy_disks=True):

    def pause(self, instance):

    def unpause(self, instance):

    def suspend(self, instance):

    def resume(self, instance):

    def rescue(self, context, instance, network_info, image_meta, rescue_password):

    def set_bootable(self, instance, is_bootable):

    def unrescue(self, instance):

    def soft_delete(self, instance):

    def restore(self, instance):

    def power_off(self, instance):

    def power_on(self, instance):

    def _cancel_stale_tasks(self, timeout, task):

    def poll_rebooting_instances(self, timeout, instances):

    def get_info(self, instance, vm_ref=None):

    def get_diagnostics(self, instance):

    def _get_vif_device_map(self, vm_rec):

    def get_all_bw_counters(self):

    def get_console_output(self, instance):

    def get_vnc_console(self, instance):

    def _vif_xenstore_data(self, vif):

        def get_ip(ip):

        def fixed_ip_dict(ip, subnet):

        def convert_route(route):

    def inject_network_info(self, instance, network_info, vm_ref=None):

        def update_nwinfo():

    def _create_vifs(self, instance, vm_ref, network_info):

    def plug_vifs(self, instance, network_info):

    def unplug_vifs(self, instance, network_info):

    def reset_network(self, instance, rescue=False):

    def _inject_hostname(self, instance, vm_ref, rescue):

        def update_hostname():

    def _remove_hostname(self, instance, vm_ref):

        def update_hostname():

    def _write_to_xenstore(self, instance, path, value, vm_ref=None):

    def _delete_from_xenstore(self, instance, path, vm_ref=None):

    def _make_plugin_call(self, plugin, method, instance=None, vm_ref=None, **addl_args):

    def _get_dom_id(self, instance=None, vm_ref=None, check_rescue=False):

    def _add_to_param_xenstore(self, vm_ref, key, val):

    def _remove_from_param_xenstore(self, vm_ref, key):

    def refresh_security_group_rules(self, security_group_id):

    def refresh_security_group_members(self, security_group_id):

    def refresh_instance_security_rules(self, instance):

    def refresh_provider_fw_rules(self):

    def unfilter_instance(self, instance_ref, network_info):

    def _get_host_uuid_from_aggregate(self, context, hostname):

    def _ensure_host_in_aggregate(self, context, hostname):

    def _get_host_opaque_ref(self, context, hostname):

    def _migrate_receive(self, ctxt):

    def _get_iscsi_srs(self, ctxt, instance_ref):

    def check_can_live_migrate_destination(self, ctxt, instance_ref, block_migration=False, disk_over_commit=False):

    def _is_xsm_sr_check_relaxed(self):

    def check_can_live_migrate_source(self, ctxt, instance_ref, dest_check_data):

    def _generate_vdi_map(self, destination_sr_ref, vm_ref, sr_ref=None):

    def _call_live_migrate_command(self, command_name, vm_ref, migrate_data):

    def live_migrate(self, context, instance, destination_hostname, post_method, recover_method, block_migration, migrate_data=None):

    def post_live_migration(self, context, instance, migrate_data=None):

    def post_live_migration_at_destination(self, context, instance, network_info, block_migration, block_device_info):

    def get_per_instance_usage(self):

        def _is_active(vm_rec):

        def _get_uuid(vm_rec):

    def attach_block_device_volumes(self, block_device_info):

\OpenStack\nova-2014.1\nova\virt\xenapi\vm_utils.py

class ImageType(object):

    def to_string(cls, image_type):

    def get_role(cls, image_type_id):

def get_vm_device_id(session, image_properties):

def _hypervisor_supports_device_id(version):

def create_vm(session, instance, name_label, kernel, ramdisk, use_pv_kernel=False, device_id=None):

def destroy_vm(session, instance, vm_ref):

OpenStack Index

Previous

Next