¡@

Home 

OpenStack Study:

OpenStack Index

Previous

Next

def clean_shutdown_vm(session, instance, vm_ref):

def hard_shutdown_vm(session, instance, vm_ref):

def is_vm_shutdown(session, vm_ref):

def is_enough_free_mem(session, instance):

def find_vbd_by_number(session, vm_ref, number):

def _should_retry_unplug_vbd(err):

def unplug_vbd(session, vbd_ref, this_vm_ref):

def destroy_vbd(session, vbd_ref):

def create_vbd(session, vm_ref, vdi_ref, userdevice, vbd_type='disk', read_only=False, bootable=False, osvol=False, empty=False, unpluggable=True):

def attach_cd(session, vm_ref, vdi_ref, userdevice):

def destroy_vdi(session, vdi_ref):

def safe_destroy_vdis(session, vdi_refs):

def create_vdi(session, sr_ref, instance, name_label, disk_type, virtual_size, read_only=False):

def get_vdi_uuid_for_volume(session, connection_data):

def get_vdis_for_instance(context, session, instance, name_label, image, image_type, block_device_info=None):

def _dummy_vm(session, instance, vdi_ref):

def _safe_copy_vdi(session, sr_ref, instance, vdi_to_copy_ref):

def _clone_vdi(session, vdi_to_clone_ref):

def _get_vdi_other_config(disk_type, instance=None):

def _set_vdi_info(session, vdi_ref, vdi_type, name_label, description, instance):

def _vm_get_vbd_refs(session, vm_ref):

def _vbd_get_rec(session, vbd_ref):

def _vdi_get_rec(session, vdi_ref):

def _vdi_get_uuid(session, vdi_ref):

def _vdi_snapshot(session, vdi_ref):

def get_vdi_for_vm_safely(session, vm_ref, userdevice='0'):

def get_all_vdi_uuids_for_vm(session, vm_ref, min_userdevice=0):

def _try_strip_base_mirror_from_vdi(session, vdi_ref):

def strip_base_mirror_from_vdis(session, vm_ref):

def snapshot_attached_here(session, instance, vm_ref, label, userdevice='0', post_snapshot_callback=None):

def _snapshot_attached_here_impl(session, instance, vm_ref, label, userdevice, post_snapshot_callback):

def get_sr_path(session, sr_ref=None):

def destroy_cached_images(session, sr_ref, all_cached=False, dry_run=False):

    def destroy_cached_vdi(vdi_uuid, vdi_ref):

def _find_cached_images(session, sr_ref):

def _find_cached_image(session, image_id, sr_ref):

def _get_resize_func_name(session):

def _vdi_get_virtual_size(session, vdi_ref):

def _vdi_resize(session, vdi_ref, new_size):

def update_vdi_virtual_size(session, instance, vdi_ref, new_gb):

def resize_disk(session, instance, vdi_ref, flavor):

def _auto_configure_disk(session, vdi_ref, new_gb):

def try_auto_configure_disk(session, vdi_ref, new_gb):

def _make_partition(session, dev, partition_start, partition_end):

def _generate_disk(session, instance, vm_ref, userdevice, name_label, disk_type, size_mb, fs_type):

def generate_swap(session, instance, vm_ref, userdevice, name_label, swap_mb):

def get_ephemeral_disk_sizes(total_size_gb):

def generate_single_ephemeral(session, instance, vm_ref, userdevice, size_gb, instance_name_label=None):

def generate_ephemeral(session, instance, vm_ref, first_userdevice, instance_name_label, total_size_gb):

def generate_iso_blank_root_disk(session, instance, vm_ref, userdevice, name_label, size_gb):

def generate_configdrive(session, instance, vm_ref, userdevice, network_info, admin_password=None, files=None):

def _create_kernel_image(context, session, instance, name_label, image_id, image_type):

def create_kernel_and_ramdisk(context, session, instance, name_label):

def destroy_kernel_ramdisk(session, instance, kernel, ramdisk):

def _get_image_vdi_label(image_id):

