Module Expr Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Str Expr Call AttributeLoad NameLoad attr Str Str Str Expr Call AttributeLoad NameLoad attr Str NameLoad Str Expr Call AttributeLoad NameLoad attr Str Num Str Expr Call AttributeLoad NameLoad attr Str Num Str Expr Call AttributeLoad NameLoad attr Str Num Str Expr Call AttributeLoad NameLoad attr Str Str Str Expr Call AttributeLoad NameLoad attr Str Str Str Expr Call AttributeLoad NameLoad attr Str NameLoad Str Expr Call AttributeLoad NameLoad attr Str Str Str Expr Call AttributeLoad NameLoad attr Str Str Str Expr Call AttributeLoad NameLoad attr Str NameLoad Str Expr Call AttributeLoad NameLoad attr Str Str Str Expr Call AttributeLoad NameLoad attr Str Num Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If BoolOpOr UnaryOpNot NameLoad CompareIs NameLoad NameLoad body Raise Call NameLoad Call NameLoad Str Return Call NameLoad NameLoad NameLoad NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Dict Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Return decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareIn NameLoad TupleLoad Str Str body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad orelse Assign NameStore Call NameLoad Str Raise Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults vararg body Expr Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr For NameStore Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg body Expr Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad FunctionDef arguments args defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr NameLoad Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Slice Num keyword NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad If CompareEq NameLoad Str body Return orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Call NameLoad Str Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Call NameLoad Str Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str TryExcept body Return Call NameLoad NameLoad NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad If BoolOpAnd CompareEq Call NameLoad AttributeLoad NameLoad attr Num CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num Str CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num Str body Assign NameStore NameLoad TryExcept body Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num handlers ExceptHandler type NameLoad body Raise NameLoad Raise Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Raise ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Raise decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Expr Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Num Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Call NameLoad Str NameLoad Return TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Call NameLoad Str NameLoad Return Assign NameStore Call AttributeLoad AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr attr NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str BinOpSub NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str Num Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str Num Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str Num Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str Num Delete SubscriptDel NameLoad Index Str Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd Str NameLoad Str Return SubscriptLoad SubscriptLoad NameLoad Index Num Index Num decorator_list
N/A N/A 
A connection to XenServer or Xen Cloud Platform.

The concurrency model for this class is as follows:

All XenAPI calls are on a green thread (using eventlet's "tpool"
thread pool). They are remote calls, and so may hang for the usual
reasons.

All long-running XenAPI calls (VM.start, VM.reboot, etc) are called async
(using XenAPI.VM.async_start etc). These return a task, which can then be
polled for completion.

This combination of techniques means that we don't block the main thread at
all, and at the same time we don't hold lots of threads waiting for
long-running operations.

FIXME: get_info currently doesn't conform to these rules, and will block the
reactor thread if the VM.get_by_name_label or VM.get_record calls block.

**Related Flags**

:xenapi_connection_url:  URL for connection to XenServer/Xen Cloud Platform.
:xenapi_connection_username:  Username for connection to XenServer/Xen Cloud
                              Platform (default: root).
:xenapi_connection_password:  Password for connection to XenServer/Xen Cloud
                              Platform.
:xenapi_task_poll_interval:  The interval (seconds) used for polling of
                             remote tasks (Async.VM.start, etc)
                             (default: 0.5).
:target_host:                the iSCSI Target Host IP address, i.e. the IP
                             address for the nova-volume host
:target_port:                iSCSI Target Port, 3260 Default
:iqn_prefix:                 IQN Prefix, e.g. 'iqn.2010-10.org.openstack'

**Variable Naming Scheme**