def _create_cached_image(context, session, instance, name_label, image_id, image_type):

    def _create_cached_image_impl(context, session, instance, name_label, image_id, image_type, sr_ref):

        def do_scan(sr_ref):

    def execute(*cmd, **kwargs):

def _repair_filesystem(partition_path):

def _resize_part_and_fs(dev, start, old_sectors, new_sectors):

def _log_progress_if_required(left, last_log_time, virtual_size):

def _sparse_copy(src_path, dst_path, virtual_size, block_size=4096):

def _copy_partition(session, src_ref, dst_ref, partition, virtual_size):

def _mount_filesystem(dev_path, dir):

def _mounted_processing(device, key, net, metadata):

def _prepare_injectables(inst, network_info):

def ensure_correct_host(session):

def import_all_migrated_disks(session, instance):

def _import_migrated_root_disk(session, instance):

def _import_migrate_ephemeral_disks(session, instance):

def _import_migrated_vhds(session, instance, chain_label, disk_type, vdi_label):

def migrate_vhd(session, instance, vdi_uuid, dest, sr_path, seq_num, ephemeral_number=0):

def vm_ref_or_raise(session, instance_name):

def handle_ipxe_iso(session, instance, cd_vdi, network_info):

def set_other_config_pci(session, vm_ref, params):

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

class VolumeOps(object):

    def __init__(self, session):

    def attach_volume(self, connection_info, instance_name, mountpoint, hotplug=True):

    def connect_volume(self, connection_info):

    def _connect_volume(self, connection_info, dev_number=None, instance_name=None, vm_ref=None, hotplug=True):

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

    def _get_all_volume_vbd_refs(self, vm_ref):

    def _detach_vbd(self, vbd_ref, unplug, vm_ref):

    def detach_all(self, vm_ref):

    def find_bad_volumes(self, vm_ref):

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

class StorageError(Exception):

    def __init__(self, message=None):

def _handle_sr_params(params):

def create_sr(session, label, params):

def introduce_sr(session, sr_uuid, label, params):

def forget_sr(session, sr_ref):

def find_sr_by_uuid(session, sr_uuid):

def find_sr_from_vbd(session, vbd_ref):

def create_pbd(session, sr_ref, params):

def unplug_pbds(session, sr_ref):

def _get_vdi_ref(session, sr_ref, vdi_uuid, target_lun):

def introduce_vdi(session, sr_ref, vdi_uuid=None, target_lun=None):

def purge_sr(session, sr_ref):

def get_device_number(mountpoint):

def parse_sr_info(connection_data, description=''):

def parse_volume_info(connection_data):

def mountpoint_to_number(mountpoint):

def _get_target_host(iscsi_string):

def _get_target_port(iscsi_string):

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

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

\OpenStack\nova-2014.1\nova\vnc\xvp_proxy.py

class XCPVNCProxy(object):

    def one_way_proxy(self, source, dest):

    def handshake(self, req, connect_info, sockets):

    def proxy_connection(self, req, connect_info, start_response):

    def __call__(self, environ, start_response):

class SafeHttpProtocol(eventlet.wsgi.HttpProtocol):

    def finish(self):

def get_wsgi_server():

\OpenStack\nova-2014.1\nova\vnc\__init__.py

\OpenStack\nova-2014.1\nova\volume\cinder.py

def cinderclient(context):

def _untranslate_volume_summary_view(context, vol):

def _untranslate_snapshot_summary_view(context, snapshot):

def translate_volume_exception(method):

 def wrapper(self, ctx, volume_id, *args, **kwargs):

def translate_snapshot_exception(method):

 def wrapper(self, ctx, snapshot_id, *args, **kwargs):