- suffix "_ref" for opaque references
- suffix "_uuid" for UUIDs
- suffix "_rec" for record objects
 N/A json N/A random N/A sys N/A urlparse N/A xmlrpclib eventlet event eventlet tpool eventlet timeout nova context nova db nova exception nova utils nova flags nova log logging nova.virt driver nova.virt.xenapi vm_utils nova.virt.xenapi.vmops VMOps nova.virt.xenapi.volumeops VolumeOps N/A LOG N/A N/A logging getLogger nova.virt.xenapi N/A FLAGS N/A flags FLAGS N/A N/A N/A flags DEFINE_string xenapi_connection_url None URL for connection to XenServer/Xen Cloud Platform. Required if connection_type=xenapi. N/A N/A N/A flags DEFINE_string xenapi_connection_username root Username for connection to XenServer/Xen Cloud Platform. Used only if connection_type=xenapi. N/A N/A N/A flags DEFINE_string xenapi_connection_password None Password for connection to XenServer/Xen Cloud Platform. Used only if connection_type=xenapi. N/A N/A N/A flags DEFINE_float xenapi_task_poll_interval 0.5 The interval used for polling of remote tasks (Async.VM.start, etc). Used only if connection_type=xenapi. N/A N/A N/A flags DEFINE_float xenapi_vhd_coalesce_poll_interval 5.0 The interval used for polling of coalescing vhds.  Used only if connection_type=xenapi. N/A N/A N/A flags DEFINE_integer xenapi_vhd_coalesce_max_attempts 5 Max number of times to poll for VHD to coalesce.  Used only if connection_type=xenapi. N/A N/A N/A flags DEFINE_string xenapi_agent_path usr/sbin/xe-update-networking Specifies the path in which the xenapi guest agent  should be located. If the agent is present,  network configuration is not injected into the image  Used only if connection_type=xenapi.  and flat_injected=True N/A N/A N/A flags DEFINE_string xenapi_sr_base_path /var/run/sr-mount Base path to the storage repository N/A N/A N/A flags DEFINE_string target_host None iSCSI Target Host N/A N/A N/A flags DEFINE_string target_port 3260 iSCSI Target Port, 3260 Default N/A N/A N/A flags DEFINE_string iqn_prefix iqn.2010-10.org.openstack IQN Prefix N/A N/A N/A flags DEFINE_bool xenapi_remap_vbd_dev False Used to enable the remapping of VBD dev (Works around an issue in Ubuntu Maverick) N/A N/A N/A flags DEFINE_string xenapi_remap_vbd_dev_prefix sd Specify prefix to remap VBD dev to (ex. /dev/xvdb -> /dev/sdb) N/A N/A N/A flags DEFINE_integer xenapi_login_timeout 10 Timeout in seconds for XenAPI login. get_connection N/A N/A _ N/A N/A N/A Note that XenAPI doesn't have a read-only connection mode, so
    the read_only parameter is ignored. N/A url N/A FLAGS xenapi_connection_url N/A username N/A FLAGS xenapi_connection_username N/A password N/A FLAGS xenapi_connection_password N/A N/A N/A url N/A password None N/A N/A N/A Exception N/A _ Must specify xenapi_connection_url, xenapi_connection_username (optionally), and xenapi_connection_password to use connection_type=xenapi N/A N/A XenAPIConnection url username password N/A XenAPIConnection N/A N/A driver ComputeDriver N/A N/A A connection to XenServer or Xen Cloud Platform __init__ N/A N/A self url user pw N/A N/A N/A N/A N/A N/A super XenAPIConnection self __init__ N/A N/A self _session N/A XenAPISession url user pw N/A N/A self _vmops N/A VMOps N/A self _session N/A N/A self _volumeops N/A VolumeOps N/A self _session N/A N/A self _host_state None N/A HostState N/A N/A self N/A N/A N/A N/A N/A self _host_state N/A N/A N/A self _host_state N/A HostState N/A self _session N/A N/A self _host_state N/A property init_host N/A N/A self host N/A N/A N/A N/A list_instances N/A N/A self N/A N/A N/A List VM instances N/A N/A N/A N/A self _vmops list_instances N/A list_instances_detail N/A N/A self N/A N/A N/A N/A N/A N/A self _vmops list_instances_detail N/A spawn N/A N/A self context instance network_info block_device_info N/A None None N/A N/A Create VM instance N/A N/A N/A N/A self _vmops spawn context instance network_info N/A revert_migration N/A N/A self instance N/A N/A N/A Reverts a resize, powering back on the instance N/A N/A N/A N/A self _vmops revert_migration instance N/A finish_migration N/A N/A self context instance disk_info network_info resize_instance N/A False N/A N/A Completes a resize, turning on the migrated instance N/A N/A N/A N/A self _vmops finish_migration context instance disk_info network_info resize_instance N/A snapshot N/A N/A self context instance image_id N/A N/A N/A  Create snapshot from a running VM instance  N/A N/A N/A N/A self _vmops snapshot context instance image_id N/A reboot N/A N/A self instance network_info N/A N/A N/A Reboot VM instance N/A N/A N/A N/A self _vmops reboot instance N/A set_admin_password N/A N/A self instance new_pass N/A N/A N/A Set the root/admin password on the VM instance N/A N/A N/A N/A self _vmops set_admin_password instance new_pass N/A inject_file N/A N/A self instance b64_path b64_contents N/A N/A N/A Create a file on the VM instance. The file path and contents
        should be base64-encoded.
         N/A N/A N/A N/A self _vmops inject_file instance b64_path b64_contents N/A destroy N/A N/A self instance network_info cleanup N/A True N/A N/A Destroy VM instance N/A N/A N/A N/A self _vmops destroy instance network_info N/A pause N/A N/A self instance callback N/A N/A N/A Pause VM instance N/A N/A N/A N/A self _vmops pause instance callback N/A unpause N/A N/A self instance callback N/A N/A N/A Unpause paused VM instance N/A N/A N/A N/A self _vmops unpause instance callback N/A migrate_disk_and_power_off N/A N/A self instance dest N/A N/A N/A Transfers the VHD of a running instance to another host, then shuts
        off the instance copies over the COW disk N/A N/A N/A N/A self _vmops migrate_disk_and_power_off instance dest N/A suspend N/A N/A self instance callback N/A N/A N/A suspend the specified instance N/A N/A N/A N/A self _vmops suspend instance callback N/A resume N/A N/A self instance callback N/A N/A N/A resume the specified instance N/A N/A N/A N/A self _vmops resume instance callback N/A rescue N/A N/A self context instance _callback network_info N/A N/A N/A Rescue the specified instance N/A N/A N/A N/A self _vmops rescue context instance _callback network_info N/A unrescue N/A N/A self instance _callback network_info N/A N/A N/A Unrescue the specified instance N/A N/A N/A N/A self _vmops unrescue instance _callback N/A poll_rescued_instances N/A N/A self timeout N/A N/A N/A Poll for rescued instances N/A N/A N/A N/A self _vmops poll_rescued_instances timeout N/A reset_network N/A N/A self instance N/A N/A N/A reset networking for specified instance N/A N/A N/A N/A self _vmops reset_network instance N/A inject_network_info N/A N/A self instance network_info N/A N/A N/A inject network info for specified instance N/A N/A N/A N/A self _vmops inject_network_info instance network_info N/A plug_vifs N/A N/A self instance_ref network_info N/A N/A N/A N/A N/A N/A self _vmops plug_vifs instance_ref network_info N/A get_info N/A N/A self instance_id N/A N/A N/A Return data about VM instance N/A N/A N/A N/A self _vmops get_info instance_id N/A get_diagnostics N/A N/A self instance N/A N/A N/A Return data about VM diagnostics N/A N/A N/A N/A self _vmops get_diagnostics instance N/A get_console_output N/A N/A self instance N/A N/A N/A Return snapshot of console N/A N/A N/A N/A self _vmops get_console_output instance N/A get_ajax_console N/A N/A self instance N/A N/A N/A Return link to instance's ajax console N/A N/A N/A N/A self _vmops get_ajax_console instance N/A get_host_ip_addr N/A N/A self N/A N/A N/A xs_url N/A N/A urlparse urlparse N/A FLAGS xenapi_connection_url N/A N/A xs_url netloc N/A attach_volume N/A N/A self instance_name device_path mountpoint N/A N/A N/A Attach volume storage to VM instance N/A N/A N/A N/A self _volumeops attach_volume instance_name device_path mountpoint N/A detach_volume N/A N/A self instance_name mountpoint N/A N/A N/A Detach volume storage to VM instance N/A N/A N/A N/A self _volumeops detach_volume instance_name mountpoint N/A get_console_pool_info N/A N/A self console_type N/A N/A N/A xs_url N/A N/A urlparse urlparse N/A FLAGS xenapi_connection_url N/A N/A address username password N/A xs_url netloc N/A FLAGS xenapi_connection_username N/A FLAGS xenapi_connection_password N/A update_available_resource N/A N/A self ctxt host N/A N/A N/A This method is supported only by libvirt. N/A N/A compare_cpu N/A N/A self xml N/A N/A N/A This method is supported only by libvirt. N/A N/A NotImplementedError This method is supported only by libvirt. N/A ensure_filtering_rules_for_instance N/A N/A self instance_ref network_info N/A N/A N/A This method is supported only libvirt. N/A N/A live_migration N/A N/A self context instance_ref dest post_method recover_method block_migration N/A False N/A N/A This method is supported only by libvirt. N/A N/A unfilter_instance N/A N/A self instance_ref network_info N/A N/A N/A This method is supported only by libvirt. N/A N/A NotImplementedError This method is supported only by libvirt. N/A update_host_status N/A N/A self N/A N/A N/A Update the status info of the host, and return those values
            to the calling program. N/A N/A N/A N/A self HostState update_status N/A get_host_stats N/A N/A self refresh N/A False N/A N/A Return the current state of the host. If 'refresh' is
           True, run the update first. N/A N/A N/A N/A self HostState get_host_stats refresh refresh N/A host_power_action N/A N/A self host action N/A N/A N/A The only valid values for 'action' on XenServer are 'reboot' or
        'shutdown', even though the API also accepts 'startup'. As this is
        not technically possible on XenServer, since the host is the same
        physical machine as the hypervisor, if this is requested, we need to
        raise an exception.
         N/A N/A action N/A reboot shutdown N/A N/A N/A N/A N/A self _vmops host_power_action host action N/A N/A msg N/A _ Host startup on XenServer is not supported. N/A N/A NotImplementedError msg N/A set_host_enabled N/A N/A self host enabled N/A N/A N/A Sets the specified host's ability to accept new instances. N/A N/A N/A N/A self _vmops set_host_enabled host enabled N/A N/A XenAPISession N/A object N/A N/A The session to invoke XenAPI SDK calls __init__ N/A N/A self url user pw N/A N/A N/A N/A self XenAPI N/A N/A self get_imported_xenapi N/A N/A self _session N/A N/A self _create_session url N/A exception N/A N/A N/A self XenAPI Failure N/A _ Unable to log in to XenAPI (is the Dom0 disk full?) N/A N/A N/A timeout Timeout N/A FLAGS xenapi_login_timeout exception N/A N/A N/A N/A N/A self _session login_with_password user pw N/A get_imported_xenapi N/A N/A self N/A N/A N/A Stubout point. This can be replaced with a mock xenapi module. N/A N/A __import__ XenAPI N/A get_xenapi N/A N/A self N/A N/A N/A Return the xenapi object N/A N/A N/A self _session xenapi N/A get_xenapi_host N/A N/A self N/A N/A N/A Return the xenapi host N/A N/A N/A N/A N/A N/A self _session xenapi session get_this_host N/A N/A self _session handle N/A call_xenapi N/A N/A self method N/A args N/A N/A Call the specified XenAPI method on a background thread. N/A f N/A N/A self _session xenapi N/A m N/A N/A method split . N/A N/A f N/A N/A f __getattr__ m N/A N/A N/A tpool execute f args N/A call_xenapi_request N/A N/A self method N/A args N/A N/A Some interactions with dom0, such as interacting with xenstore's
        param record, require using the xenapi_request method of the session
        object. This wraps that call on a background thread.
         N/A f N/A N/A self _session xenapi_request N/A N/A N/A tpool execute f method args N/A async_call_plugin N/A N/A self plugin fn args N/A N/A N/A Call Async.host.call_plugin on a background thread. N/A N/A N/A tpool execute N/A self _unwrap_plugin_exceptions N/A N/A N/A N/A N/A self _session xenapi Async host call_plugin N/A N/A self get_xenapi_host plugin fn args N/A wait_for_task N/A N/A self task id N/A None N/A N/A Return the result of the given task. The task is polled
        until it completes. N/A done N/A N/A event Event N/A loop N/A N/A utils LoopingCall f None _poll_task N/A N/A N/A N/A N/A Poll the given XenAPI task, and return the result if the
            action was completed successfully or not.
             N/A N/A N/A name N/A N/A N/A N/A N/A self _session xenapi task get_name_label task N/A status N/A N/A N/A N/A N/A self _session xenapi task get_status task N/A action N/A dict action N/A name N/A 255 error None N/A id N/A N/A N/A action N/A instance_id N/A int id N/A N/A status pending N/A N/A N/A N/A N/A status success N/A N/A result N/A N/A N/A N/A N/A self _session xenapi task get_result task N/A N/A N/A LOG info N/A N/A _ Task [%(name)s] %(task)s status: success    %(result)s N/A locals N/A N/A N/A done send N/A _parse_xmlrpc_value result N/A N/A error_info N/A N/A N/A N/A N/A self _session xenapi task get_error_info task N/A N/A action N/A error N/A str error_info N/A N/A N/A LOG warn N/A N/A _ Task [%(name)s] %(task)s status: %(status)s    %(error_info)s N/A locals N/A N/A N/A done send_exception N/A N/A N/A self XenAPI Failure error_info N/A id N/A N/A N/A N/A db instance_action_create N/A N/A context get_admin_context action N/A N/A N/A N/A N/A self XenAPI Failure N/A exc N/A N/A N/A N/A LOG warn exc N/A N/A N/A done send_exception N/A N/A sys exc_info N/A N/A N/A loop stop N/A N/A N/A loop f _poll_task N/A N/A N/A loop start N/A FLAGS xenapi_task_poll_interval now True N/A N/A N/A done wait N/A _create_session N/A N/A self url N/A N/A N/A Stubout point. This can be replaced with a mock session. N/A N/A N/A N/A self XenAPI Session url N/A _unwrap_plugin_exceptions N/A N/A self func N/A args kwargs N/A N/A Parse exception details N/A N/A N/A N/A func args kwargs N/A N/A N/A N/A N/A self XenAPI Failure N/A exc N/A N/A N/A N/A LOG debug N/A _ Got exception: %s exc N/A N/A N/A N/A len N/A exc details 4 N/A N/A N/A exc details N/A 0 XENAPI_PLUGIN_EXCEPTION N/A N/A N/A exc details N/A 2 Failure N/A N/A params None N/A N/A N/A params N/A eval N/A N/A exc details N/A 3 N/A N/A N/A Exception N/A N/A exc N/A N/A N/A N/A self XenAPI Failure params N/A N/A N/A N/A N/A xmlrpclib ProtocolError N/A exc N/A N/A N/A N/A LOG debug N/A _ Got exception: %s exc N/A N/A N/A HostState N/A object N/A N/A Manages information about the XenServer host this compute
    node is running on.
     __init__ N/A N/A self session N/A N/A N/A N/A N/A N/A super HostState self __init__ N/A N/A self _session session N/A N/A self _stats N/A N/A N/A N/A self update_status N/A get_host_stats N/A N/A self refresh N/A False N/A N/A Return the current state of the host. If 'refresh' is
        True, run the update first.
         N/A refresh N/A N/A N/A N/A self update_status N/A N/A self _stats N/A update_status N/A N/A self N/A N/A N/A Since under Xenserver, a compute node runs on a given host,
        we can get host status information using xenapi.
         N/A N/A N/A LOG debug N/A _ Updating host stats N/A task_id N/A N/A random randint -80000 -70000 N/A task N/A N/A N/A self _session async_call_plugin xenhost host_data N/A N/A task_result N/A N/A N/A self _session wait_for_task task task_id N/A N/A task_result N/A N/A task_result N/A N/A json dumps N/A N/A N/A data N/A N/A json loads task_result N/A N/A N/A ValueError N/A e N/A N/A N/A N/A LOG error N/A N/A _ Unable to get updated status: %s e N/A N/A N/A N/A sr_ref N/A N/A vm_utils safe_find_sr N/A self _session N/A N/A N/A N/A exception NotFound N/A e N/A N/A N/A N/A LOG error N/A N/A _ Unable to get SR for this host: %s e N/A N/A sr_rec N/A N/A N/A N/A N/A N/A self _session get_xenapi SR get_record sr_ref N/A total N/A int N/A sr_rec N/A virtual_allocation N/A used N/A int N/A sr_rec N/A physical_utilisation N/A N/A data N/A disk_total total N/A N/A data N/A disk_used used N/A N/A data N/A disk_available N/A total used N/A host_memory N/A N/A data get host_memory None N/A host_memory N/A N/A N/A data N/A host_memory_total N/A N/A host_memory get total 0 N/A N/A data N/A host_memory_overhead N/A N/A host_memory get overhead 0 N/A N/A data N/A host_memory_free N/A N/A host_memory get free 0 N/A N/A data N/A host_memory_free_computed N/A N/A host_memory get free-computed 0 N/A N/A data N/A host_memory N/A N/A self _stats data N/A N/A _parse_xmlrpc_value N/A N/A val N/A N/A N/A Parse the given value as if it were an XML-RPC value. This is
    sometimes used as the format for the task.result field. N/A N/A val N/A N/A val N/A x N/A N/A xmlrpclib loads N/A N/A <?xml version="1.0"?><methodResponse><params><param> val </param></params></methodResponse> N/A N/A N/A x N/A 0 N/A 0 N/A