class API(object):

    def get(self, context, volume_id):

    def get_all(self, context, search_opts={}):

    def check_attached(self, context, volume):

    def check_attach(self, context, volume, instance=None):

    def check_detach(self, context, volume):

    def reserve_volume(self, context, volume_id):

    def unreserve_volume(self, context, volume_id):

    def begin_detaching(self, context, volume_id):

    def roll_detaching(self, context, volume_id):

    def attach(self, context, volume_id, instance_uuid, mountpoint):

    def detach(self, context, volume_id):

    def initialize_connection(self, context, volume_id, connector):

    def terminate_connection(self, context, volume_id, connector):

    def migrate_volume_completion(self, context, old_volume_id, new_volume_id, error=False):

    def create(self, context, size, name, description, snapshot=None, image_id=None, volume_type=None, metadata=None, availability_zone=None):

    def delete(self, context, volume_id):

    def update(self, context, volume_id, fields):

    def get_snapshot(self, context, snapshot_id):

    def get_all_snapshots(self, context):

    def create_snapshot(self, context, volume_id, name, description):

    def create_snapshot_force(self, context, volume_id, name, description):

    def delete_snapshot(self, context, snapshot_id):

    def get_volume_encryption_metadata(self, context, volume_id):

    def get_volume_metadata(self, context, volume_id):

    def delete_volume_metadata(self, context, volume_id, key):

    def update_volume_metadata(self, context, volume_id, metadata, delete=False):

    def get_volume_metadata_value(self, volume_id, key):

    def update_snapshot_status(self, context, snapshot_id, status):

\OpenStack\nova-2014.1\nova\volume\encryptors\base.py

class VolumeEncryptor(object):

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

    def _get_key(self, context):

    def attach_volume(self, context, **kwargs):

    def detach_volume(self, **kwargs):

\OpenStack\nova-2014.1\nova\volume\encryptors\cryptsetup.py

class CryptsetupEncryptor(base.VolumeEncryptor):

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

    def _get_passphrase(self, key):

    def _open_volume(self, passphrase, **kwargs):

    def attach_volume(self, context, **kwargs):

    def _close_volume(self, **kwargs):

    def detach_volume(self, **kwargs):

\OpenStack\nova-2014.1\nova\volume\encryptors\luks.py

class LuksEncryptor(cryptsetup.CryptsetupEncryptor):

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

    def _format_volume(self, passphrase, **kwargs):

    def _open_volume(self, passphrase, **kwargs):

    def attach_volume(self, context, **kwargs):

    def _close_volume(self, **kwargs):

\OpenStack\nova-2014.1\nova\volume\encryptors\nop.py

class NoOpEncryptor(base.VolumeEncryptor):

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

    def attach_volume(self, context):

    def detach_volume(self):

\OpenStack\nova-2014.1\nova\volume\encryptors\__init__.py

def get_volume_encryptor(connection_info, **kwargs):

def get_encryption_metadata(context, volume_api, volume_id, connection_info):

\OpenStack\nova-2014.1\nova\volume\__init__.py

def API():

\OpenStack\nova-2014.1\nova\weights.py

def normalize(weight_list, minval=None, maxval=None):

class WeighedObject(object):

    def __init__(self, obj, weight):

    def __repr__(self):

class BaseWeigher(object):

    def weight_multiplier(self):

    def _weigh_object(self, obj, weight_properties):

    def weigh_objects(self, weighed_obj_list, weight_properties):

class BaseWeightHandler(loadables.BaseLoader):

    def get_weighed_objects(self, weigher_classes, obj_list, weighing_properties):

\OpenStack\nova-2014.1\nova\wsgi.py

class Server(object):

    def __init__(self, name, app, host='0.0.0.0', port=0, pool_size=None, protocol=eventlet.wsgi.HttpProtocol, backlog=128, use_ssl=False, max_url_len=None):

    def start(self):

    def stop(self):

    def wait(self):

class Request(webob.Request):

class Application(object):

    def factory(cls, global_config, **local_config):

    def __call__(self, environ, start_response):

        def __call__(self, req):

class Middleware(Application):

    def factory(cls, global_config, **local_config):

        def _factory(app):

    def __init__(self, application):

    def process_request(self, req):

    def process_response(self, response):

    def __call__(self, req):

class Debug(Middleware):

    def __call__(self, req):

    def print_generator(app_iter):

class Router(object):

    def __init__(self, mapper):

    def __call__(self, req):

    def _dispatch(req):

class Loader(object):

    def __init__(self, config_path=None):

    def load_app(self, name):

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