- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 18.188.178.1
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib64/python3.6/site-packages/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/python3.6/site-packages/__pycache__/libvirt.cpython-36.pyc
3

�rkcf��#@s�yddlZWnbek
rnZzFyddlZWn2ek
r\Zzdee�krLe�WYddZ[XnXWYddZ[XnXddlmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZmZed�Ze
eeeegdfZe
eeeegefZe
eegdfZe
egefZe
eegdfZe
eeegefZe
eegdfZe
egefZe
ddeeege
efZeee	fZeee	fZeee	fZ eee	fZ!Gdd	�d	e"�Z#e
eegdfeed
�dd�Z$�d�eeedd
�dd�Z%�d�e
eed�dd�Z&e�d�eeeeeefddd�dd��Z'e�d�eeeeedd�dd��Z'�d�eeeeeeefefe
edd�dd�Z'�d�eeeeefefe
edd�dd�Z(eeeeee	fed�dd�Z)eeee	fed�dd �Z*eeeeed!�d"d#�Z+eeeed$�d%d&�Z,e	dd'�d(d)�Z-�d�d*d+�Z.�d�d,d-�Z/d.d/�Z0d0d1�Z1d2d3�Z2d4d5�Z3d6d7�Z4d8d9�Z5d:d;�Z6d<d=�Z7d>d?�Z8d@dA�Z9dBdC�Z:dDdE�Z;dFdG�Z<GdHd�de=�Z>GdIdJ�dJe=�Z?GdKdL�dLe=�Z@GdMdN�dNe=�ZAGdOdP�dPe=�ZBGdQdR�dRe=�ZCGdSd�de=�ZDGdTdU�dUe=�ZEGdVdW�dWe=�ZFGdXdY�dYe=�ZGGdZd[�d[e=�ZHGd\d]�d]e=�ZIGd^d_�d_e=�ZJGd`da�dae=�ZKdbZLdcZMddZNdeZOdfZPdgZQ�d�ZRdZSdbZTdcZUdbZVdcZWdZXdbZYdcZZddZ[dbZ\dcZ]dbZ^dcZ_ddZ`deZadfZbdgZcdhZddiZedjZfdZgdbZhdcZidbZjdcZkdZldbZmdcZnddZodZpdbZqdbZrdcZsdbZtdcZudeZvdiZwdkZxdlZydmZzdnZ{doZ|dpZ}dqZ~dbZdcZ�deZ�diZ�dkZ�dlZ�dmZ�dnZ�drZ�dsZ�dtZ�duZ�dvZ�dwZ�dxZ�dyZ�dbZ�dcZ�dbZ�dcZ�deZ�diZ�dkZ�dlZ�dbZ�dcZ�deZ�diZ�dkZ�dlZ�dmZ�dnZ�drZ�dsZ�dtZ�duZ�dvZ�dwZ�dxZ�dyZ�dzZ�d{Z�d|Z�d}Z�d~Z�dZ�dpZ�dqZ�dbZ�dcZ�deZ�diZ�dbZ�dcZ�deZ�diZ�dkZ�dlZ�dmZ�dnZ�drZ�dsZ�dtZ�duZ�dvZ�dwZ�dxZ�dyZ�dzZ�d{Z�d|Z�d}ZƐd�Zǐd�Z�dZ�dbZ�dcZ�dbZ�dbZ�dcZ�deZ�diZ�dkZ�dbZ�dcZ�deZ�diZ�dbZ�dcZ�dbZ�dbZ�dZ�dbZ�dcZ�ddZ�deZ�dfZ�dmZ�dbZ�dcZ�deZ�diZ�dkZ�dlZ�dmZ�dbZ�dZ�dbZ�dbZ�dcZ�deZ�dbZ�dcZ�deZ�dbZ�dbZ�dcZ�deZ�diZ�dbZ�dcZ�deZ�dbZ�dcZ�dZ�dbZ�dcZ�ddZ�dZ�db�Zdc�Zdd�Zdb�Zdc�Zde�Zdi�Zdk�Zd�Zdb�Z	dc�Z
dd�Zde�Zd�Z
db�Zd�Zdb�Zdc�Zde�Zdi�Zdk�Zdb�Zd�Zdb�Zd�Zdb�Zdc�Zde�Zd�Zdb�Zdc�Zd�Zdb�Z dc�Z!d�Z"db�Z#d�Z$db�Z%dc�Z&dd�Z'd�Z(db�Z)dc�Z*d�Z+db�Z,dc�Z-d�Z.db�Z/dc�Z0dd�Z1de�Z2df�Z3dg�Z4dh�Z5di�Z6dj�Z7d��Z8d��Z9d��Z:d��Z;d��Z<d��Z=dk�Z>d��Z?d��Z@d��ZAd��ZBd��ZCd��ZDd��ZEd��ZFd��ZGd��ZHd�ZIdb�ZJdc�ZKd�ZLdb�ZMd�ZNdb�ZOdc�ZPdd�ZQd�ZRdb�ZSdc�ZTd�ZUdb�ZVdc�ZWdd�ZXde�ZYd�ZZdb�Z[dc�Z\dd�Z]de�Z^df�Z_dg�Z`d�Zadb�Zbdc�Zcdd�Zdde�Zedf�Zfdg�Zgdh�Zhdi�Zid�Zjdb�Zkd�Zldb�Zmdc�Zndd�Zode�Zpdf�Zqdg�Zrdh�Zsdi�Ztd�Zudb�Zvd�Zwdb�Zxdc�Zydd�Zzde�Z{df�Z|dg�Z}db�Z~dc�Zdb�Z�dc�Z�db�Z�dc�Z�de�Z�di�Z�dk�Z�dl�Z�dm�Z�d�Z�db�Z�dc�Z�d�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�dg�Z�dh�Z�di�Z�dj�Z�d�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�d�Z�db�Z�dc�Z�d�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�d�Z�db�Z�dc�Z�dd�Z�db�Z�dc�Z�d�Z�db�Z�db�Z�dc�Z�d�Z�db�Z�dc�Z�de�Z�d�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�dg�Z�dh�Z�di�Z�dj�Z�d��Z�d��Z�d��Z�d��Z�d��Z�db�Z�dc�Z�d�Z�db�Z�dc�Z�db�Z�dc�Z�de�Z�di�Z�dk�Z�dl�Z�dm�Z�dn�Z�dr�Z�ds�Z�dt�Z�du�Z�dv�Z�dw�Z�dx�Z�dy�Z�dz�Z�d{�Z�d|�Z�d~�Z�db�Z�d�Z�db�Z�dc�Z�d�Z�d�Z�db�Z�dc�Z�dd�Z�db�Z�d�Z�d�Z�d�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�dg�Z�dh�Z�di�Z�dj�Z�d��Z�d��Z�d��Z�d��Z�d�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�dg�Z�dh�Z�di�Z�dj�Z�d��Z�d��Zd��Zd��Zd��Zd��Zdk�Zd��Zd��Zd��Zd��Z	d��Z
d��Zd��Zd��Z
d��Zd��Zd��Zd��Zd��Zd��Zd��Zdl�Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Z d��Z!d��Z"d��Z#d��Z$d��Z%d��Z&d��Z'd��Z(d��Z)d��Z*d��Z+d��Z,d��Z-d��Z.d��Z/d��Z0d��Z1d��Z2d��Z3d��Z4dm�Z5d�Z6db�Z7dc�Z8de�Z9di�Z:dk�Z;d�Z<db�Z=dc�Z>dd�Z?de�Z@df�ZAdg�ZBdh�ZCdi�ZDdj�ZEd��ZFdb�ZGdb�ZHdc�ZIde�ZJdb�ZKdb�ZLd�ZMdb�ZNdc�ZOde�ZPdi�ZQdk�ZRd�ZSdb�ZTd�ZUdb�ZVdc�ZWdd�ZXde�ZYdf�ZZdg�Z[dh�Z\di�Z]db�Z^dc�Z_de�Z`di�Zadk�Zbdl�Zcdm�Zddn�Zedr�Zfds�Zgdb�Zhdc�Zide�Zjdb�Zkdb�Zldc�Zmde�Zndi�Zodk�Zpdl�Zqdm�Zrdn�Zsdr�Ztds�Zudt�Zvdb�Zwdc�Zxde�Zydb�Zzd�Z{db�Z|dc�Z}dd�Z~de�Zdf�Z�dg�Z�dh�Z�db�Z�dc�Z�de�Z�di�Z�dk�Z�dl�Z�dm�Z�dn�Z�dr�Z�ds�Z�db�Z�dc�Z�de�Z�di�Z�dk�Z�d�Z�db�Z�dc�Z�de�Z�di�Z�dk�Z�db�Z�dc�Z�de�Z�di�Z�d�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�dg�Z�dh�Z�di�Z�dj�Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�dk�Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�dl�Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�dm�Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d�Z�db�Z�dc�Z�d�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�dg�Z�dh�Z�di�Z�dj�Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�dk�Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zdl�Zd��Z	d��Z
d��Zd��Zd��Z
d��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Z d��Z!d��Z"d��Z#d��Z$d��Z%d��Z&d��Z'dm�Z(d��Z)d��Z*d��Z+d��Z,d��Z-d��Z.d��Z/d��Z0d��Z1d��Z2d��Z3d��Z4d��Z5d��Z6dZ7dÐZ8dĐZ9dŐZ:dƐZ;dǐZ<dȐZ=dɐZ>dʐZ?dːZ@d̐ZAd͐ZBdΐZCdϐZDdАZEdѐZFdҐZGdӐZHdԐZIdՐZJd֐ZKdאZLdؐZMdِZNdڐZOdېZPdܐZQdݐZRdސZSdߐZTd�ZUd�ZVdb�ZWdc�ZXde�ZYdi�ZZd�Z[db�Z\db�Z]db�Z^d�Z_db�Z`dc�Zadd�Zbde�Zcdf�Zddg�Zedh�Zfdi�Zgdj�Zhdb�Zidc�Zjdd�Zkde�Zldf�Zmdg�Zndb�Zodb�Zpdb�Zqdb�Zrd�Zsd�Ztdb�Zudc�Zvdd�Zwdb�Zxdc�Zyd�Zzdb�Z{dc�Z|dd�Z}de�Z~d�Zdb�Z�dc�Z�d�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�dg�Z�dh�Z�di�Z�dj�Z�d��Z�d��Z�d��Z�db�Z�d�Z�db�Z�d�Z�db�Z�d�Z�db�Z�dc�Z�dd�Z��dʐZ��dːZ�d�Z�db�Z�dc�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�dg�Z�db�Z�d�Z�db�Z�d�Z�db�Z�d�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�d�Z�db�Z�dc�Z�de�Z�di�Z�d�Z�db�Z�dc�Z�de�Z�db�Z�d�Z�db�Z�d�Z�db�Z�d�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�d�Z�db�Z�dc�Z�dd�Z�de�Z�db�Z�dc�Z�d�Z�db�Z�dc�Z�db�Z�d�Z�db�Z�db�Z�dc�Z�de�Z�d�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�db�Z�d�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�dg�Z�dh�Z�di�Z�dj�Z�db�Z�db�Z�dc�Z�de�Z�di�Z�db�Z�db�Z�de�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�dg�Z�dh�Z�d̐Z�d͐Z�d�Z�db�Z�dc�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d��Z
d��Zd��Zd��Z
d��Zd��Zd��Zd��Zd��Zd��Zd��Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d	�Z�d
�Z�d�Z �d�Z!�d
�Z"�d�Z#�d�Z$�d�Z%�d�Z&�d�Z'�d�Z(�d�Z)�d�Z*�d�Z+�d�Z,�d�Z-�d�Z.�d�Z/�d�Z0�d�Z1�d�Z2�d�Z3�d�Z4�d �Z5�d!�Z6�d"�Z7�d#�Z8�d$�Z9�d%�Z:�d&�Z;�d'�Z<�d(�Z=�d)�Z>�d*�Z?�d+�Z@�d,�ZA�d-�ZB�d.�ZC�d/�ZD�d0�ZE�d1�ZF�d2�ZG�d3�ZH�d4�ZI�d5�ZJ�d6�ZK�d7�ZL�d8�ZM�d9�ZN�d:�ZO�d;�ZP�d<�ZQ�d=�ZR�d>�ZS�d?�ZT�d@�ZU�dA�ZV�dB�ZW�dC�ZX�dD�ZY�dE�ZZ�dF�Z[�dG�Z\�dH�Z]�dI�Z^�dJ�Z_�dK�Z`�dL�Za�dM�Zb�dN�Zc�dO�Zd�dP�Ze�dQ�Zf�dR�Zg�dS�Zh�dT�Zi�dU�Zj�dV�Zk�dW�Zl�dX�Zm�dY�Zn�dZ�Zo�d[�Zp�d\�Zqd��Zr�d]�Zs�d^�Zt�d_�Zu�d`�Zv�da�Zw�db�Zx�dc�Zy�dd�Zz�de�Z{�df�Z|�dg�Z}�dh�Z~�di�Z�dj�Z��dk�Z��dl�Z��dm�Z��dn�Z��do�Z��dp�Z��dq�Z��dr�Z��ds�Z��dt�Z��du�Z��dv�Z��dw�Z��dx�Z��dy�Z��dz�Z��d{�Z��d|�Z��d}�Z��d~�Z��d�Z�d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Zd��ZÐd��ZĐd��ZŐd��ZƐd��Zǐd��ZȐd��Zɐd��Zʐd��Zːd��Z̐d��Z͐d��Zΐd��Zϐd��ZАd��Zѐd��ZҐd��ZӐd��ZԐd��ZՐd��Z֐d��Zאd��Zؐd��Zِd��Zڐd��Zېd��Z�dS(��NzNo module named)�
TracebackType)
�Any�Callable�Dict�List�Optional�overload�Tuple�Type�TypeVar�Union�_T�
virConnect�	virDomainc@s�eZdZedd�dd�Zeed�dd�Zeed�dd	�Zeed�d
d�Z	eed�dd
�Z
eed�dd�Zeed�dd�Zeed�dd�Z
eed�dd�Zeed�dd�ZdS)�libvirtErrorN)�defmsg�returncCs4tj�}|dkr|}n|d}tj||�||_dS)N�)�
libvirtmod�virGetLastError�	Exception�__init__�err)�selfrr�msg�r�/usr/lib64/python3.6/libvirt.pyr.szlibvirtError.__init__)rcCs|jdkrdS|jdS)Nr)r)rrrr�get_error_code<s
zlibvirtError.get_error_codecCs|jdkrdS|jdS)N�)r)rrrr�get_error_domainAs
zlibvirtError.get_error_domaincCs|jdkrdS|jdS)Nr)r)rrrr�get_error_messageFs
zlibvirtError.get_error_messagecCs|jdkrdS|jdS)N�)r)rrrr�get_error_levelKs
zlibvirtError.get_error_levelcCs|jdkrdS|jdS)N�)r)rrrr�get_str1Ps
zlibvirtError.get_str1cCs|jdkrdS|jdS)N�)r)rrrr�get_str2Us
zlibvirtError.get_str2cCs|jdkrdS|jdS)N�)r)rrrr�get_str3Zs
zlibvirtError.get_str3cCs|jdkrdS|jdS)N�)r)rrrr�get_int1_s
zlibvirtError.get_int1cCs|jdkrdS|jdS)N�)r)rrrr�get_int2ds
zlibvirtError.get_int2)�__name__�
__module__�__qualname__�strrr�intrrr r"r$r&r(r*r,rrrrr-sr)�f�ctxrcCstj||�S)z�Register a Python function for error reporting.
       The function is called back as f(ctx, error), with error
       being a list of information about the error being raised.
       Returns 1 in case of success.)rZvirRegisterErrorHandler)r2r3rrr�registerErrorHandlermsr4)�uri�auth�flagsrcCs(tj|||�}|dkrtd��t|d�S)a�
    This function should be called first to get a connection to the
    Hypervisor. If necessary, authentication will be performed fetching
    credentials via the callback.

    See :py:func:`open` for notes about environment variables which can
    have an effect on opening drivers and freeing the connection resources.

    :param str uri: (Optional) connection URI, see https://libvirt.org/uri.html
    :param auth: a list that contains 3 items:
        - a list of supported credential types
        - a callable that takes 2 arguments (credentials, user-data) and returns 0 on succcess and -1 on errors.
            The credentials argument is a list of credentials that libvirt (actually
            the ESX driver) would like to request. An element of this list is itself a
            list containing 5 items (4 inputs, 1 output):
                - the credential type, e.g. :py:const:`libvirt.VIR_CRED_AUTHNAME`
                - a prompt to be displayed to the user
                - a challenge, the ESX driver sets this to the hostname to allow automatic
                    distinction between requests for ESX and vCenter credentials
                - a default result for the request
                - a place to store the actual result for the request
        - user data that will be passed to the callable as second argument
    :param int flags: bitwise-OR of virConnectFlags
    :returns: a :py:class:`virConnect` instance on success.
    :raises libvirtError: on errors.
    NzvirConnectOpenAuth() failed)�_obj)rZvirConnectOpenAuthrr)r5r6r7�retrrr�openAuthusr:)�namercCs0|dkrtj�}n
tj|�}|dkr,td��|S)a�If no name parameter is passed (or name is None) then the
    version of the libvirt library is returned as an integer.

    If a name is passed and it refers to a driver linked to the
    libvirt library, then this returns a tuple of (library version,
    driver version).

    If the name passed refers to a non-existent driver, then you
    will get the exception 'no support for hypervisor'.

    Versions numbers are integers: 1000000*major + 1000*minor + release.NzvirGetVersion() failed)rZ
virGetVersionr)r;r9rrr�
getVersion�s

r<)�watch�fd�event�opaque�opaquecompatrcCsdS)Nr)r=r>r?r@rArrr�_eventInvokeHandleCallback�srBcCsdS)Nr)r=r>r?r@rArrrrB�scCsB|r|}|}nt|t�st�|d}|d}tj|||||�dS)z4
    Invoke the Event Impl Handle Callback in C
    rrN)�
isinstance�tuple�AssertionErrorrZvirEventInvokeHandleCallback)r=r>r?r@rA�callback�opaque_rrrrB�s)�timerr@rArcCs>|r|}|}nt|t�st�|d}|d}tj|||�dS)z5
    Invoke the Event Impl Timeout Callback in C
    rrN)rCrDrErZvirEventInvokeTimeoutCallback)rHr@rArFrGrrr�_eventInvokeTimeoutCallback�srI)r=r>�events�cbDatarcCs"|d}|d}|||||�dS)N�cbr@rr)r=r>rJrKrLr@rrr�_dispatchEventHandleCallback�srM)rHrKrcCs|d}|d}|||�dS)NrLr@rr)rHrKrLr@rrr�_dispatchEventTimeoutCallback�s
rN)r>rJrLr@rcCs,||d�}tj|||�}|dkr(td��|S)a(
    register a callback for monitoring file handle events

    @fd: file handle to monitor for events
    @events: bitset of events to watch from virEventHandleType constants
    @cb: callback to invoke when an event occurs
    @opaque: user data to pass to callback

    Example callback prototype is:
        def cb(watch,   # int id of the handle
               fd,      # int file descriptor the event occurred on
               events,  # int bitmap of events that have occurred
               opaque): # opaque data passed to eventAddHandle
    )rLr@rzvirEventAddHandle() failed���)r�virEventAddHandler)r>rJrLr@rKr9rrrrP�s

rP)�timeoutrLr@rcCs*||d�}tj||�}|dkr&td��|S)a�
    register a callback for a timer event

    @timeout: time between events in milliseconds
    @cb: callback to invoke when an event occurs
    @opaque: user data to pass to callback

    Setting timeout to -1 will disable the timer. Setting the timeout
    to zero will cause it to fire on every event loop iteration.

    Example callback prototype is:
        def cb(timer,   # int id of the timer
               opaque): # opaque data passed to eventAddTimeout
    )rLr@rzvirEventAddTimeout() failedrO)r�virEventAddTimeoutr)rQrLr@rKr9rrrrRs

rR)r@rcCstj|d|d�dS)a
    Execute callback which frees the opaque buffer

    @opaque: the opaque object passed to addHandle or addTimeout

    WARNING: This function should not be called from any call by libvirt's
    core. It will most probably cause deadlock in C-level libvirt code.
    Instead it should be scheduled and called from implementation's stack.

    See https://libvirt.org/html/libvirt-libvirt-event.html#virEventAddHandleFunc
    for more information.

    This function is not dependent on any event loop implementation.
    rrN)r�virEventInvokeFreeCallback)r@rrrrS srScCs$tj|�}|dkrtd��t|d�S)a�This function should be called first to get a connection to the
    Hypervisor and xen store
    
    If @name is None, if the LIBVIRT_DEFAULT_URI environment variable is set,
    then it will be used. Otherwise if the client configuration file
    has the "uri_default" parameter set, then it will be used. Finally
    probing will be done to determine a suitable default driver to activate.
    This involves trying each hypervisor in turn until one successfully opens.
    
    If connecting to an unprivileged hypervisor driver which requires
    the libvirtd daemon to be active, it will automatically be launched
    if not already running. This can be prevented by setting the
    environment variable LIBVIRT_AUTOSTART=0
    
    URIs are documented at https://libvirt.org/uri.html
    
    virConnectClose should be used to release the resources after the connection
    is no longer needed. NzvirConnectOpen() failed)r8)rZvirConnectOpenrr)r;r9rrr�open;s
rTcCs$tj|�}|dkrtd��t|d�S)a�This function should be called first to get a restricted connection to the
    library functionalities. The set of APIs usable are then restricted
    on the available methods to control the domains.
    
    See virConnectOpen for notes about environment variables which can
    have an effect on opening drivers and freeing the connection resources
    
    URIs are documented at https://libvirt.org/uri.html NzvirConnectOpenReadOnly() failed)r8)rZvirConnectOpenReadOnlyrr)r;r9rrr�openReadOnlySs	
rUcCstj�}|dkrtd��|S)a0Registers a default event implementation based on the
    poll() system call. This is a generic implementation
    that can be used by any client application which does
    not have a need to integrate with an external event
    loop impl.
    
    For proper event handling, it is important that the event implementation
    is registered before a connection to the Hypervisor is opened.
    
    Once registered, the application has to invoke virEventRunDefaultImpl() in
    a loop to process events.  Failure to do so may result in connections being
    closed unexpectedly as a result of keepalive timeout.  The default
    event loop fully supports handle and timeout events, but only
    wakes up on events registered by libvirt API calls such as
    virEventAddHandle() or virConnectDomainEventRegisterAny(). rz$virEventRegisterDefaultImpl() failedrO)r�virEventRegisterDefaultImplr)r9rrrrVesrVcCstj||||||�dS)a�Registers an event implementation, to allow integration
    with an external event loop. Applications would use this
    to integrate with the libglib2 event loop, or libevent
    or the QT event loop.
    
    For proper event handling, it is important that the event implementation
    is registered before a connection to the Hypervisor is opened.
    
    Use of the virEventAddHandle() and similar APIs require that the
    corresponding handler is registered.  Use of the
    virConnectDomainEventRegisterAny() and similar APIs requires that
    the three timeout handlers are registered.  Likewise, the three
    timeout handlers must be registered if the remote server has been
    configured to send keepalive messages, or if the client intends
    to call virConnectSetKeepAlive(), to avoid either side from
    unexpectedly closing the connection due to inactivity.
    
    If an application does not need to integrate with an
    existing event loop implementation, then the
    virEventRegisterDefaultImpl() method can be used to setup
    the generic libvirt implementation.
    
    Once registered, the event loop implementation cannot be
    changed, and must be run continuously. Note that callbacks
    may remain registered for a short time even after calling
    virConnectClose on all open connections, so it is not safe
    to stop running the event loop immediately after closing
    the connection. N)r�virEventRegisterImpl)Z	addHandleZupdateHandleZremoveHandleZ
addTimeoutZ
updateTimeoutZ
removeTimeoutrrrrWzsrWcCstj|�}|dkrtd��|S)z�Unregister a callback from a file handle.  This function
    requires that an event loop has previously been registered with
    virEventRegisterImpl() or virEventRegisterDefaultImpl(). rzvirEventRemoveHandle() failedrO)r�virEventRemoveHandler)r=r9rrrrX�s
rXcCstj|�}|dkrtd��|S)z�Unregister a callback for a timer.  This function
    requires that an event loop has previously been registered with
    virEventRegisterImpl() or virEventRegisterDefaultImpl(). rzvirEventRemoveTimeout() failedrO)r�virEventRemoveTimeoutr)rHr9rrrrY�s
rYcCstj�}|dkrtd��|S)a�Run one iteration of the event loop. Applications
    will generally want to have a thread which invokes
    this method in an infinite loop.  Furthermore, it is wise
    to set up a pipe-to-self handler (via virEventAddHandle())
    or a timeout (via virEventAddTimeout()) before calling this
    function, as it will block forever if there are no
    registered events.
    
      static bool quit;
    
      while (!quit) {
        if (virEventRunDefaultImpl() < 0)
          ...print error...
      } rzvirEventRunDefaultImpl() failedrO)r�virEventRunDefaultImplr)r9rrrrZ�srZcCstj||�dS)z�Change event set for a monitored file handle.  This function
    requires that an event loop has previously been registered with
    virEventRegisterImpl() or virEventRegisterDefaultImpl().
    
    Will not fail if fd exists. N)r�virEventUpdateHandle)r=rJrrrr[�sr[cCstj||�dS)afChange frequency for a timer.  This function
    requires that an event loop has previously been registered with
    virEventRegisterImpl() or virEventRegisterDefaultImpl().
    
    Setting frequency to -1 will disable the timer. Setting the frequency
    to zero will cause it to fire on every event loop iteration.
    
    Will not fail if timer exists. N)r�virEventUpdateTimeout)rHrQrrrr\�s	r\cCstj�}|S)z�Provide a pointer to the last error caught at the library level
    
    The error object is kept in thread local storage, so separate
    threads can safely access this concurrently. )rr)r9rrrr�srcCstj�}|dkrtd��|S)z6Get the most recent error code (enum virErrorNumber). rzvirGetLastErrorCode() failedrO)r�virGetLastErrorCoder)r9rrrr]�sr]cCstj�}|dkrtd��|S)z8Get the most recent error domain (enum virErrorDomain). rzvirGetLastErrorDomain() failedrO)r�virGetLastErrorDomainr)r9rrrr^�sr^cCstj�}|dkrtd��|S)z"Get the most recent error message NzvirGetLastErrorMessage() failed)r�virGetLastErrorMessager)r9rrrr_�sr_cCstj�}|dkrtd��|S)aInitialize the library.
    
    This method is invoked automatically by any of the virConnectOpen() API
    calls, and by virGetVersion(). Since release 1.0.0, there is no need to
    call this method even in a multithreaded application, since
    initialization is performed in a thread safe manner; but applications
    using an older version of the library should manually call this before
    setting up competing threads that attempt virConnectOpen in parallel.
    
    The only other time it would be necessary to call virInitialize is if the
    application did not invoke virConnectOpen as its first API call, such
    as when calling virEventRegisterImpl() before setting up connections,
    or when using virSetErrorFunc() to alter error reporting of the first
    connection attempt. rzvirInitialize() failedrO)r�
virInitializer)r9rrrr`�sr`cCstj�dS)z�Reset the last error caught at the library level.
    
    The error object is kept in thread local storage, so separate
    threads can safely access this concurrently, only resetting
    their own error object. N)r�virResetLastErrorrrrrrasrac@s8eZdZ�dUdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
�dVdd�Zdd�Z�dWdd�Z
�dXdd�Zdd�Z�dYdd�Z�dZdd �Z�d[d!d"�Zd#d$�Z�d\d%d&�Z�d]d'd(�Z�d^d)d*�Z�d_d+d,�Z�d`d-d.�Z�dad/d0�Z�dbd1d2�Z�dcd3d4�Z�ddd5d6�Z�ded7d8�Z�dfd9d:�Z�dgd;d<�Z�dhd=d>�Z �did?d@�Z!dAdB�Z"�djdCdD�Z#�dkdEdF�Z$�dldGdH�Z%�dmdIdJ�Z&�dndKdL�Z'�dodMdN�Z(dOdP�Z)�dpdQdR�Z*�dqdSdT�Z+dUdV�Z,�drdWdX�Z-dYdZ�Z.�dsd[d\�Z/�dtd]d^�Z0�dud_d`�Z1�dvdadb�Z2�dwdcdd�Z3�dxdedf�Z4�dydgdh�Z5�dzdidj�Z6�d{dkdl�Z7�d|dmdn�Z8�d}dodp�Z9�d~dqdr�Z:dsdt�Z;�ddudv�Z<�d�dwdx�Z=�d�dydz�Z>d{d|�Z?�d�d}d~�Z@dd��ZAd�d��ZBd�d��ZCd�d��ZD�d�d�d��ZE�d�d�d��ZF�d�d�d��ZG�d�d�d��ZH�d�d�d��ZI�d�d�d��ZJd�d��ZKd�d��ZL�d�d�d��ZM�d�d�d��ZNd�d��ZO�d�d�d��ZP�d�d�d��ZQ�d�d�d��ZR�d�d�d��ZS�d�d�d��ZT�d�d�d��ZU�d�d�d��ZV�d�d�d��ZW�d�d�d��ZX�d�d�d��ZY�d�d�d��ZZ�d�d�d��Z[�d�d�d��Z\�d�d�d��Z]�d�d�d��Z^d�d��Z_�d�d�d��Z`�d�d�d��Za�d�d�d„Zb�d�d�dĄZc�d�d�dƄZd�d�d�dȄZe�d�d�dʄZf�d�d�d̄Zg�d�d�d΄Zh�d�d�dЄZid�d҄Zj�d�d�dԄZk�d�d�dքZl�d�d�d؄Zm�d�d�dڄZnd�d܄Zo�d�d�dބZpd�d�Zq�d�d�d�Zrd�d�Zs�d�d�d�Ztd�d�Zu�d�d�d�Zvd�d�Zwd�d�Zx�d�d�d�Zy�d�d�d�Zzd�d�Z{�d�d�d��Z|�d�d�d��Z}�d�d�d��Z~�d�d�d��Z�d�d�d��Z��d�d��d�Z��d��d�d�Z��d��d�d�Z��d�d�Z��d�d�Z��d��d	�d
�Z��d��d�d�Z��d��d
�d�Z��d��d�d�Z��d��d�d�Z��d��d�d�Z��d�d�Z��d��d�d�Z��d��d�d�Z��d��d�d�Z��d�d�Z��d��d�d �Z��d!�d"�Z��d��d#�d$�Z��d��d%�d&�Z��dd'�d(�Z��dÐd)�d*�Z��dĐd+�d,�Z��dŐd-�d.�Z��dƐd/�d0�Z��dǐd1�d2�Z��d3�d4�Z��d5�d6�Z��dȐd7�d8�Z��dɐd9�d:�Z��dʐd;�d<�Z��d=�d>�Z��dːd?�d@�Z��d�e�e��dA�dB��dC�dD�Z��d�e�e��dE�dB��dF�dG�Z��d�e�e�e�d�dH��dI�dJ�Z��d�e�e�e�e��dK��dL�dM�Z��d�e�e�e�e��dK��dN�dO�Z��d�e�e��dB��dP�dQ�Z��d�e�e�e��dR��dS�dT�Z�dS(�rNcCs.||_t|�jdkr$tdt|���||_dS)N�	PyCapsule�	PyCObjectz&Expected a wrapped C Object but got %s)rbrc)�_conn�typer-r�_o)r�connr8rrrrszvirDomain.__init__cCs |jdk	rtj|j�d|_dS)N)rfrZ
virDomainFree)rrrr�__del__s
zvirDomain.__del__cCs|jS)N)rd)rrrr�connect#szvirDomain.connectcCstj|j�S)z"Get C pointer to underlying object)rZvirDomain_pointerrf)rrrr�	c_pointer&szvirDomain.c_pointercCstj|j�}|S)z,Get the hypervisor ID number for the domain )rZvirDomainGetIDrf)rr9rrr�ID.szvirDomain.IDcCs tj|j�}|dkrtd��|S)z)Get the type of domain operation system. NzvirDomainGetOSType() failed)rZvirDomainGetOSTyperfr)rr9rrr�OSType3szvirDomain.OSTypecCs tj|j�}|dkrtd��|S)z0Extract the UUID unique Identifier of a domain. NzvirDomainGetUUID() failed)rZvirDomainGetUUIDrfr)rr9rrr�UUID>szvirDomain.UUIDcCs tj|j�}|dkrtd��|S)z4Fetch globally unique ID of the domain as a string. NzvirDomainGetUUIDString() failed)rZvirDomainGetUUIDStringrfr)rr9rrr�
UUIDStringEszvirDomain.UUIDStringrcCs"tj|j|�}|dkrtd��|S)a�Provide an XML description of the domain. The description may be reused
        later to relaunch the domain with virDomainCreateXML().
        
        No security-sensitive data will be included unless @flags contains
        VIR_DOMAIN_XML_SECURE; this flag is rejected on read-only
        connections.  If @flags includes VIR_DOMAIN_XML_INACTIVE, then the
        XML represents the configuration that will be used on the next boot
        of a persistent domain; otherwise, the configuration represents the
        currently running domain.  If @flags contains
        VIR_DOMAIN_XML_UPDATE_CPU, then the portion of the domain XML
        describing CPU capabilities is modified to match actual
        capabilities of the host.
        
        If @flags contains VIR_DOMAIN_XML_MIGRATABLE, the XML is altered to
        assist in migrations, since the source and destination may be
        running different libvirt versions.  This may include trimming
        redundant or default information that might confuse an older
        recipient, or exposing internal details that aid a newer recipient;
        this flag is rejected on read-only connections, and the resulting
        XML might not validate against the schema, so it is mainly for
        internal use. NzvirDomainGetXMLDesc() failed)rZvirDomainGetXMLDescrfr)rr7r9rrr�XMLDescPszvirDomain.XMLDesccCs tj|j�}|dkrtd��|S)z�Requests that the current background job be aborted at the
        soonest opportunity. In case the job is a migration in a post-copy mode,
        virDomainAbortJob will report an error (see virDomainMigrateStartPostCopy
        for more details). rzvirDomainAbortJob() failedrO)rZvirDomainAbortJobrfr)rr9rrr�abortJobkszvirDomain.abortJobcCs$tj|j||�}|dkr td��|S)a=Dynamically add an IOThread to the domain. It is left up to the
        underlying virtual hypervisor to determine the valid range for an
        @iothread_id and determining whether the @iothread_id already exists.
        
        Note that this call can fail if the underlying virtualization hypervisor
        does not support it or if growing the number is arbitrarily limited.
        This function requires privileged access to the hypervisor.
        
        @flags may include VIR_DOMAIN_AFFECT_LIVE or VIR_DOMAIN_AFFECT_CONFIG.
        Both flags may be set.
        If VIR_DOMAIN_AFFECT_LIVE is set, the change affects a running domain
        and may fail if domain is not alive.
        If VIR_DOMAIN_AFFECT_CONFIG is set, the change affects persistent state,
        and will fail for transient domains. If neither flag is specified (that is,
        @flags is VIR_DOMAIN_AFFECT_CURRENT), then an inactive domain modifies
        persistent setup, while an active domain is hypervisor-dependent on whether
        just live or both live and persistent state is changed. rzvirDomainAddIOThread() failedrO)rZvirDomainAddIOThreadrfr)r�iothread_idr7r9rrr�addIOThreaduszvirDomain.addIOThreadcCs$tj|j||�}|dkr td��|S)a:Set how long to wait for a response from guest agent commands. By default,
        agent commands block forever waiting for a response.
        
        @timeout must be a value from virDomainAgentResponseTimeoutValues or
        positive:
        
          VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK(-2): meaning to block forever
             waiting for a result.
          VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_DEFAULT(-1): use default timeout value.
          VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_NOWAIT(0): does not wait.
          positive value: wait for @timeout seconds rz)virDomainAgentSetResponseTimeout() failedrO)rZ virDomainAgentSetResponseTimeoutrfr)rrQr7r9rrr�agentSetResponseTimeout�sz!virDomain.agentSetResponseTimeoutcCs"tj|j|�}|dkrtd��|S)a5Create a virtual device attachment to backend.  This function,
        having hotplug semantics, is only allowed on an active domain.
        
        For compatibility, this method can also be used to change the media
        in an existing CDROM/Floppy device, however, applications are
        recommended to use the virDomainUpdateDeviceFlags method instead.
        
        Be aware that hotplug changes might not persist across a domain going
        into S4 state (also known as hibernation) unless you also modify the
        persistent domain definition. rzvirDomainAttachDevice() failedrO)rZvirDomainAttachDevicerfr)r�xmlr9rrr�attachDevice�szvirDomain.attachDevicecCs$tj|j||�}|dkr td��|S)a�Attach a virtual device to a domain, using the flags parameter
        to control how the device is attached.  VIR_DOMAIN_AFFECT_CURRENT
        specifies that the device allocation is made based on current domain
        state.  VIR_DOMAIN_AFFECT_LIVE specifies that the device shall be
        allocated to the active domain instance only and is not added to the
        persisted domain configuration.  VIR_DOMAIN_AFFECT_CONFIG
        specifies that the device shall be allocated to the persisted domain
        configuration only.  Note that the target hypervisor must return an
        error if unable to satisfy flags.  E.g. the hypervisor driver will
        return failure if LIVE is specified but it only supports modifying the
        persisted device allocation.
        
        For compatibility, this method can also be used to change the media
        in an existing CDROM/Floppy device, however, applications are
        recommended to use the virDomainUpdateDeviceFlag method instead.
        
        Be aware that hotplug changes might not persist across a domain going
        into S4 state (also known as hibernation) unless you also modify the
        persistent domain definition. rz#virDomainAttachDeviceFlags() failedrO)rZvirDomainAttachDeviceFlagsrfr)rrtr7r9rrr�attachDeviceFlags�szvirDomain.attachDeviceFlagscCs$tj|j||�}|dkr td��|S)zCFetch list of public SSH authorized keys for given user in domain. Nz&virDomainAuthorizedSSHKeysGet() failed)rZvirDomainAuthorizedSSHKeysGetrfr)r�userr7r9rrr�authorizedSSHKeysGet�szvirDomain.authorizedSSHKeysGetcCs&tj|j|||�}|dkr"td��|S)zGManipulate set of public SSH authorized keys for given user in domain. rz&virDomainAuthorizedSSHKeysSet() failedrO)rZvirDomainAuthorizedSSHKeysSetrfr)rrw�keysr7r9rrr�authorizedSSHKeysSet�szvirDomain.authorizedSSHKeysSetcCs tj|j�}|dkrtd��|S)z(Extract the autostart flag for a domain rzvirDomainGetAutostart() failedrO)rZvirDomainGetAutostartrfr)rr9rrr�	autostart�szvirDomain.autostartcCs&tj|j|||�}|dkr"td��|S)a^Start a point-in-time backup job for the specified disks of a
        running domain.
        
        A backup job is a domain job and thus mutually exclusive with any other
        domain job such as migration.
        
        For now, backup jobs are also mutually exclusive with any
        other block job on the same device, although this restriction may
        be lifted in a future release. Progress of the backup job can be
        tracked via virDomainGetJobStats(). Completion of the job is also announced
        asynchronously via VIR_DOMAIN_EVENT_ID_JOB_COMPLETED event.
        
        There are two fundamental backup approaches. The first, called a
        push model, instructs the hypervisor to copy the state of the guest
        disk to the designated storage destination (which may be on the
        local file system or a network device). In this mode, the
        hypervisor writes the content of the guest disk to the destination,
        then emits VIR_DOMAIN_EVENT_ID_JOB_COMPLETED when the backup is
        either complete or failed (the backup image is invalid if the job
        fails or virDomainAbortJob() is used prior to the event being
        emitted). This kind of the job finishes automatically. Users can
        determine success by using virDomainGetJobStats() with
        VIR_DOMAIN_JOB_STATS_COMPLETED flag.
        
        The second, called a pull model, instructs the hypervisor to expose
        the state of the guest disk over an NBD export. A third-party
        client can then connect to this export and read whichever portions
        of the disk it desires.  In this mode libvirt has to be informed via
        virDomainAbortJob() when the third-party NBD client is done and the backup
        resources can be released.
        
        The @backupXML parameter contains details about the backup in the top-level
        element <domainbackup>, including which backup mode to use, whether the
        backup is incremental from a previous checkpoint, which disks
        participate in the backup, the destination for a push model backup,
        and the temporary storage and NBD server details for a pull model
        backup.
        
        virDomainBackupGetXMLDesc() can be called to learn actual
        values selected.  For more information, see
        formatcheckpoint.html#BackupAttributes.
        
        The @checkpointXML parameter is optional; if non-None, then libvirt
        behaves as if virDomainCheckpointCreateXML() were called to create
        a checkpoint atomically covering the same point in time as the
        backup.
        
        The VIR_DOMAIN_BACKUP_BEGIN_REUSE_EXTERNAL specifies that the output or
        temporary files described by the @backupXML document were created by the
        caller with correct format and size to hold the backup or temporary data.
        
        The creation of a new checkpoint allows for future incremental backups.
        Note that some hypervisors may require a particular disk format, such as
        qcow2, in order to take advantage of checkpoints, while allowing arbitrary
        formats if checkpoints are not involved. rzvirDomainBackupBegin() failedrO)rZvirDomainBackupBeginrfr)rZ	backupXMLZ
checkpointXMLr7r9rrr�backupBegin�s8zvirDomain.backupBegincCs"tj|j|�}|dkrtd��|S)aNQueries the configuration of the active backup job.
        
        In some cases, a user can start a backup job without supplying all
        details and rely on libvirt to fill in the rest (for example,
        selecting the port used for an NBD export). This API can then be
        used to learn what default values were chosen. Nz"virDomainBackupGetXMLDesc() failed)rZvirDomainBackupGetXMLDescrfr)rr7r9rrr�backupGetXMLDesc szvirDomain.backupGetXMLDesccCs"tj|j|�}|dkrtd��|S)zGet the blkio parameters Nz$virDomainGetBlkioParameters() failed)rZvirDomainGetBlkioParametersrfr)rr7r9rrr�blkioParameters0szvirDomain.blkioParameterscCs*tj|j|||||�}|dkr&td��|S)aCommit changes that were made to temporary top-level files within a disk
        image backing file chain into a lower-level base file.  In other words,
        take all the difference between @base and @top, and update @base to contain
        that difference; after the commit, any portion of the chain that previously
        depended on @top will now depend on @base, and all files after @base up
        to and including @top will now be invalidated.  A typical use of this
        command is to reduce the length of a backing file chain after taking an
        external disk snapshot.  To move data in the opposite direction, see
        virDomainBlockPull().
        
        This command starts a long-running commit block job, whose status may
        be tracked by virDomainBlockJobInfo() with a job type of
        VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT, and the operation can be aborted with
        virDomainBlockJobAbort().  When finished, an asynchronous event is
        raised to indicate the final status, and the job no longer exists.  If
        the job is aborted, it is up to the hypervisor whether starting a new
        job will resume from the same point, or start over.
        
        As a special case, if @top is the active image (or None), and @flags
        includes VIR_DOMAIN_BLOCK_COMMIT_ACTIVE, the block job will have a type
        of VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT, and operates in two phases.
        In the first phase, the contents are being committed into @base, and the
        job can only be canceled.  The job transitions to the second phase when
        the block job event with state VIR_DOMAIN_BLOCK_JOB_READY is
        emitted for the given device. This information is also visible in the
        live XML as 'ready="yes"' attribute of the corresponding <mirror> element.
        Once in the second phase, the user must choose whether to cancel the job
        (keeping @top as the active image, but now containing only the changes
        since the time the job ended) or to pivot the job (adjusting to @base as
        the active image, and invalidating @top).
        
        Be aware that this command may invalidate files even if it is aborted;
        the user is cautioned against relying on the contents of invalidated
        intermediate files such as @top (when @top is not the active image)
        without manually rebasing those files to use a backing file of a
        read-only copy of @base prior to the point where the commit operation
        was started (and such a rebase cannot be safely done until the commit
        has successfully completed).  However, the domain itself will not have
        any issues; the active layer remains valid throughout the entire commit
        operation.
        
        Some hypervisors may support a shortcut where if @flags contains
        VIR_DOMAIN_BLOCK_COMMIT_DELETE, then this command will unlink all files
        that were invalidated, after the commit successfully completes.
        
        If @flags contains VIR_DOMAIN_BLOCK_COMMIT_RELATIVE, the name recorded
        into the overlay of the @top image (if there is such image) as the
        path to the new backing file will be kept relative to other images.
        The operation will fail if libvirt can't infer the name.
        
        By default, if @base is None, the commit target will be the bottom of
        the backing chain; if @flags contains VIR_DOMAIN_BLOCK_COMMIT_SHALLOW,
        then the immediate backing file of @top will be used instead.  If @top
        is None, the active image at the top of the chain will be used.  Some
        hypervisors place restrictions on how much can be committed, and might
        fail if @base is not the immediate backing file of @top, or if @top is
        the active layer in use by a running domain but @flags did not include
        VIR_DOMAIN_BLOCK_COMMIT_ACTIVE, or if @top is not the top-most file;
        restrictions may differ for online vs. offline domains.
        
        The @disk parameter is either an unambiguous source name of the
        block device (the <source file='...'/> sub-element, such as
        "/path/to/image"), or the device target shorthand (the
        <target dev='...'/> sub-element, such as "vda").  Valid names
        can be found by calling virDomainGetXMLDesc() and inspecting
        elements within //domain/devices/disk.
        
        The @base and @top parameters can be either paths to files within the
        backing chain, or the device target shorthand (the <target dev='...'/>
        sub-element, such as "vda") followed by an index to the backing chain
        enclosed in square brackets. Backing chain indexes can be found by
        inspecting //disk//backingStore/@index in the domain XML. Thus, for
        example, "vda[3]" refers to the backing store with index equal to "3"
        in the chain of disk "vda".
        
        The maximum bandwidth that will be used to do the commit can be
        specified with the @bandwidth parameter.  If set to 0, there is no
        limit.  If @flags includes VIR_DOMAIN_BLOCK_COMMIT_BANDWIDTH_BYTES,
        @bandwidth is in bytes/second; otherwise, it is in MiB/second.
        Values larger than 2^52 bytes/sec may be rejected due to overflow
        considerations based on the word size of both client and server,
        and values larger than 2^31 bytes/sec may cause overflow problems
        if later queried by virDomainGetBlockJobInfo() without scaling.
        Hypervisors may further restrict the range of valid bandwidth
        values.  Some hypervisors do not support this feature and will
        return an error if bandwidth is not 0; in this case, it might still
        be possible for a later call to virDomainBlockJobSetSpeed() to
        succeed.  The actual speed can be determined with
        virDomainGetBlockJobInfo(). rzvirDomainBlockCommit() failedrO)rZvirDomainBlockCommitrfr)r�disk�base�top�	bandwidthr7r9rrr�blockCommit;sZzvirDomain.blockCommitcCs(tj|j||||�}|dkr$td��|S)zSCopy the guest-visible contents of a disk image to a new file described by destxml rzvirDomainBlockCopy() failedrO)rZvirDomainBlockCopyrfr)rrZdestxml�paramsr7r9rrr�	blockCopy�szvirDomain.blockCopycCs$tj|j||�}|dkr td��|S)z5Extract information about a domain block device size NzvirDomainGetBlockInfo() failed)rZvirDomainGetBlockInforfr)r�pathr7r9rrr�	blockInfo�szvirDomain.blockInfocCs$tj|j||�}|dkr td��|S)z(Get the I/O tunables for a block device Nz virDomainGetBlockIoTune() failed)rZvirDomainGetBlockIoTunerfr)rrr7r9rrr�blockIoTune�szvirDomain.blockIoTunecCs$tj|j||�}|dkr td��|S)a�Cancel the active block job on the given disk.
        
        The @disk parameter is either an unambiguous source name of the
        block device (the <source file='...'/> sub-element, such as
        "/path/to/image"), or (since 0.9.5) the device target shorthand
        (the <target dev='...'/> sub-element, such as "vda").  Valid names
        can be found by calling virDomainGetXMLDesc() and inspecting
        elements within //domain/devices/disk.
        
        If the current block job for @disk is VIR_DOMAIN_BLOCK_JOB_TYPE_PULL, then
        by default, this function performs a synchronous operation and the caller
        may assume that the operation has completed when 0 is returned.  However,
        BlockJob operations may take a long time to cancel, and during this time
        further domain interactions may be unresponsive.  To avoid this problem,
        pass VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC in the @flags argument to enable
        asynchronous behavior, returning as soon as possible.  When the job has
        been canceled, a BlockJob event will be emitted, with status
        VIR_DOMAIN_BLOCK_JOB_CANCELED (even if the ABORT_ASYNC flag was not
        used); it is also possible to poll virDomainBlockJobInfo() to see if
        the job cancellation is still pending.  This type of job can be restarted
        to pick up from where it left off.
        
        If the current block job for @disk is VIR_DOMAIN_BLOCK_JOB_TYPE_COPY, then
        the default is to abort the mirroring and revert to the source disk;
        likewise, if the current job is VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT,
        the default is to abort without changing the active layer of @disk.
        Adding @flags of VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOT causes this call to
        fail with VIR_ERR_BLOCK_COPY_ACTIVE if the copy or commit is not yet
        ready; otherwise it will swap the disk over to the new active image
        to end the mirroring or active commit.  An event will be issued when the
        job is ended, and it is possible to use VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC
        to control whether this command waits for the completion of the job.
        Restarting a copy or active commit job requires starting over from the
        beginning of the first phase. rzvirDomainBlockJobAbort() failedrO)rZvirDomainBlockJobAbortrfr)rrr7r9rrr�
blockJobAbort�s#zvirDomain.blockJobAbortcCs$tj|j||�}|dkr td��|S)z)Get progress information for a block job Nz!virDomainGetBlockJobInfo() failed)rZvirDomainGetBlockJobInforfr)rr�r7r9rrr�blockJobInfo�szvirDomain.blockJobInfocCs&tj|j|||�}|dkr"td��|S)aLSet the maximum allowable bandwidth that a block job may consume.  If
        bandwidth is 0, the limit will revert to the hypervisor default of
        unlimited.
        
        If @flags contains VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_BYTES, @bandwidth
        is in bytes/second; otherwise, it is in MiB/second.  Values larger than
        2^52 bytes/sec may be rejected due to overflow considerations based on
        the word size of both client and server, and values larger than 2^31
        bytes/sec may cause overflow problems if later queried by
        virDomainGetBlockJobInfo() without scaling.  Hypervisors may further
        restrict the range of valid bandwidth values.
        
        The @disk parameter is either an unambiguous source name of the
        block device (the <source file='...'/> sub-element, such as
        "/path/to/image"), or (since 0.9.5) the device target shorthand
        (the <target dev='...'/> sub-element, such as "vda").  Valid names
        can be found by calling virDomainGetXMLDesc() and inspecting
        elements within //domain/devices/disk. rz"virDomainBlockJobSetSpeed() failedrO)rZvirDomainBlockJobSetSpeedrfr)rrr�r7r9rrr�blockJobSetSpeed�szvirDomain.blockJobSetSpeedcCs(tj|j||||�}|dkr$td��|S)z*Read the contents of domain's disk device NzvirDomainBlockPeek() failed)rZvirDomainBlockPeekrfr)rr�offset�sizer7r9rrr�	blockPeek
szvirDomain.blockPeekcCs&tj|j|||�}|dkr"td��|S)a�Populate a disk image with data from its backing image.  Once all data from
        its backing image has been pulled, the disk no longer depends on a backing
        image.  This function pulls data for the entire device in the background.
        Progress of the operation can be checked with virDomainGetBlockJobInfo() and
        the operation can be aborted with virDomainBlockJobAbort().  When finished,
        an asynchronous event is raised to indicate the final status.  To move
        data in the opposite direction, see virDomainBlockCommit().
        
        The @disk parameter is either an unambiguous source name of the
        block device (the <source file='...'/> sub-element, such as
        "/path/to/image"), or (since 0.9.5) the device target shorthand
        (the <target dev='...'/> sub-element, such as "vda").  Valid names
        can be found by calling virDomainGetXMLDesc() and inspecting
        elements within //domain/devices/disk.
        
        The maximum bandwidth that will be used to do the copy can be
        specified with the @bandwidth parameter.  If set to 0, there is no
        limit.  If @flags includes VIR_DOMAIN_BLOCK_PULL_BANDWIDTH_BYTES,
        @bandwidth is in bytes/second; otherwise, it is in MiB/second.
        Values larger than 2^52 bytes/sec may be rejected due to overflow
        considerations based on the word size of both client and server,
        and values larger than 2^31 bytes/sec may cause overflow problems
        if later queried by virDomainGetBlockJobInfo() without scaling.
        Hypervisors may further restrict the range of valid bandwidth
        values.  Some hypervisors do not support this feature and will
        return an error if bandwidth is not 0; in this case, it might still
        be possible for a later call to virDomainBlockJobSetSpeed() to
        succeed.  The actual speed can be determined with
        virDomainGetBlockJobInfo().
        
        This is shorthand for virDomainBlockRebase() with a None base. rzvirDomainBlockPull() failedrO)rZvirDomainBlockPullrfr)rrr�r7r9rrr�	blockPulls zvirDomain.blockPullcCs(tj|j||||�}|dkr$td��|S)a�Populate a disk image with data from its backing image chain, and
        setting the backing image to @base, or alternatively copy an entire
        backing chain to a new file @base.
        
        When @flags is 0, this starts a pull, where @base must be the absolute
        path of one of the backing images further up the chain, or None to
        convert the disk image so that it has no backing image.  Once all
        data from its backing image chain has been pulled, the disk no
        longer depends on those intermediate backing images.  This function
        pulls data for the entire device in the background.  Progress of
        the operation can be checked with virDomainGetBlockJobInfo() with a
        job type of VIR_DOMAIN_BLOCK_JOB_TYPE_PULL, and the operation can be
        aborted with virDomainBlockJobAbort().  When finished, an asynchronous
        event is raised to indicate the final status, and the job no longer
        exists.  If the job is aborted, a new one can be started later to
        resume from the same point.
        
        If @flags contains VIR_DOMAIN_BLOCK_REBASE_RELATIVE, the name recorded
        into the active disk as the location for @base will be kept relative.
        The operation will fail if libvirt can't infer the name.
        
        When @flags includes VIR_DOMAIN_BLOCK_REBASE_COPY, this starts a copy,
        where @base must be the name of a new file to copy the chain to.  By
        default, the copy will pull the entire source chain into the destination
        file, but if @flags also contains VIR_DOMAIN_BLOCK_REBASE_SHALLOW, then
        only the top of the source chain will be copied (the source and
        destination have a common backing file).  By default, @base will be
        created with the same file format as the source, but this can be altered
        by adding VIR_DOMAIN_BLOCK_REBASE_COPY_RAW to force the copy to be raw
        (does not make sense with the shallow flag unless the source is also raw),
        or by using VIR_DOMAIN_BLOCK_REBASE_REUSE_EXT to reuse an existing file
        which was pre-created with the correct format and metadata and sufficient
        size to hold the copy. In case the VIR_DOMAIN_BLOCK_REBASE_SHALLOW flag
        is used the pre-created file has to exhibit the same guest visible contents
        as the backing file of the original image. This allows a management app to
        pre-create files with relative backing file names, rather than the default
        of absolute backing file names; as a security precaution, you should
        generally only use reuse_ext with the shallow flag and a non-raw
        destination file.  By default, the copy destination will be treated as
        type='file', but using VIR_DOMAIN_BLOCK_REBASE_COPY_DEV treats the
        destination as type='block' (affecting how virDomainGetBlockInfo() will
        report allocation after pivoting).
        
        A copy job has two parts; in the first phase, the @bandwidth parameter
        affects how fast the source is pulled into the destination, and the job
        can only be canceled by reverting to the source file; progress in this
        phase can be tracked via the virDomainBlockJobInfo() command, with a
        job type of VIR_DOMAIN_BLOCK_JOB_TYPE_COPY.  The job transitions to the
        second phase when the job info states cur == end, and remains alive to
        mirror all further changes to both source and destination.  The user
        must call virDomainBlockJobAbort() to end the mirroring while choosing
        whether to revert to source or pivot to the destination.  An event is
        issued when the job ends, and depending on the hypervisor, an event may
        also be issued when the job transitions from pulling to mirroring.  If
        the job is aborted, a new job will have to start over from the beginning
        of the first phase.
        
        Some hypervisors will restrict certain actions, such as virDomainSave()
        or virDomainDetachDevice(), while a copy job is active; they may
        also restrict a copy job to transient domains.
        
        The @disk parameter is either an unambiguous source name of the
        block device (the <source file='...'/> sub-element, such as
        "/path/to/image"), or the device target shorthand (the
        <target dev='...'/> sub-element, such as "vda").  Valid names
        can be found by calling virDomainGetXMLDesc() and inspecting
        elements within //domain/devices/disk.
        
        The @base parameter can be either a path to a file within the backing
        chain, or the device target shorthand (the <target dev='...'/>
        sub-element, such as "vda") followed by an index to the backing chain
        enclosed in square brackets. Backing chain indexes can be found by
        inspecting //disk//backingStore/@index in the domain XML. Thus, for
        example, "vda[3]" refers to the backing store with index equal to "3"
        in the chain of disk "vda".
        
        The maximum bandwidth that will be used to do the copy can be
        specified with the @bandwidth parameter.  If set to 0, there is no
        limit.  If @flags includes VIR_DOMAIN_BLOCK_REBASE_BANDWIDTH_BYTES,
        @bandwidth is in bytes/second; otherwise, it is in MiB/second.
        Values larger than 2^52 bytes/sec may be rejected due to overflow
        considerations based on the word size of both client and server,
        and values larger than 2^31 bytes/sec may cause overflow problems
        if later queried by virDomainGetBlockJobInfo() without scaling.
        Hypervisors may further restrict the range of valid bandwidth
        values.  Some hypervisors do not support this feature and will
        return an error if bandwidth is not 0; in this case, it might still
        be possible for a later call to virDomainBlockJobSetSpeed() to
        succeed.  The actual speed can be determined with
        virDomainGetBlockJobInfo().
        
        When @base is None and @flags is 0, this is identical to
        virDomainBlockPull().  When @flags contains VIR_DOMAIN_BLOCK_REBASE_COPY,
        this command is shorthand for virDomainBlockCopy() where the destination
        XML encodes @base as a <disk type='file'>, @bandwidth is properly scaled
        and passed as a typed parameter, the shallow and reuse external flags
        are preserved, and remaining flags control whether the XML encodes a
        destination format of raw instead of leaving the destination identical
        to the source format or probed from the reused file. rzvirDomainBlockRebase() failedrO)rZvirDomainBlockRebaserfr)rrr�r�r7r9rrr�blockRebase:sdzvirDomain.blockRebasecCs&tj|j|||�}|dkr"td��|S)a�Resize a block device of domain while the domain is running.  If
        @flags is 0, then @size is in kibibytes (blocks of 1024 bytes);
        since 0.9.11, if @flags includes VIR_DOMAIN_BLOCK_RESIZE_BYTES,
        @size is in bytes instead.  @size is taken directly as the new
        size.  Depending on the file format, the hypervisor may round up
        to the next alignment boundary.
        
        The @disk parameter is either an unambiguous source name of the
        block device (the <source file='...'/> sub-element, such as
        "/path/to/image"), or (since 0.9.5) the device target shorthand
        (the <target dev='...'/> sub-element, such as "vda").  Valid names
        can be found by calling virDomainGetXMLDesc() and inspecting
        elements within //domain/devices/disk.
        
        Note that this call may fail if the underlying virtualization hypervisor
        does not support it; this call requires privileged access to the
        hypervisor. rzvirDomainBlockResize() failedrO)rZvirDomainBlockResizerfr)rrr�r7r9rrr�blockResize�szvirDomain.blockResizecCs"tj|j|�}|dkrtd��|S)z.Extracts block device statistics for a domain NzvirDomainBlockStats() failed)rZvirDomainBlockStatsrfr)rr�r9rrr�
blockStats�szvirDomain.blockStatscCs$tj|j||�}|dkr td��|S)z@Extracts block device statistics parameters of a running domain Nz!virDomainBlockStatsFlags() failed)rZvirDomainBlockStatsFlagsrfr)rr�r7r9rrr�blockStatsFlags�szvirDomain.blockStatsFlagscCs0tj|j||�}|dkr td��t||d�}|S)azCreate a new checkpoint using @xmlDesc, with a top-level
        <domaincheckpoint> element, on a running @domain.  Note that
        @xmlDesc must validate against the <domaincheckpoint> XML schema.
        Typically, it is more common to create a new checkpoint as part of
        kicking off a backup job with virDomainBackupBegin(); however, it
        is also possible to start a checkpoint without a backup.
        
        See <a href="formatcheckpoint.html#CheckpointAttributes">Checkpoint XML</a>
        for more details on @xmlDesc. In particular, some hypervisors may require
        particular disk formats, such as qcow2, in order to support this
        command; where @xmlDesc can be used to limit the checkpoint to a working
        subset of the domain's disks.
        
        If @flags includes VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE, then this
        is a request to reinstate checkpoint metadata that was previously
        captured from virDomainCheckpointGetXMLDesc() before removing that
        metadata, rather than creating a new checkpoint.  Note that while
        original creation can omit a number of elements from @xmlDesc (and
        libvirt will supply sane defaults based on the domain state at that
        point in time), a redefinition must supply more elements (as the
        domain may have changed in the meantime, so that libvirt no longer
        has a way to resupply correct defaults).  Not all hypervisors support
        this flag.
        
        If @flags includes VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE_VALIDATE along with
        VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE the state of the metadata related
        to the disk state of the redefined checkpoint is validated. Note that
        hypervisors may require that the @domain is running to perform validation.
        
        If @flags includes VIR_DOMAIN_CHECKPOINT_CREATE_QUIESCE, then the
        libvirt will attempt to use guest agent to freeze and thaw all file
        systems in use within domain OS. However, if the guest agent is not
        present, an error is thrown. This flag is incompatible with
        VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE. Nz%virDomainCheckpointCreateXML() failed)r8)rZvirDomainCheckpointCreateXMLrfr�virDomainCheckpoint)r�xmlDescr7r9�_virDomain__tmprrr�checkpointCreateXML�s
#zvirDomain.checkpointCreateXMLcCs0tj|j||�}|dkr td��t||d�}|S)z5Try to lookup a domain checkpoint based on its name. Nz(virDomainCheckpointLookupByName() failed)r8)rZvirDomainCheckpointLookupByNamerfrr�)rr;r7r9r�rrr�checkpointLookupByName�s
z virDomain.checkpointLookupByNamecCs"tj|j|�}|dkrtd��|S)zFExtract details about current state of control interface to a domain. Nz virDomainGetControlInfo() failed)rZvirDomainGetControlInforfr)rr7r9rrr�controlInfoszvirDomain.controlInfocCs$tj|j||�}|dkr td��|S)a^This method will dump the core of a domain on a given file for analysis.
        Note that for remote Xen Daemon the file path will be interpreted in
        the remote host. Hypervisors may require  the user to manually ensure
        proper permissions on the file named by @to.
        
        If @flags includes VIR_DUMP_CRASH, then leave the guest shut off with
        a crashed state after the dump completes.  If @flags includes
        VIR_DUMP_LIVE, then make the core dump while continuing to allow
        the guest to run; otherwise, the guest is suspended during the dump.
        VIR_DUMP_RESET flag forces reset of the guest after dump.
        The above three flags are mutually exclusive.
        
        Additionally, if @flags includes VIR_DUMP_BYPASS_CACHE, then libvirt
        will attempt to bypass the file system cache while creating the file,
        or fail if it cannot do so for the given system; this can allow less
        pressure on file system cache, but also risks slowing saves to NFS.
        
        For more control over the output format, see virDomainCoreDumpWithFormat(). rzvirDomainCoreDump() failedrO)rZvirDomainCoreDumprfr)r�tor7r9rrr�coreDumpszvirDomain.coreDumpcCs&tj|j|||�}|dkr"td��|S)a�This method will dump the core of a domain on a given file for analysis.
        Note that for remote Xen Daemon the file path will be interpreted in
        the remote host. Hypervisors may require  the user to manually ensure
        proper permissions on the file named by @to.
        
        @dumpformat controls which format the dump will have; use of
        VIR_DOMAIN_CORE_DUMP_FORMAT_RAW mirrors what virDomainCoreDump() will
        perform.  Not all hypervisors are able to support all formats.
        
        If @flags includes VIR_DUMP_CRASH, then leave the guest shut off with
        a crashed state after the dump completes.  If @flags includes
        VIR_DUMP_LIVE, then make the core dump while continuing to allow
        the guest to run; otherwise, the guest is suspended during the dump.
        VIR_DUMP_RESET flag forces reset of the guest after dump.
        The above three flags are mutually exclusive.
        
        Additionally, if @flags includes VIR_DUMP_BYPASS_CACHE, then libvirt
        will attempt to bypass the file system cache while creating the file,
        or fail if it cannot do so for the given system; this can allow less
        pressure on file system cache, but also risks slowing saves to NFS. rz$virDomainCoreDumpWithFormat() failedrO)rZvirDomainCoreDumpWithFormatrfr)rr�Z
dumpformatr7r9rrr�coreDumpWithFormat(szvirDomain.coreDumpWithFormatcCs tj|j�}|dkrtd��|S)aLaunch a defined domain. If the call succeeds the domain moves from the
        defined to the running domains pools.  The domain will be paused only
        if restoring from managed state created from a paused domain.  For more
        control, see virDomainCreateWithFlags(). rzvirDomainCreate() failedrO)rZvirDomainCreaterfr)rr9rrr�createBszvirDomain.createcCs"tj|j|�}|dkrtd��|S)a�Launch a defined domain. If the call succeeds the domain moves from the
        defined to the running domains pools.
        
        If the VIR_DOMAIN_START_PAUSED flag is set, or if the guest domain
        has a managed save image that requested paused state (see
        virDomainManagedSave()) the guest domain will be started, but its
        CPUs will remain paused. The CPUs can later be manually started
        using virDomainResume().  In all other cases, the guest domain will
        be running.
        
        If the VIR_DOMAIN_START_AUTODESTROY flag is set, the guest
        domain will be automatically destroyed when the virConnectPtr
        object is finally released. This will also happen if the
        client application crashes / loses its connection to the
        libvirtd daemon. Any domains marked for auto destroy will
        block attempts at migration. Hypervisors may also block save-to-file,
        or snapshots.
        
        If the VIR_DOMAIN_START_BYPASS_CACHE flag is set, and there is a
        managed save file for this domain (created by virDomainManagedSave()),
        then libvirt will attempt to bypass the file system cache while restoring
        the file, or fail if it cannot do so for the given system; this can allow
        less pressure on file system cache, but also risks slowing loads from NFS.
        
        If the VIR_DOMAIN_START_FORCE_BOOT flag is set, then any managed save
        file for this domain is discarded, and the domain boots from scratch. rz!virDomainCreateWithFlags() failedrO)rZvirDomainCreateWithFlagsrfr)rr7r9rrr�createWithFlagsLszvirDomain.createWithFlagscCs$tj|j||�}|dkr td��|S)a&Dynamically delete an IOThread from the domain. The @iothread_id to be
        deleted must not have a resource associated with it and can be any of
        the currently valid IOThread ID's.
        
        Note that this call can fail if the underlying virtualization hypervisor
        does not support it or if reducing the number is arbitrarily limited.
        This function requires privileged access to the hypervisor.
        
        @flags may include VIR_DOMAIN_AFFECT_LIVE or VIR_DOMAIN_AFFECT_CONFIG.
        Both flags may be set.
        If VIR_DOMAIN_AFFECT_LIVE is set, the change affects a running domain
        and may fail if domain is not alive.
        If VIR_DOMAIN_AFFECT_CONFIG is set, the change affects persistent state,
        and will fail for transient domains. If neither flag is specified (that is,
        @flags is VIR_DOMAIN_AFFECT_CURRENT), then an inactive domain modifies
        persistent setup, while an active domain is hypervisor-dependent on whether
        just live or both live and persistent state is changed. rzvirDomainDelIOThread() failedrO)rZvirDomainDelIOThreadrfr)rrqr7r9rrr�delIOThreadlszvirDomain.delIOThreadcCs tj|j�}|dkrtd��|S)a�Destroy the domain object. The running instance is shutdown if not down
        already and all resources used by it are given back to the hypervisor. This
        does not free the associated virDomainPtr object.
        This function may require privileged access.
        
        virDomainDestroy first requests that a guest terminate
        (e.g. SIGTERM), then waits for it to comply. After a reasonable
        timeout, if the guest still exists, virDomainDestroy will
        forcefully terminate the guest (e.g. SIGKILL) if necessary (which
        may produce undesirable results, for example unflushed disk cache
        in the guest). To avoid this possibility, it's recommended to
        instead call virDomainDestroyFlags, sending the
        VIR_DOMAIN_DESTROY_GRACEFUL flag.
        
        If the domain is transient and has any snapshot metadata (see
        virDomainSnapshotNum()), then that metadata will automatically
        be deleted when the domain quits. rzvirDomainDestroy() failedrO)rZvirDomainDestroyrfr)rr9rrr�destroy�szvirDomain.destroycCs"tj|j|�}|dkrtd��|S)a�Destroy the domain object. The running instance is shutdown if not down
        already and all resources used by it are given back to the hypervisor.
        This does not free the associated virDomainPtr object.
        This function may require privileged access.
        
        Calling this function with no @flags set (equal to zero) is
        equivalent to calling virDomainDestroy, and after a reasonable
        timeout will forcefully terminate the guest (e.g. SIGKILL) if
        necessary (which may produce undesirable results, for example
        unflushed disk cache in the guest). Including
        VIR_DOMAIN_DESTROY_GRACEFUL in the flags will prevent the forceful
        termination of the guest, and virDomainDestroyFlags will instead
        return an error if the guest doesn't terminate by the end of the
        timeout; at that time, the management application can decide if
        calling again without VIR_DOMAIN_DESTROY_GRACEFUL is appropriate.
        
        Another alternative which may produce cleaner results for the
        guest's disks is to use virDomainShutdown() instead, but that
        depends on guest support (some hypervisor/guest combinations may
        ignore the shutdown request). rzvirDomainDestroyFlags() failedrO)rZvirDomainDestroyFlagsrfr)rr7r9rrr�destroyFlags�szvirDomain.destroyFlagscCs"tj|j|�}|dkrtd��|S)z�This is an equivalent of virDomainDetachDeviceFlags() when called with
        @flags parameter set to VIR_DOMAIN_AFFECT_LIVE.
        
        See virDomainDetachDeviceFlags() for more details. rzvirDomainDetachDevice() failedrO)rZvirDomainDetachDevicerfr)rrtr9rrr�detachDevice�szvirDomain.detachDevicecCs$tj|j||�}|dkr td��|S)a�Detach a virtual device from a domain, using the alias to
        specify the device. The value of @flags should be either
        VIR_DOMAIN_AFFECT_CURRENT, or a bitwise-or of values from
        VIR_DOMAIN_AFFECT_LIVE and VIR_DOMAIN_AFFECT_CURRENT, although
        hypervisors vary in which flags are supported.
        
        In contrast to virDomainDetachDeviceFlags() this API is
        asynchronous - it returns immediately after sending the detach
        request to the hypervisor. It's caller's responsibility to
        wait for VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event to signal
        actual device removal or for
        VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED to signal rejected
        device removal. rz#virDomainDetachDeviceAlias() failedrO)rZvirDomainDetachDeviceAliasrfr)r�aliasr7r9rrr�detachDeviceAlias�szvirDomain.detachDeviceAliascCs$tj|j||�}|dkr td��|S)aDetach a virtual device from a domain, using the flags parameter
        to control how the device is detached.  VIR_DOMAIN_AFFECT_CURRENT
        specifies that the device allocation is removed based on current domain
        state.  VIR_DOMAIN_AFFECT_LIVE specifies that the device shall be
        deallocated from the active domain instance only and is not from the
        persisted domain configuration.  VIR_DOMAIN_AFFECT_CONFIG
        specifies that the device shall be deallocated from the persisted domain
        configuration only.  Note that the target hypervisor must return an
        error if unable to satisfy flags.  E.g. the hypervisor driver will
        return failure if LIVE is specified but it only supports removing the
        persisted device allocation.
        
        Some hypervisors may prevent this operation if there is a current
        block job running operation on the device being detached; in that case,
        use virDomainBlockJobAbort() to stop the block job first.
        
        Beware that depending on the hypervisor and device type, detaching a device
        from a running domain may be asynchronous. That is, calling
        virDomainDetachDeviceFlags may just request device removal while the device
        is actually removed later (in cooperation with a guest OS). Previously,
        this fact was ignored and the device could have been removed from domain
        configuration before it was actually removed by the hypervisor causing
        various failures on subsequent operations. To check whether the device was
        successfully removed, either recheck domain configuration using
        virDomainGetXMLDesc() or add a handler for the VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED
        event. In case the device is already gone when virDomainDetachDeviceFlags
        returns, the event is delivered before this API call ends. To help existing
        clients work better in most cases, this API will try to transform an
        asynchronous device removal that finishes shortly after the request into
        a synchronous removal. In other words, this API may wait a bit for the
        removal to complete in case it was not synchronous.
        
        Be aware that hotplug changes might not persist across a domain going
        into S4 state (also known as hibernation) unless you also modify the
        persistent domain definition.
        
        The supplied XML description of the device should be as specific
        as its definition in the domain XML. The set of attributes used
        to match the device are internal to the drivers. Using a partial definition,
        or attempting to detach a device that is not present in the domain XML,
        but shares some specific attributes with one that is present,
        may lead to unexpected results. rz#virDomainDetachDeviceFlags() failedrO)rZvirDomainDetachDeviceFlagsrfr)rrtr7r9rrr�detachDeviceFlags�s+zvirDomain.detachDeviceFlagscCs"tj|j|�}|dkrtd��|S)z Extract errors on disk devices. NzvirDomainGetDiskErrors() failed)rZvirDomainGetDiskErrorsrfr)rr7r9rrr�
diskErrorsszvirDomain.diskErrorscCs"tj|j|�}|dkrtd��|S)zAQuery the CPU affinity setting of the emulator process of domain Nz$virDomainGetEmulatorPinInfo() failed)rZvirDomainGetEmulatorPinInforfr)rr7r9rrr�emulatorPinInfoszvirDomain.emulatorPinInfocCs&tj|j|||�}|dkr"td��|S)aMCalls FITRIM within the guest (hence guest agent may be
        required depending on hypervisor used). Either call it on each
        mounted filesystem (@mountPoint is None) or just on specified
        @mountPoint. @minimum hints that free ranges smaller than this
        may be ignored (this is a hint and the guest may not respect
        it).  By increasing this value, the fstrim operation will
        complete more quickly for filesystems with badly fragmented
        free space, although not all blocks will be discarded.
        If @minimum is not zero, the command may fail. rzvirDomainFSTrim() failedrO)rZvirDomainFSTrimrfr)rZ
mountPointZminimumr7r9rrr�fSTrims
zvirDomain.fSTrimcCs"tj|j|�}|dkrtd��|S)zjGet a list of mapping information for each mounted file systems within the specified guest and the disks. NzvirDomainGetFSInfo() failed)rZvirDomainGetFSInforfr)rr7r9rrr�fsInfo*szvirDomain.fsInfocCs$tj|j||�}|dkr td��|S)a�Extracts CPU statistics for a running domain. On success it will
           return a list of data of dictionary type. If boolean total is False or 0, the
           first element of the list refers to CPU0 on the host, second element is
           CPU1, and so on. The format of data struct is as follows:
           [{cpu_time:xxx}, {cpu_time:xxx}, ...]
           If it is True or 1, it returns total domain CPU statistics in the format of
           [{cpu_time:xxx, user_time:xxx, system_time:xxx}] NzvirDomainGetCPUStats() failed)rZvirDomainGetCPUStatsrfr)r�totalr7r9rrr�getCPUStats1szvirDomain.getCPUStatscCs$tj|j||�}|dkr td��|S)z%Get aggregated info from guest agent NzvirDomainGetGuestInfo() failed)rZvirDomainGetGuestInforfr)r�typesr7r9rrr�	guestInfo>szvirDomain.guestInfocCs"tj|j|�}|dkrtd��|S)zBreturns a dictionary containing information regarding guest vcpus rzvirDomainGetGuestVcpus() failedrO)rZvirDomainGetGuestVcpusrfr)rr7r9rrr�
guestVcpusEszvirDomain.guestVcpuscCs"tj|j|�}|dkrtd��|S)z0Determine if the domain has a current snapshot. rz$virDomainHasCurrentSnapshot() failedrO)rZvirDomainHasCurrentSnapshotrfr)rr7r9rrr�hasCurrentSnapshotPszvirDomain.hasCurrentSnapshotcCs"tj|j|�}|dkrtd��|S)z�Check if a domain has a managed save image as created by
        virDomainManagedSave(). Note that any running domain should not have
        such an image, as it should have been removed on restart. rz%virDomainHasManagedSaveImage() failedrO)rZvirDomainHasManagedSaveImagerfr)rr7r9rrr�hasManagedSaveImage[szvirDomain.hasManagedSaveImagecCs"tj|j|�}|dkrtd��|S)z�Get the hostname for that domain. If no hostname is found,
        then an error is raised with VIR_ERR_NO_HOSTNAME code.
        
        Dependent on hypervisor and @flags used, this may require a
        guest agent to be available. NzvirDomainGetHostname() failed)rZvirDomainGetHostnamerfr)rr7r9rrr�hostnamedszvirDomain.hostnamecCs tj|j�}|dkrtd��|S)z�Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted. NzvirDomainGetInfo() failed)rZvirDomainGetInforfr)rr9rrr�infosszvirDomain.infocCs"tj|j|�}|dkrtd��|S)zSend NMI to the guest rzvirDomainInjectNMI() failedrO)rZvirDomainInjectNMIrfr)rr7r9rrr�	injectNMI~szvirDomain.injectNMIcCs$tj|j||�}|dkr td��|S)zPreturns a dictionary of domain interfaces along with their MAC and IP addresses Nz$virDomainInterfaceAddresses() failed)rZvirDomainInterfaceAddressesrfr)r�sourcer7r9rrr�interfaceAddresses�szvirDomain.interfaceAddressescCs$tj|j||�}|dkr td��|S)z2Get the bandwidth tunables for a interface device Nz(virDomainGetInterfaceParameters() failed)rZvirDomainGetInterfaceParametersrfr)r�devicer7r9rrr�interfaceParameters�szvirDomain.interfaceParameterscCs"tj|j|�}|dkrtd��|S)z2Extracts interface device statistics for a domain Nz virDomainInterfaceStats() failed)rZvirDomainInterfaceStatsrfr)rr�r9rrr�interfaceStats�szvirDomain.interfaceStatscCs"tj|j|�}|dkrtd��|S)z>Query the CPU affinity setting of the IOThreads of the domain Nz!virDomainGetIOThreadInfo() failed)rZvirDomainGetIOThreadInforfr)rr7r9rrr�ioThreadInfo�szvirDomain.ioThreadInfocCs tj|j�}|dkrtd��|S)z-Determine if the domain is currently running rzvirDomainIsActive() failedrO)rZvirDomainIsActiverfr)rr9rrr�isActive�szvirDomain.isActivecCs tj|j�}|dkrtd��|S)zsDetermine if the domain has a persistent configuration
        which means it will still exist after shutting down rzvirDomainIsPersistent() failedrO)rZvirDomainIsPersistentrfr)rr9rrr�isPersistent�szvirDomain.isPersistentcCs tj|j�}|dkrtd��|S)z*Determine if the domain has been updated. rzvirDomainIsUpdated() failedrO)rZvirDomainIsUpdatedrfr)rr9rrr�	isUpdated�szvirDomain.isUpdatedcCs tj|j�}|dkrtd��|S)zFExtract information about an active job being processed for a domain. NzvirDomainGetJobInfo() failed)rZvirDomainGetJobInforfr)rr9rrr�jobInfo�szvirDomain.jobInfocCs"tj|j|�}|dkrtd��|S)zFExtract information about an active job being processed for a domain. NzvirDomainGetJobStats() failed)rZvirDomainGetJobStatsrfr)rr7r9rrr�jobStats�szvirDomain.jobStatscCs"tj|j|�}|dkrtd��|S)z&Get launch security info for a domain Nz'virDomainGetLaunchSecurityInfo() failed)rZvirDomainGetLaunchSecurityInforfr)rr7r9rrr�launchSecurityInfo�szvirDomain.launchSecurityInfocCs"tj|j|�}|dkrtd��|S)aThis method will suspend a domain and save its memory contents to
        a file on disk. After the call, if successful, the domain is not
        listed as running anymore.
        The difference from virDomainSave() is that libvirt is keeping track of
        the saved state itself, and will reuse it once the domain is being
        restarted (automatically or via an explicit libvirt call).
        As a result any running domain is sure to not have a managed saved image.
        This also implies that managed save only works on persistent domains,
        since the domain must still exist in order to use virDomainCreate() to
        restart it.
        
        If @flags includes VIR_DOMAIN_SAVE_BYPASS_CACHE, then libvirt will
        attempt to bypass the file system cache while creating the file, or
        fail if it cannot do so for the given system; this can allow less
        pressure on file system cache, but also risks slowing saves to NFS.
        
        Normally, the managed saved state will remember whether the domain
        was running or paused, and start will resume to the same state.
        Specifying VIR_DOMAIN_SAVE_RUNNING or VIR_DOMAIN_SAVE_PAUSED in
        @flags will override the default saved into the file.  These two
        flags are mutually exclusive. rzvirDomainManagedSave() failedrO)rZvirDomainManagedSaverfr)rr7r9rrr�managedSave�szvirDomain.managedSavecCs$tj|j||�}|dkr td��|S)a�This updates the definition of a domain stored in a saved state
        file.
        
        @dxml can be used to alter host-specific portions of the domain XML
        that will be used on the next start of the domain. For example, it is
        possible to alter the backing filename that is associated with a
        disk device.
        
        Normally, the saved state file will remember whether the domain was
        running or paused, and restore defaults to the same state.
        Specifying VIR_DOMAIN_SAVE_RUNNING or VIR_DOMAIN_SAVE_PAUSED in
        @flags will override the default saved into the file; omitting both
        leaves the file's default unchanged.  These two flags are mutually
        exclusive. rz&virDomainManagedSaveDefineXML() failedrO)rZvirDomainManagedSaveDefineXMLrfr)r�dxmlr7r9rrr�managedSaveDefineXML�szvirDomain.managedSaveDefineXMLcCs"tj|j|�}|dkrtd��|S)aThis method will extract the XML description of the managed save
        state file of a domain.
        
        No security-sensitive data will be included unless @flags contains
        VIR_DOMAIN_SAVE_IMAGE_XML_SECURE; this flag is rejected on read-only
        connections. Nz'virDomainManagedSaveGetXMLDesc() failed)rZvirDomainManagedSaveGetXMLDescrfr)rr7r9rrr�managedSaveGetXMLDescszvirDomain.managedSaveGetXMLDesccCs"tj|j|�}|dkrtd��|S)z/Remove any managed save image for this domain. rz#virDomainManagedSaveRemove() failedrO)rZvirDomainManagedSaveRemoverfr)rr7r9rrr�managedSaveRemoveszvirDomain.managedSaveRemovecCs tj|j�}|dkrtd��|S)z�Retrieve the maximum amount of physical memory allocated to a
        domain. If domain is None, then this get the amount of memory reserved
        to Domain0 i.e. the domain where the application runs. rzvirDomainGetMaxMemory() failed)rZvirDomainGetMaxMemoryrfr)rr9rrr�	maxMemoryszvirDomain.maxMemorycCs tj|j�}|dkrtd��|S)aRProvides the maximum number of virtual CPUs supported for
        the guest VM. If the guest is inactive, this is basically
        the same as virConnectGetMaxVcpus(). If the guest is running
        this will reflect the maximum number of virtual CPUs the
        guest was booted with.  For more details, see virDomainGetVcpusFlags(). rzvirDomainGetMaxVcpus() failedrO)rZvirDomainGetMaxVcpusrfr)rr9rrr�maxVcpus'szvirDomain.maxVcpuscCs"tj|j|�}|dkrtd��|S)zGet the memory parameters Nz%virDomainGetMemoryParameters() failed)rZvirDomainGetMemoryParametersrfr)rr7r9rrr�memoryParameters6szvirDomain.memoryParameterscCs&tj|j|||�}|dkr"td��|S)z%Read the contents of domain's memory NzvirDomainMemoryPeek() failed)rZvirDomainMemoryPeekrfr)r�startr�r7r9rrr�
memoryPeek=szvirDomain.memoryPeekcCs tj|j�}|dkrtd��|S)z(Extracts memory statistics for a domain NzvirDomainMemoryStats() failed)rZvirDomainMemoryStatsrfr)rr9rrr�memoryStatsDszvirDomain.memoryStatscCs"tj|j|�}|dkrtd��|S)z0Fetch list of messages reported against domain. NzvirDomainGetMessages() failed)rZvirDomainGetMessagesrfr)rr7r9rrr�messagesKszvirDomain.messagescCs&tj|j|||�}|dkr"td��|S)asRetrieves the appropriate domain element given by @type.
        If VIR_DOMAIN_METADATA_ELEMENT is requested parameter @uri
        must be set to the name of the namespace the requested elements
        belong to, otherwise must be None.
        
        If an element of the domain XML is not present, the resulting
        error will be VIR_ERR_NO_DOMAIN_METADATA.  This method forms
        a shortcut for seeing information from virDomainSetMetadata()
        without having to go through virDomainGetXMLDesc().
        
        @flags controls whether the live domain or persistent
        configuration will be queried. NzvirDomainGetMetadata() failed)rZvirDomainGetMetadatarfr)rrer5r7r9rrr�metadataVs
zvirDomain.metadatac	CsL|dkrd}n|j}tj|j|||||�}|dkr:td��t|j|d�}|S)a
Migrate the domain object from its current host to the destination
        host given by dconn (a connection to the destination host).
        
        This function is similar to virDomainMigrate3, but it only supports a fixed
        set of parameters: @dname corresponds to VIR_MIGRATE_PARAM_DEST_NAME, @uri
        is VIR_MIGRATE_PARAM_URI, and @bandwidth is VIR_MIGRATE_PARAM_BANDWIDTH.
        
        virDomainFree should be used to free the resources after the
        returned domain object is no longer needed. NzvirDomainMigrate() failed)r8)rfrZvirDomainMigraterrrd)	r�dconnr7�dnamer5r��dconn__or9r�rrr�migratehs
zvirDomain.migratec
CsN|dkrd}n|j}tj|j||||||�}|dkr<td��t|j|d�}	|	S)a7Migrate the domain object from its current host to the destination
        host given by dconn (a connection to the destination host).
        
        This function is similar to virDomainMigrate3, but it only supports a fixed
        set of parameters: @dxml corresponds to VIR_MIGRATE_PARAM_DEST_XML, @dname
        is VIR_MIGRATE_PARAM_DEST_NAME, @uri is VIR_MIGRATE_PARAM_URI, and
        @bandwidth is VIR_MIGRATE_PARAM_BANDWIDTH.
        
        virDomainFree should be used to free the resources after the
        returned domain object is no longer needed. NzvirDomainMigrate2() failed)r8)rfrZvirDomainMigrate2rrrd)
rr�r�r7r�r5r�r�r9r�rrr�migrate2|szvirDomain.migrate2cCsH|dkrd}n|j}tj|j|||�}|dkr6td��t|j|d�}|S)z�Migrate the domain object from its current host to the destination host
                    given by dconn (a connection to the destination host). NzvirDomainMigrate3() failed)r8)rfrZvirDomainMigrate3rrrd)rr�r�r7r�r9r�rrr�migrate3�szvirDomain.migrate3cCstj|j|�}|S)z�Get current size of the cache (in bytes) used for compressing
                    repeatedly transferred memory pages during live migration. )rZ#virDomainMigrateGetCompressionCacherf)rr7r9rrr�migrateGetCompressionCache�sz$virDomain.migrateGetCompressionCachecCstj|j|�}|S)z{Get the current value of the maximum downtime (in milliseconds)
                    allowed during a migration of a guest. )rZvirDomainMigrateGetMaxDowntimerf)rr7r9rrr�migrateGetMaxDowntime�szvirDomain.migrateGetMaxDowntimecCs"tj|j|�}|dkrtd��|S)z>Get currently configured maximum migration speed for a domain rz$virDomainMigrateGetMaxSpeed() failedrO)rZvirDomainMigrateGetMaxSpeedrfr)rr7r9rrr�migrateGetMaxSpeed�szvirDomain.migrateGetMaxSpeedcCs$tj|j||�}|dkr td��|S)aOSets size of the cache (in bytes) used for compressing repeatedly
        transferred memory pages during live migration. It's supposed to be called
        while the domain is being live-migrated as a reaction to migration progress
        and increasing number of compression cache misses obtained from
        virDomainGetJobStats. rz,virDomainMigrateSetCompressionCache() failedrO)rZ#virDomainMigrateSetCompressionCacherfr)rZ	cacheSizer7r9rrr�migrateSetCompressionCache�sz$virDomain.migrateSetCompressionCachecCs$tj|j||�}|dkr td��|S)z�Sets maximum tolerable time for which the domain is allowed to be paused
        at the end of live migration. It's supposed to be called while the domain is
        being live-migrated as a reaction to migration progress. rz'virDomainMigrateSetMaxDowntime() failedrO)rZvirDomainMigrateSetMaxDowntimerfr)r�downtimer7r9rrr�migrateSetMaxDowntime�szvirDomain.migrateSetMaxDowntimecCs$tj|j||�}|dkr td��|S)aOThe maximum bandwidth (in MiB/s) that will be used to do migration
        can be specified with the bandwidth parameter. Not all hypervisors
        will support a bandwidth cap. When VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPY
        is set in @flags, this API sets the maximum bandwidth for the post-copy
        phase of the migration. rz$virDomainMigrateSetMaxSpeed() failedrO)rZvirDomainMigrateSetMaxSpeedrfr)rr�r7r9rrr�migrateSetMaxSpeed�szvirDomain.migrateSetMaxSpeedcCs"tj|j|�}|dkrtd��|S)a�Starts post-copy migration. This function has to be called while
        migration (initiated with VIR_MIGRATE_POSTCOPY flag) is in progress.
        
        Traditional pre-copy migration iteratively walks through guest memory
        pages and migrates those that changed since the previous iteration. The
        iterative phase stops when the number of dirty pages is low enough so that
        the virtual CPUs can be paused, all dirty pages transferred to the
        destination, where the virtual CPUs are unpaused, and all this can happen
        within a predefined downtime period. It's clear that this process may never
        converge if downtime is too short and/or the guest keeps changing a lot of
        memory pages.
        
        When migration is switched to post-copy mode, the virtual CPUs are paused
        immediately, only a minimum set of pages is transferred, and the CPUs are
        unpaused on destination. The source keeps sending all remaining memory pages
        to the destination while the guest is already running there. Whenever the
        guest tries to read a memory page which has not been migrated yet, the
        hypervisor has to tell the source to transfer that page in a priority
        channel. To minimize such page faults, it is a good idea to run at least one
        iteration of pre-copy migration before switching to post-copy.
        
        Post-copy migration is guaranteed to converge since each page is transferred
        at most once no matter how fast it changes. On the other hand once the
        guest is running on the destination host, the migration can no longer be
        rolled back because none of the hosts has complete state. If this happens,
        libvirt will leave the domain paused on both hosts with
        VIR_DOMAIN_PAUSED_POSTCOPY_FAILED reason. It's up to the upper layer to
        decide what to do in such case. Because of this, libvirt will refuse to
        cancel post-copy migration via virDomainAbortJob.
        
        The following domain life cycle events are emitted during post-copy
        migration:
         VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY (on the source) -- migration entered
             post-copy mode.
         VIR_DOMAIN_EVENT_RESUMED_POSTCOPY (on the destination) -- the guest is
             running on the destination host while some of its memory pages still
             remain on the source host; neither the source nor the destination host
             contain a complete guest state from this point until migration
             finishes.
         VIR_DOMAIN_EVENT_RESUMED_MIGRATED (on the destination),
         VIR_DOMAIN_EVENT_STOPPED_MIGRATED (on the source) -- migration finished
             successfully and the destination host holds a complete guest state.
         VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY_FAILED (on the destination) -- emitted
             when migration fails in post-copy mode and it's unclear whether any
             of the hosts has a complete guest state.
        
        The progress of a post-copy migration can be monitored normally using
        virDomainGetJobStats on the source host. Fetching statistics of a completed
        post-copy migration can also be done on the source host (by calling
        virDomainGetJobStats or listening to VIR_DOMAIN_EVENT_ID_JOB_COMPLETED
        event, but (in contrast to pre-copy migration) the statistics are not
        available on the destination host. Thus, VIR_DOMAIN_EVENT_ID_JOB_COMPLETED
        event is the only way of getting statistics of a completed post-copy
        migration of a transient domain (because the domain is removed after
        migration and there's no domain to run virDomainGetJobStats on). rz&virDomainMigrateStartPostCopy() failedrO)rZvirDomainMigrateStartPostCopyrfr)rr7r9rrr�migrateStartPostCopy�s8zvirDomain.migrateStartPostCopycCs(tj|j||||�}|dkr$td��|S)a�Migrate the domain object from its current host to the destination
        host given by duri.
        
        This function is similar to virDomainMigrateToURI3, but it only supports a
        fixed set of parameters: @dname corresponds to VIR_MIGRATE_PARAM_DEST_NAME,
        and @bandwidth corresponds to VIR_MIGRATE_PARAM_BANDWIDTH.
        
        The operation of this API hinges on the VIR_MIGRATE_PEER2PEER flag.
        
        If the VIR_MIGRATE_PEER2PEER flag IS set, the @duri parameter must be a
        valid libvirt connection URI, by which the source libvirt driver can connect
        to the destination libvirt. In other words, @duri corresponds to @dconnuri
        of virDomainMigrateToURI3.
        
        If the VIR_MIGRATE_PEER2PEER flag is NOT set, the @duri parameter takes a
        hypervisor specific URI used to initiate the migration. In this case @duri
        corresponds to VIR_MIGRATE_PARAM_URI of virDomainMigrateToURI3. rzvirDomainMigrateToURI() failedrO)rZvirDomainMigrateToURIrfr)rZdurir7r�r�r9rrr�migrateToURIszvirDomain.migrateToURIcCs,tj|j||||||�}|dkr(td��|S)aIMigrate the domain object from its current host to the destination
        host given by @dconnuri.
        
        This function is similar to virDomainMigrateToURI3, but it only supports a
        fixed set of parameters: @miguri corresponds to VIR_MIGRATE_PARAM_URI, @dxml
        is VIR_MIGRATE_PARAM_DEST_XML, @dname is VIR_MIGRATE_PARAM_DEST_NAME, and
        @bandwidth corresponds to VIR_MIGRATE_PARAM_BANDWIDTH.
        
        The operation of this API hinges on the VIR_MIGRATE_PEER2PEER flag.
        
        If the VIR_MIGRATE_PEER2PEER flag IS set, the @dconnuri parameter must be a
        valid libvirt connection URI, by which the source libvirt driver can connect
        to the destination libvirt. In other words, @dconnuri has the same semantics
        as in virDomainMigrateToURI3.
        
        If the VIR_MIGRATE_PEER2PEER flag is NOT set, the @dconnuri must be None
        and the @miguri parameter takes a hypervisor specific URI used to initiate
        the migration. In this case @miguri corresponds to VIR_MIGRATE_PARAM_URI of
        virDomainMigrateToURI3. rzvirDomainMigrateToURI2() failedrO)rZvirDomainMigrateToURI2rfr)r�dconnuriZmigurir�r7r�r�r9rrr�
migrateToURI2,szvirDomain.migrateToURI2cCs&tj|j|||�}|dkr"td��|S)zjMigrate the domain object from its current host to the destination host
                    given by URI. rzvirDomainMigrateToURI3() failedrO)rZvirDomainMigrateToURI3rfr)rr�r�r7r9rrr�
migrateToURI3IszvirDomain.migrateToURI3cCstj|j�}|S)z$Get the public name for that domain )rZvirDomainGetNamerf)rr9rrrr;UszvirDomain.namecCs"tj|j|�}|dkrtd��|S)zGet the NUMA parameters Nz#virDomainGetNumaParameters() failed)rZvirDomainGetNumaParametersrfr)rr7r9rrr�numaParameters^szvirDomain.numaParameterscCs:|dkrd}n|j}tj|j|||�}|dkr6td��|S)a�This opens the host interface associated with a channel device on a
        guest, if the host interface is supported.  If @name is given, it
        can match either the device alias (e.g. "channel0"), or the virtio
        target name (e.g. "org.qemu.guest_agent.0").  If @name is omitted,
        then the first channel is opened. The channel is associated with
        the passed in @st stream, which should have been opened in
        non-blocking mode for bi-directional I/O.
        
        By default, when @flags is 0, the open will fail if libvirt detects
        that the channel is already in use by another client; passing
        VIR_DOMAIN_CHANNEL_FORCE will cause libvirt to forcefully remove the
        other client prior to opening this channel. NrzvirDomainOpenChannel() failedrO)rfrZvirDomainOpenChannelr)rr;�str7�st__or9rrr�openChannelis
zvirDomain.openChannelcCs:|dkrd}n|j}tj|j|||�}|dkr6td��|S)a�This opens the backend associated with a console, serial or
        parallel port device on a guest, if the backend is supported.
        If the @dev_name is omitted, then the first console or serial
        device is opened. The console is associated with the passed
        in @st stream, which should have been opened in non-blocking
        mode for bi-directional I/O.
        
        By default, when @flags is 0, the open will fail if libvirt
        detects that the console is already in use by another client;
        passing VIR_DOMAIN_CONSOLE_FORCE will cause libvirt to forcefully
        remove the other client prior to opening this console.
        
        If flag VIR_DOMAIN_CONSOLE_SAFE the console is opened only in the
        case where the hypervisor driver supports safe (mutually exclusive)
        console handling.
        
        Older servers did not support either flag, and also did not forbid
        simultaneous clients on a console, with potentially confusing results.
        When passing @flags of 0 in order to support a wider range of server
        versions, it is up to the client to ensure mutual exclusion. NrzvirDomainOpenConsole() failedrO)rfrZvirDomainOpenConsoler)rZdev_namer�r7r�r9rrr�openConsoleszvirDomain.openConsolecCs&tj|j|||�}|dkr"td��|S)a�This will attempt to connect the file descriptor @fd, to
        the graphics backend of @dom. If @dom has multiple graphics
        backends configured, then @idx will determine which one is
        opened, starting from @idx 0.
        
        To disable any authentication, pass the VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH
        constant for @flags.
        
        The caller should use an anonymous socketpair to open
        @fd before invocation.
        
        This method can only be used when connected to a local
        libvirt hypervisor, over a UNIX domain socket. Attempts
        to use this method over a TCP connection will always fail rzvirDomainOpenGraphics() failedrO)rZvirDomainOpenGraphicsrfr)r�idxr>r7r9rrr�openGraphics�szvirDomain.openGraphicscCs$tj|j||�}|dkr td��|S)a�This will create a socket pair connected to the graphics backend of @dom.
        One end of the socket will be returned on success, and the other end is
        handed to the hypervisor.
        If @dom has multiple graphics backends configured, then @idx will determine
        which one is opened, starting from @idx 0.
        
        To disable any authentication, pass the VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH
        constant for @flags.
        
        This method can only be used when connected to a local
        libvirt hypervisor, over a UNIX domain socket. Attempts
        to use this method over a TCP connection will always fail. rz virDomainOpenGraphicsFD() failedrO)rZvirDomainOpenGraphicsFDrfr)rr�r7r9rrr�openGraphicsFD�s
zvirDomain.openGraphicsFDcCs&tj|j|||�}|dkr"td��|S)a]Attempt to have the guest enter the given @target power management
        suspension level.  If @duration is non-zero, also schedule the guest to
        resume normal operation after that many seconds, if nothing else has
        resumed it earlier.  Some hypervisors require that @duration be 0, for
        an indefinite suspension.
        
        Dependent on hypervisor used, this may require a
        guest agent to be available, e.g. QEMU.
        
        Beware that at least for QEMU, the domain's process will be terminated
        when VIR_NODE_SUSPEND_TARGET_DISK is used and a new process will be
        launched when libvirt is asked to wake up the domain. As a result of
        this, any runtime changes, such as device hotplug or memory settings,
        are lost unless such changes were made with VIR_DOMAIN_AFFECT_CONFIG
        flag. rz&virDomainPMSuspendForDuration() failedrO)rZvirDomainPMSuspendForDurationrfr)r�target�durationr7r9rrr�pMSuspendForDuration�szvirDomain.pMSuspendForDurationcCs"tj|j|�}|dkrtd��|S)z�Inject a wakeup into the guest that previously used
        virDomainPMSuspendForDuration, rather than waiting for the
        previously requested duration (if any) to elapse. rzvirDomainPMWakeup() failedrO)rZvirDomainPMWakeuprfr)rr7r9rrr�pMWakeup�szvirDomain.pMWakeupcCs"tj|j|�}|dkrtd��|S)zGet all perf events setting. NzvirDomainGetPerfEvents() failed)rZvirDomainGetPerfEventsrfr)rr7r9rrr�
perfEvents�szvirDomain.perfEventscCs$tj|j||�}|dkr td��|S)z�Dynamically change the real CPUs which can be allocated to the emulator process of a domain.
                    This function requires privileged access to the hypervisor. rzvirDomainPinEmulator() failedrO)rZvirDomainPinEmulatorrfr)r�cpumapr7r9rrr�pinEmulator�szvirDomain.pinEmulatorcCs&tj|j|||�}|dkr"td��|S)z�Dynamically change the real CPUs which can be allocated to an IOThread. This function requires privileged access to the hypervisor. rzvirDomainPinIOThread() failedrO)rZvirDomainPinIOThreadrfr)r�iothread_valr�r7r9rrr�pinIOThread�szvirDomain.pinIOThreadcCs$tj|j||�}|dkr td��|S)z�Dynamically change the real CPUs which can be allocated to a virtual CPU. This function requires privileged access to the hypervisor. rzvirDomainPinVcpu() failedrO)rZvirDomainPinVcpurfr)r�vcpur�r9rrr�pinVcpu�szvirDomain.pinVcpucCs&tj|j|||�}|dkr"td��|S)z�Dynamically change the real CPUs which can be allocated to a virtual CPU. This function requires privileged access to the hypervisor. rzvirDomainPinVcpuFlags() failedrO)rZvirDomainPinVcpuFlagsrfr)rr�r�r7r9rrr�pinVcpuFlags	szvirDomain.pinVcpuFlagscCs"tj|j|�}|dkrtd��|S)aTReboot a domain, the domain object is still usable thereafter, but
        the domain OS is being stopped for a restart.
        Note that the guest OS may ignore the request.
        Additionally, the hypervisor may check and support the domain
        'on_reboot' XML setting resulting in a domain that shuts down instead
        of rebooting.
        
        If @flags is set to zero, then the hypervisor will choose the
        method of shutdown it considers best. To have greater control
        pass one or more of the virDomainRebootFlagValues. The order
        in which the hypervisor tries each shutdown method is undefined,
        and a hypervisor is not required to support all methods.
        
        To use guest agent (VIR_DOMAIN_REBOOT_GUEST_AGENT) the domain XML
        must have <channel> configured.
        
        Due to implementation limitations in some drivers (the qemu driver,
        for instance) it is not advised to migrate or save a guest that is
        rebooting as a result of this API. Migrating such a guest can lead
        to a plain shutdown on the destination. rzvirDomainReboot() failedrO)rZvirDomainRebootrfr)rr7r9rrr�reboot
	szvirDomain.rebootcCs$tj|j||�}|dkr td��|S)a�Rename a domain. New domain name is specified in the second
        argument. Depending on each driver implementation it may be
        required that domain is in a specific state.
        
        There might be some attributes and/or elements in domain XML that if no
        value provided at XML defining time, libvirt will derive their value from
        the domain name. These are not updated by this API. Users are strongly
        advised to change these after the rename was successful. rzvirDomainRename() failedrO)rZvirDomainRenamerfr)r�new_namer7r9rrr�rename'	s	zvirDomain.renamecCs"tj|j|�}|dkrtd��|S)a8Reset a domain immediately without any guest OS shutdown.
        Reset emulates the power reset button on a machine, where all
        hardware sees the RST line set and reinitializes internal state.
        
        Note that there is a risk of data loss caused by reset without any
        guest OS shutdown. rzvirDomainReset() failedrO)rZvirDomainResetrfr)rr7r9rrr�reset5	szvirDomain.resetcCs tj|j�}|dkrtd��|S)a(Resume a suspended domain, the process is restarted from the state where
        it was frozen by calling virDomainSuspend().
        This function may require privileged access
        Moreover, resume may not be supported if domain is in some
        special state like VIR_DOMAIN_PMSUSPENDED. rzvirDomainResume() failedrO)rZvirDomainResumerfr)rr9rrr�resumeA	szvirDomain.resumecCs8|dkrd}n|j}tj|j||�}|dkr4td��|S)z(revert the domain to the given snapshot Nrz"virDomainRevertToSnapshot() failedrO)rfrZvirDomainRevertToSnapshotr)rZsnapr7Zsnap__or9rrr�revertToSnapshotP	szvirDomain.revertToSnapshotcCs"tj|j|�}|dkrtd��|S)a�This method will suspend a domain and save its memory contents to
        a file on disk. After the call, if successful, the domain is not
        listed as running anymore (this ends the life of a transient domain).
        Use virDomainRestore() to restore a domain after saving.
        
        See virDomainSaveFlags() for more control.  Also, a save file can
        be inspected or modified slightly with virDomainSaveImageGetXMLDesc()
        and virDomainSaveImageDefineXML(). rzvirDomainSave() failedrO)rZ
virDomainSaverfr)rr�r9rrr�save_	s	zvirDomain.savecCs&tj|j|||�}|dkr"td��|S)a�This method will suspend a domain and save its memory contents to
        a file on disk. After the call, if successful, the domain is not
        listed as running anymore (this ends the life of a transient domain).
        Use virDomainRestore() to restore a domain after saving.
        
        If the hypervisor supports it, @dxml can be used to alter
        host-specific portions of the domain XML that will be used when
        restoring an image.  For example, it is possible to alter the
        backing filename that is associated with a disk device, in order to
        prepare for file renaming done as part of backing up the disk
        device while the domain is stopped.
        
        If @flags includes VIR_DOMAIN_SAVE_BYPASS_CACHE, then libvirt will
        attempt to bypass the file system cache while creating the file, or
        fail if it cannot do so for the given system; this can allow less
        pressure on file system cache, but also risks slowing saves to NFS.
        
        Normally, the saved state file will remember whether the domain was
        running or paused, and restore defaults to the same state.
        Specifying VIR_DOMAIN_SAVE_RUNNING or VIR_DOMAIN_SAVE_PAUSED in
        @flags will override what state gets saved into the file.  These
        two flags are mutually exclusive.
        
        A save file can be inspected or modified slightly with
        virDomainSaveImageGetXMLDesc() and virDomainSaveImageDefineXML().
        
        Some hypervisors may prevent this operation if there is a current
        block job running; in that case, use virDomainBlockJobAbort()
        to stop the block job first. rzvirDomainSaveFlags() failedrO)rZvirDomainSaveFlagsrfr)rr�r�r7r9rrr�	saveFlagsm	szvirDomain.saveFlagscCs tj|j�}|dkrtd��|S)zPGet the scheduler parameters, the @params array will be filled with the values. Nz(virDomainGetSchedulerParameters() failed)rZvirDomainGetSchedulerParametersrfr)rr9rrr�schedulerParameters�	szvirDomain.schedulerParameterscCs"tj|j|�}|dkrtd��|S)zGet the scheduler parameters Nz-virDomainGetSchedulerParametersFlags() failed)rZ$virDomainGetSchedulerParametersFlagsrfr)rr7r9rrr�schedulerParametersFlags�	sz"virDomain.schedulerParametersFlagscCs tj|j�}|dkrtd��|S)zGet the scheduler type. Nz"virDomainGetSchedulerType() failed)rZvirDomainGetSchedulerTyperfr)rr9rrr�
schedulerType�	szvirDomain.schedulerTypecCs:|dkrd}n|j}tj|j|||�}|dkr6td��|S)a�Take a screenshot of current domain console as a stream. The image format
        is hypervisor specific. Moreover, some hypervisors supports multiple
        displays per domain. These can be distinguished by @screen argument.
        
        This call sets up a stream; subsequent use of stream API is necessary
        to transfer actual data, determine how much data is successfully
        transferred, and detect any errors.
        
        The screen ID is the sequential number of screen. In case of multiple
        graphics cards, heads are enumerated before devices, e.g. having
        two graphics cards, both with four heads, screen ID 5 addresses
        the second head on the second card. NzvirDomainScreenshot() failed)rfrZvirDomainScreenshotr)r�streamZscreenr7�	stream__or9rrr�
screenshot�	s
zvirDomain.screenshotcCs tj|j�}|dkrtd��|S)z\Extract information about the domain security label. Only the first label will be returned. Nz"virDomainGetSecurityLabel() failed)rZvirDomainGetSecurityLabelrfr)rr9rrr�
securityLabel�	szvirDomain.securityLabelcCs tj|j�}|dkrtd��|S)z\Extract information about the domain security label. A list of all labels will be returned. Nz&virDomainGetSecurityLabelList() failed)rZvirDomainGetSecurityLabelListrfr)rr9rrr�securityLabelList�	szvirDomain.securityLabelListcCs*tj|j|||||�}|dkr&td��|S)zSend key(s) to the guest. rzvirDomainSendKey() failedrO)rZvirDomainSendKeyrfr)rZcodesetZholdtimeZkeycodesZ	nkeycodesr7r9rrr�sendKey�	szvirDomain.sendKeycCs&tj|j|||�}|dkr"td��|S)a�Send a signal to the designated process in the guest
        
        The signal numbers must be taken from the virDomainProcessSignal
        enum. These will be translated to the corresponding signal
        number for the guest OS, by the guest agent delivering the
        signal. If there is no mapping from virDomainProcessSignal to
        the native OS signals, this API will report an error.
        
        If @pid_value is an integer greater than zero, it is
        treated as a process ID. If @pid_value is an integer
        less than zero, it is treated as a process group ID.
        All the @pid_value numbers are from the container/guest
        namespace. The value zero is not valid.
        
        Not all hypervisors will support sending signals to
        arbitrary processes or process groups. If this API is
        implemented the minimum requirement is to be able to
        use @pid_value == 1 (i.e. kill init). No other value is
        required to be supported.
        
        If the @signum is VIR_DOMAIN_PROCESS_SIGNAL_NOP then this
        API will simply report whether the process is running in
        the container/guest. rz#virDomainSendProcessSignal() failedrO)rZvirDomainSendProcessSignalrfr)rZ	pid_valueZsignumr7r9rrr�sendProcessSignal�	szvirDomain.sendProcessSignalcCs"tj|j|�}|dkrtd��|S)zVConfigure the domain to be automatically started
        when the host machine boots. rzvirDomainSetAutostart() failedrO)rZvirDomainSetAutostartrfr)rr{r9rrr�setAutostart�	szvirDomain.setAutostartcCs$tj|j||�}|dkr td��|S)zChange the blkio tunables rz$virDomainSetBlkioParameters() failedrO)rZvirDomainSetBlkioParametersrfr)rr�r7r9rrr�setBlkioParameters	
szvirDomain.setBlkioParameterscCs&tj|j|||�}|dkr"td��|S)z+Change the I/O tunables for a block device rz virDomainSetBlockIoTune() failedrO)rZvirDomainSetBlockIoTunerfr)rrr�r7r9rrr�setBlockIoTune
szvirDomain.setBlockIoTunecCs&tj|j|||�}|dkr"td��|S)a�Set the threshold level for delivering the
        VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD if the device or backing chain element
        described by @dev is written beyond the set threshold level. The threshold
        level is unset once the event fires. The event might not be delivered at all
        if libvirtd was not running at the moment when the threshold was reached.
        Note that if the threshold level is reached for a top level image, the event
        is emitted for @dev corresponding to the disk target, and may also be reported
        with @dev corresponding to the disk target with an index corresponding to the
        'index' attribute of 'source' in the live VM XML if the attribute is present.
        
        @dev can either be a disk target name (vda, sda) or disk target with index (
        vda[4]). Without the index the top image in the backing chain will have the
        threshold set. The index corresponds to the 'index' attribute reported in the
        live VM XML for 'backingStore' or 'source' elements of a disk. If index is
        given the threshold is set for the corresponding image.
        
        In case when @dev does not contain index the
        VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD event may be emitted twice, once for the
        disk device target without index and once containing the index.
        
        Note that the threshold event can be registered also for destinations of a
        'virDomainBlockCopy' destination by using the 'index' of the 'mirror' source.
        
        Hypervisors report the last written sector of an image in the bulk stats API
        (virConnectGetAllDomainStats/virDomainListGetStats) as
        "block.<num>.allocation" in the VIR_DOMAIN_STATS_BLOCK group. The current
        threshold value is reported as "block.<num>.threshold".
        
        This event allows to use thin-provisioned storage which needs management
        tools to grow it without the need for polling of the data. rz#virDomainSetBlockThreshold() failedrO)rZvirDomainSetBlockThresholdrfr)r�dev�	thresholdr7r9rrr�setBlockThreshold
szvirDomain.setBlockThresholdcCs&tj|j|||�}|dkr"td��|S)a�Sets state of individual vcpus described by @cpumap via guest agent. Other
        vcpus are not modified.
        
        This API requires the VM to run. Various hypervisors or guest agent
        implementation may limit to operate on just 1 vCPU per call.
        
        @cpumap is a list of vCPU numbers. Its syntax is a comma separated list and
        a special markup using '-' and '^' (ex. '0-4', '0-3,^2'). The '-' denotes
        the range and the '^' denotes exclusive. The expression is sequentially
        evaluated, so "0-15,^8" is identical to "9-14,0-7,15" but not identical to
        "^8,0-15".
        
        Note that OSes (notably Linux) may require vCPU 0 to stay online to support
        low-level features a S3 sleep. rzvirDomainSetGuestVcpus() failedrO)rZvirDomainSetGuestVcpusrfr)rr��stater7r9rrr�
setGuestVcpus?
szvirDomain.setGuestVcpuscCs&tj|j|||�}|dkr"td��|S)z�Dynamically allow changing the IOThread polling related parameters. This function requires privileged access to the hypervisor. rz#virDomainSetIOThreadParams() failedrO)rZvirDomainSetIOThreadParamsrfr)rr�r�r7r9rrr�setIOThreadParamsW
szvirDomain.setIOThreadParamscCs&tj|j|||�}|dkr"td��|S)z5Change the bandwidth tunables for a interface device rz(virDomainSetInterfaceParameters() failedrO)rZvirDomainSetInterfaceParametersrfr)rr�r�r7r9rrr�setInterfaceParameters^
sz virDomain.setInterfaceParameterscCs$tj|j||�}|dkr td��|S)z4Set a launch security secret in the guest's memory. rz(virDomainSetLaunchSecurityState() failedrO)rZvirDomainSetLaunchSecurityStaterfr)rr�r7r9rrr�setLaunchSecurityStatee
sz virDomain.setLaunchSecurityStatecCs&tj|j|||�}|dkr"td��|S)a?Changes the actions of lifecycle events for domain represented as
        <on_$type>$action</on_$type> in the domain XML.
        
        QEMU driver has a limitation that if all lifecycle events are set
        to destroy when the domain is started, it's not possible to change
        any action for running domain. rz$virDomainSetLifecycleAction() failedrO)rZvirDomainSetLifecycleActionrfr)rre�actionr7r9rrr�setLifecycleActionp
szvirDomain.setLifecycleActioncCs"tj|j|�}|dkrtd��|S)a�Dynamically change the maximum amount of physical memory allocated to a
        domain. If domain is None, then this change the amount of memory reserved
        to Domain0 i.e. the domain where the application runs.
        This function may require privileged access to the hypervisor.
        
        This command is hypervisor-specific for whether active, persistent,
        or both configurations are changed; for more control, use
        virDomainSetMemoryFlags(). rzvirDomainSetMaxMemory() failedrO)rZvirDomainSetMaxMemoryrfr)r�memoryr9rrr�setMaxMemory|
s	zvirDomain.setMaxMemorycCs"tj|j|�}|dkrtd��|S)a�Dynamically change the target amount of physical memory allocated to a
        domain. If domain is None, then this change the amount of memory reserved
        to Domain0 i.e. the domain where the application runs.
        This function may require privileged access to the hypervisor.
        
        This command is hypervisor-specific for whether active, persistent,
        or both configurations are changed; for more control, use
        virDomainSetMemoryFlags(). rzvirDomainSetMemory() failedrO)rZvirDomainSetMemoryrfr)rrr9rrr�	setMemory�
s	zvirDomain.setMemorycCs$tj|j||�}|dkr td��|S)aUDynamically change the target amount of physical memory allocated to a
        domain. If domain is None, then this change the amount of memory reserved
        to Domain0 i.e. the domain where the application runs.
        This function may require privileged access to the hypervisor.
        
        @flags may include VIR_DOMAIN_AFFECT_LIVE or VIR_DOMAIN_AFFECT_CONFIG.
        Both flags may be set. If VIR_DOMAIN_AFFECT_LIVE is set, the change affects
        a running domain and will fail if domain is not active.
        If VIR_DOMAIN_AFFECT_CONFIG is set, the change affects persistent state,
        and will fail for transient domains. If neither flag is specified
        (that is, @flags is VIR_DOMAIN_AFFECT_CURRENT), then an inactive domain
        modifies persistent setup, while an active domain is hypervisor-dependent
        on whether just live or both live and persistent state is changed.
        If VIR_DOMAIN_MEM_MAXIMUM is set, the change affects domain's maximum memory
        size rather than current memory size.
        Not all hypervisors can support all flag combinations. rz virDomainSetMemoryFlags() failedrO)rZvirDomainSetMemoryFlagsrfr)rrr7r9rrr�setMemoryFlags�
szvirDomain.setMemoryFlagscCs$tj|j||�}|dkr td��|S)zChange the memory tunables rz%virDomainSetMemoryParameters() failedrO)rZvirDomainSetMemoryParametersrfr)rr�r7r9rrr�setMemoryParameters�
szvirDomain.setMemoryParameterscCs$tj|j||�}|dkr td��|S)aGDynamically change the domain memory balloon driver statistics collection
        period. Use 0 to disable and a positive value to enable.
        
        @flags may include VIR_DOMAIN_AFFECT_LIVE or VIR_DOMAIN_AFFECT_CONFIG.
        Both flags may be set. If VIR_DOMAIN_AFFECT_LIVE is set, the change affects
        a running domain and will fail if domain is not active.
        If VIR_DOMAIN_AFFECT_CONFIG is set, the change affects persistent state,
        and will fail for transient domains. If neither flag is specified
        (that is, @flags is VIR_DOMAIN_AFFECT_CURRENT), then an inactive domain
        modifies persistent setup, while an active domain is hypervisor-dependent
        on whether just live or both live and persistent state is changed.
        
        Not all hypervisors can support all flag combinations. rz&virDomainSetMemoryStatsPeriod() failedrO)rZvirDomainSetMemoryStatsPeriodrfr)rZperiodr7r9rrr�setMemoryStatsPeriod�
szvirDomain.setMemoryStatsPeriodcCs*tj|j|||||�}|dkr&td��|S)a�Sets the appropriate domain element given by @type to the
        value of @metadata.  A @type of VIR_DOMAIN_METADATA_DESCRIPTION
        is free-form text; VIR_DOMAIN_METADATA_TITLE is free-form, but no
        newlines are permitted, and should be short (although the length is
        not enforced). For these two options @key and @uri are irrelevant and
        must be set to None.
        
        For type VIR_DOMAIN_METADATA_ELEMENT @metadata  must be well-formed
        XML belonging to namespace defined by @uri with local name @key.
        
        Passing None for @metadata says to remove that element from the
        domain XML (passing the empty string leaves the element present).
        
        The resulting metadata will be present in virDomainGetXMLDesc(),
        as well as quick access through virDomainGetMetadata().
        
        @flags controls whether the live domain, persistent configuration,
        or both will be modified. rzvirDomainSetMetadata() failedrO)rZvirDomainSetMetadatarfr)rrer��keyr5r7r9rrr�setMetadata�
szvirDomain.setMetadatacCs$tj|j||�}|dkr td��|S)zChange the NUMA tunables rz#virDomainSetNumaParameters() failedrO)rZvirDomainSetNumaParametersrfr)rr�r7r9rrr�setNumaParameters�
szvirDomain.setNumaParameterscCs$tj|j||�}|dkr td��|S)z5Enable or disable the particular list of perf events rzvirDomainSetPerfEvents() failedrO)rZvirDomainSetPerfEventsrfr)rr�r7r9rrr�
setPerfEvents�
szvirDomain.setPerfEventscCs"tj|j|�}|dkrtd��|S)z Change the scheduler parameters rz(virDomainSetSchedulerParameters() failedrO)rZvirDomainSetSchedulerParametersrfr)rr�r9rrr�setSchedulerParameters�
sz virDomain.setSchedulerParameterscCs$tj|j||�}|dkr td��|S)z Change the scheduler parameters rz-virDomainSetSchedulerParametersFlags() failedrO)rZ$virDomainSetSchedulerParametersFlagsrfr)rr�r7r9rrr�setSchedulerParametersFlagssz%virDomain.setSchedulerParametersFlagscCs&tj|j|||�}|dkr"td��|S)acSets the @user password to the value specified by @password.
        If @flags contain VIR_DOMAIN_PASSWORD_ENCRYPTED, the password
        is assumed to be encrypted by the method required by the guest OS.
        
        Please note that some hypervisors may require guest agent to
        be configured and running in order to be able to run this API. rz!virDomainSetUserPassword() failedrO)rZvirDomainSetUserPasswordrfr)rrwZpasswordr7r9rrr�setUserPasswordszvirDomain.setUserPasswordcCs&tj|j|||�}|dkr"td��|S)aFEnables/disables individual vcpus described by @vcpumap in the hypervisor.
        
        Various hypervisor implementations may limit to operate on just 1
        hotpluggable entity (which may contain multiple vCPUs on certain platforms).
        
        Note that OSes and hypervisors may require vCPU 0 to stay online. rzvirDomainSetVcpu() failedrO)rZvirDomainSetVcpurfr)rZvcpumaprr7r9rrr�setVcpuszvirDomain.setVcpucCs"tj|j|�}|dkrtd��|S)a�Dynamically change the number of virtual CPUs used by the domain.
        Note that this call may fail if the underlying virtualization hypervisor
        does not support it or if growing the number is arbitrarily limited.
        This function may require privileged access to the hypervisor.
        
        Note that if this call is executed before the guest has finished booting,
        the guest may fail to process the change.
        
        This command only changes the runtime configuration of the domain,
        so can only be called on an active domain.  It is hypervisor-dependent
        whether it also affects persistent configuration; for more control,
        use virDomainSetVcpusFlags(). rzvirDomainSetVcpus() failedrO)rZvirDomainSetVcpusrfr)r�nvcpusr9rrr�setVcpus$s
zvirDomain.setVcpuscCs$tj|j||�}|dkr td��|S)aPDynamically change the number of virtual CPUs used by the domain.
        Note that this call may fail if the underlying virtualization hypervisor
        does not support it or if growing the number is arbitrarily limited.
        This function may require privileged access to the hypervisor.
        
        @flags may include VIR_DOMAIN_AFFECT_LIVE to affect a running
        domain (which may fail if domain is not active), or
        VIR_DOMAIN_AFFECT_CONFIG to affect the next boot via the XML
        description of the domain.  Both flags may be set.
        If neither flag is specified (that is, @flags is VIR_DOMAIN_AFFECT_CURRENT),
        then an inactive domain modifies persistent setup, while an active domain
        is hypervisor-dependent on whether just live or both live and persistent
        state is changed.
        
        Note that if this call is executed before the guest has finished booting,
        the guest may fail to process the change.
        
        If @flags includes VIR_DOMAIN_VCPU_MAXIMUM, then
        VIR_DOMAIN_AFFECT_LIVE must be clear, and only the maximum virtual
        CPU limit is altered; generally, this value must be less than or
        equal to virConnectGetMaxVcpus().  Otherwise, this call affects the
        current virtual CPU limit, which must be less than or equal to the
        maximum limit. Note that hypervisors may not allow changing the maximum
        vcpu count if processor topology is specified.
        
        If @flags includes VIR_DOMAIN_VCPU_GUEST, then the state of processors is
        modified inside the guest instead of the hypervisor. This flag can only
        be used with live guests and is incompatible with VIR_DOMAIN_VCPU_MAXIMUM.
        The usage of this flag may require a guest agent configured.
        
        Not all hypervisors can support all flag combinations. rzvirDomainSetVcpusFlags() failedrO)rZvirDomainSetVcpusFlagsrfr)rr r7r9rrr�
setVcpusFlags6s zvirDomain.setVcpusFlagscCs tj|j�}|dkrtd��|S)akShutdown a domain, the domain object is still usable thereafter, but
        the domain OS is being stopped. Note that the guest OS may ignore the
        request. Additionally, the hypervisor may check and support the domain
        'on_poweroff' XML setting resulting in a domain that reboots instead of
        shutting down. For guests that react to a shutdown request, the differences
        from virDomainDestroy() are that the guests disk storage will be in a
        stable state rather than having the (virtual) power cord pulled, and
        this command returns as soon as the shutdown request is issued rather
        than blocking until the guest is no longer running.
        
        If the domain is transient and has any snapshot metadata (see
        virDomainSnapshotNum()), then that metadata will automatically
        be deleted when the domain quits. rzvirDomainShutdown() failedrO)rZvirDomainShutdownrfr)rr9rrr�shutdown[szvirDomain.shutdowncCs"tj|j|�}|dkrtd��|S)aNShutdown a domain, the domain object is still usable thereafter but
        the domain OS is being stopped. Note that the guest OS may ignore the
        request. Additionally, the hypervisor may check and support the domain
        'on_poweroff' XML setting resulting in a domain that reboots instead of
        shutting down. For guests that react to a shutdown request, the differences
        from virDomainDestroy() are that the guest's disk storage will be in a
        stable state rather than having the (virtual) power cord pulled, and
        this command returns as soon as the shutdown request is issued rather
        than blocking until the guest is no longer running.
        
        If the domain is transient and has any snapshot metadata (see
        virDomainSnapshotNum()), then that metadata will automatically
        be deleted when the domain quits.
        
        If @flags is set to zero, then the hypervisor will choose the
        method of shutdown it considers best. To have greater control
        pass one or more of the virDomainShutdownFlagValues. The order
        in which the hypervisor tries each shutdown method is undefined,
        and a hypervisor is not required to support all methods.
        
        To use guest agent (VIR_DOMAIN_SHUTDOWN_GUEST_AGENT) the domain XML
        must have <channel> configured. rzvirDomainShutdownFlags() failedrO)rZvirDomainShutdownFlagsrfr)rr7r9rrr�
shutdownFlagsnszvirDomain.shutdownFlagscCs0tj|j||�}|dkr td��t||d�}|S)a6Creates a new snapshot of a domain based on the snapshot xml
        contained in xmlDesc, with a top-level element <domainsnapshot>.
        
        If @flags is 0, the domain can be active, in which case the
        snapshot will be a full system snapshot (capturing both disk state,
        and runtime VM state such as RAM contents), where reverting to the
        snapshot is
        the same as resuming from hibernation (TCP connections may have
        timed out, but everything else picks up where it left off); or
        the domain can be inactive, in which case the snapshot includes
        just the disk state prior to booting.  The newly created snapshot
        becomes current (see virDomainSnapshotCurrent()), and is a child
        of any previous current snapshot.
        
        If @flags includes VIR_DOMAIN_SNAPSHOT_CREATE_VALIDATE, then @xmlDesc
        is validated against the <domainsnapshot> XML schema.
        
        If @flags includes VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE, then this
        is a request to reinstate snapshot metadata that was previously
        captured from virDomainSnapshotGetXMLDesc() before removing that
        metadata, rather than creating a new snapshot.  This can be used to
        recreate a snapshot hierarchy on a destination, then remove it on
        the source, in order to allow migration (since migration normally
        fails if snapshot metadata still remains on the source machine).
        Note that while original creation can omit a number of elements
        from @xmlDesc (and libvirt will supply sane defaults based on the
        domain state at that point in time), a redefinition must supply
        more elements (as the domain may have changed in the meantime, so
        that libvirt no longer has a way to resupply correct
        defaults). When redefining snapshot metadata, the domain's current
        snapshot will not be altered unless the
        VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT flag is also present.  It is an
        error to request the VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT flag
        without VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE.  On some hypervisors,
        redefining an existing snapshot can be used to alter host-specific
        portions of the domain XML to be used during revert (such as
        backing filenames associated with disk devices), but must not alter
        guest-visible layout.  When redefining a snapshot name that does
        not exist, the hypervisor may validate that reverting to the
        snapshot appears to be possible (for example, disk images have
        snapshot contents by the requested name).  Not all hypervisors
        support these flags.
        
        If @flags includes VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA, then the
        domain's disk images are modified according to @xmlDesc, but
        libvirt does not track any metadata (similar to immediately calling
        virDomainSnapshotDelete() with
        VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY).  This flag is
        incompatible with VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE.
        
        If @flags includes VIR_DOMAIN_SNAPSHOT_CREATE_HALT, then the domain
        will be inactive after the snapshot completes, regardless of whether
        it was active before; otherwise, a running domain will still be
        running after the snapshot.  This flag is invalid on transient domains,
        and is incompatible with VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE.
        
        If @flags includes VIR_DOMAIN_SNAPSHOT_CREATE_LIVE, then the domain
        is not paused while creating the snapshot. This increases the size
        of the memory dump file, but reduces downtime of the guest while
        taking the snapshot. Some hypervisors only support this flag during
        external snapshots.
        
        If @flags includes VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY, then the
        snapshot will be limited to the disks described in @xmlDesc, and no
        VM state will be saved.  For an active guest, the disk image may be
        inconsistent (as if power had been pulled), and specifying this
        with the VIR_DOMAIN_SNAPSHOT_CREATE_HALT flag risks data loss.
        
        If @flags includes VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE, then the
        libvirt will attempt to use guest agent to freeze and thaw all
        file systems in use within domain OS. However, if the guest agent
        is not present, an error is thrown. Moreover, this flag requires
        VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY to be passed as well.
        For better control and error recovery users should invoke virDomainFSFreeze
        manually before taking the snapshot and then virDomainFSThaw to restore the
        VM rather than using VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE.
        
        By default, if the snapshot involves external files, and any of the
        destination files already exist as a non-empty regular file, the
        snapshot is rejected to avoid losing contents of those files.
        However, if @flags includes VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT,
        then the destination files must be pre-created manually with
        the correct image format and metadata including backing store path
        (this allows a management app to pre-create files with relative backing
        file names, rather than the default of creating with absolute backing
        file names). Note that only the file specified in the snapshot XML is
        inserted as a snapshot thus setting incorrect metadata in the pre-created
        image may lead to the VM being unable to start or other block jobs may fail.
        
        Be aware that although libvirt prefers to report errors up front with
        no other effect, some hypervisors have certain types of failures where
        the overall command can easily fail even though the guest configuration
        was partially altered (for example, if a disk snapshot request for two
        disks fails on the second disk, but the first disk alteration cannot be
        rolled back).  If this API call fails, it is therefore normally
        necessary to follow up with virDomainGetXMLDesc() and check each disk
        to determine if any partial changes occurred.  However, if @flags
        contains VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC, then libvirt guarantees
        that this command will not alter any disks unless the entire set of
        changes can be done atomically, making failure recovery simpler (note
        that it is still possible to fail after disks have changed, but only
        in the much rarer cases of running out of memory or disk space).
        
        Some hypervisors may prevent this operation if there is a current
        block copy operation; in that case, use virDomainBlockJobAbort()
        to stop the block copy first.
        
        virDomainSnapshotFree should be used to free the resources after the
        snapshot object is no longer needed. Nz#virDomainSnapshotCreateXML() failed)r8)rZvirDomainSnapshotCreateXMLrfr�virDomainSnapshot)rr�r7r9r�rrr�snapshotCreateXML�s
nzvirDomain.snapshotCreateXMLcCs.tj|j|�}|dkrtd��t||d�}|S)z�Get the current snapshot for a domain, if any.
        
        virDomainSnapshotFree should be used to free the resources after the
        snapshot object is no longer needed. Nz!virDomainSnapshotCurrent() failed)r8)rZvirDomainSnapshotCurrentrfrr%)rr7r9r�rrr�snapshotCurrents
zvirDomain.snapshotCurrentcCs"tj|j|�}|dkrtd��|S)z8collect the list of snapshot names for the given domain Nz#virDomainSnapshotListNames() failed)rZvirDomainSnapshotListNamesrfr)rr7r9rrr�snapshotListNamesszvirDomain.snapshotListNamescCs0tj|j||�}|dkr td��t||d�}|S)z3Try to lookup a domain snapshot based on its name. Nz&virDomainSnapshotLookupByName() failed)r8)rZvirDomainSnapshotLookupByNamerfrr%)rr;r7r9r�rrr�snapshotLookupByNames
zvirDomain.snapshotLookupByNamecCs"tj|j|�}|dkrtd��|S)aHProvides the number of domain snapshots for this domain.
        
        This function will accept VIR_DOMAIN_SNAPSHOT_LIST_TOPOLOGICAL in
        @flags only if virDomainSnapshotListNames() can honor it, although
        the flag has no other effect here.
        
        By default, this command covers all snapshots. It is also possible
        to limit things to just snapshots with no parents, when @flags
        includes VIR_DOMAIN_SNAPSHOT_LIST_ROOTS.  Additional filters are
        provided via the same @flags values as documented in
        virDomainListAllSnapshots(). rzvirDomainSnapshotNum() failedrO)rZvirDomainSnapshotNumrfr)rr7r9rrr�snapshotNum$szvirDomain.snapshotNumcCs$tj|j||�}|dkr td��|S)z�Calculate the current domain's memory dirty rate in next @seconds.
        The calculated dirty rate information is available by calling
        virConnectGetAllDomainStats. rz$virDomainStartDirtyRateCalc() failedrO)rZvirDomainStartDirtyRateCalcrfr)rZsecondsr7r9rrr�startDirtyRateCalc9szvirDomain.startDirtyRateCalccCs"tj|j|�}|dkrtd��|S)zExtract domain state. NzvirDomainGetState() failed)rZvirDomainGetStaterfr)rr7r9rrrrFszvirDomain.statecCs tj|j�}|dkrtd��|S)a�Suspends an active domain, the process is frozen without further access
        to CPU resources and I/O but the memory used by the domain at the
        hypervisor level will stay allocated. Use virDomainResume() to reactivate
        the domain.
        This function may require privileged access.
        Moreover, suspend may not be supported if domain is in some
        special state like VIR_DOMAIN_PMSUSPENDED. rzvirDomainSuspend() failedrO)rZvirDomainSuspendrfr)rr9rrr�suspendQszvirDomain.suspendcCs tj|j�}|dkrtd��|S)aUndefine a domain. If the domain is running, it's converted to
        transient domain, without stopping it. If the domain is inactive,
        the domain configuration is removed.
        
        If the domain has a managed save image (see
        virDomainHasManagedSaveImage()), or if it is inactive and has any
        snapshot metadata (see virDomainSnapshotNum()) or checkpoint
        metadata (see virDomainListAllCheckpoints()), then the undefine
        will fail. See virDomainUndefineFlags() for more control. rzvirDomainUndefine() failedrO)rZvirDomainUndefinerfr)rr9rrr�undefine^s
zvirDomain.undefinecCs"tj|j|�}|dkrtd��|S)aSUndefine a domain. If the domain is running, it's converted to
        transient domain, without stopping it. If the domain is inactive,
        the domain configuration is removed.
        
        If the domain has a managed save image (see virDomainHasManagedSaveImage()),
        then including VIR_DOMAIN_UNDEFINE_MANAGED_SAVE in @flags will also remove
        that file, and omitting the flag will cause the undefine process to fail.
        
        If the domain is inactive and has any snapshot metadata (see
        virDomainSnapshotNum()), then including
        VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA in @flags will also remove
        that metadata.  Omitting the flag will cause the undefine of an
        inactive domain with snapshots to fail.  Active domains will retain
        snapshot metadata until the (now-transient) domain halts,
        regardless of whether this flag is present.  On hypervisors that
        support snapshots, but where snapshots do not use libvirt metadata,
        this flag has no effect.
        
        If the domain is inactive and has any checkpoint metadata (see
        virDomainListAllCheckpoints()), then including
        VIR_DOMAIN_UNDEFINE_CHECKPOINTS_METADATA in @flags will also remove
        that metadata. Omitting the flag will cause the undefine of an
        inactive domain with checkpoints to fail. Active domains will
        retain checkpoint metadata until the (now-transient) domain halts,
        regardless of whether this flag is present. On hypervisors that
        support checkpoints, but where checkpoints do not use libvirt
        metadata, this flag has no effect.
        
        If the domain has any nvram specified, the undefine process will fail
        unless VIR_DOMAIN_UNDEFINE_KEEP_NVRAM is specified, or if
        VIR_DOMAIN_UNDEFINE_NVRAM is specified to remove the nvram file. rzvirDomainUndefineFlags() failedrO)rZvirDomainUndefineFlagsrfr)rr7r9rrr�
undefineFlagsms zvirDomain.undefineFlagscCs$tj|j||�}|dkr td��|S)a�Change a virtual device on a domain, using the flags parameter
        to control how the device is changed.  VIR_DOMAIN_AFFECT_CURRENT
        specifies that the device change is made based on current domain
        state.  VIR_DOMAIN_AFFECT_LIVE specifies that the device shall be
        changed on the active domain instance only and is not added to the
        persisted domain configuration. VIR_DOMAIN_AFFECT_CONFIG
        specifies that the device shall be changed on the persisted domain
        configuration only.  Note that the target hypervisor must return an
        error if unable to satisfy flags.  E.g. the hypervisor driver will
        return failure if LIVE is specified but it only supports modifying the
        persisted device allocation.
        
        This method is used for actions such changing CDROM/Floppy device
        media, altering the graphics configuration such as password,
        reconfiguring the NIC device backend connectivity, etc.
        
        The supplied XML description of the device should contain all
        the information that is found in the corresponding domain XML.
        Leaving out any piece of information may be treated as a
        request for its removal, which may be denied. For instance,
        when users want to change CDROM media only for live XML, they
        must provide live disk XML as found in the corresponding live
        domain XML with only the disk path changed. rz#virDomainUpdateDeviceFlags() failedrO)rZvirDomainUpdateDeviceFlagsrfr)rrtr7r9rrr�updateDeviceFlags�szvirDomain.updateDeviceFlagscCs"tj|j|�}|dkrtd��|S)z=Query the CPU affinity setting of all virtual CPUs of domain Nz virDomainGetVcpuPinInfo() failed)rZvirDomainGetVcpuPinInforfr)rr7r9rrr�vcpuPinInfo�szvirDomain.vcpuPinInfocCs tj|j�}|dkrtd��|S)z^Extract information about virtual CPUs of domain, store it in info array and also in cpumaps. NzvirDomainGetVcpus() failed)rZvirDomainGetVcpusrfr)rr9rrr�vcpus�szvirDomain.vcpuscCs"tj|j|�}|dkrtd��|S)anQuery the number of virtual CPUs used by the domain.  Note that
        this call may fail if the underlying virtualization hypervisor does
        not support it.  This function may require privileged access to the
        hypervisor.
        
        If @flags includes VIR_DOMAIN_AFFECT_LIVE, this will query a
        running domain (which will fail if domain is not active); if
        it includes VIR_DOMAIN_AFFECT_CONFIG, this will query the XML
        description of the domain.  It is an error to set both flags.
        If neither flag is set (that is, VIR_DOMAIN_AFFECT_CURRENT),
        then the configuration queried depends on whether the domain
        is currently running.
        
        If @flags includes VIR_DOMAIN_VCPU_MAXIMUM, then the maximum
        virtual CPU limit is queried.  Otherwise, this call queries the
        current virtual CPU count.
        
        If @flags includes VIR_DOMAIN_VCPU_GUEST, then the state of the processors
        is queried in the guest instead of the hypervisor. This flag is only usable
        on live domains. Guest agent may be needed for this flag to be available. rzvirDomainGetVcpusFlags() failedrO)rZvirDomainGetVcpusFlagsrfr)rr7r9rrr�
vcpusFlags�szvirDomain.vcpusFlagsr%)r7rcs0tj�j|�}|dkrtd���fdd�|D�S)z9List all snapshots and returns a list of snapshot objectsNz"virDomainListAllSnapshots() failedcsg|]}t�|d��qS))r8)r%)�.0�snapptr)rrr�
<listcomp>�sz.virDomain.listAllSnapshots.<locals>.<listcomp>)rZvirDomainListAllSnapshotsrfr)rr7r9r)rr�listAllSnapshots�szvirDomain.listAllSnapshotsr�cs0tj�j|�}|dkrtd���fdd�|D�S)z=List all checkpoints and returns a list of checkpoint objectsNz$virDomainListAllCheckpoints() failedcsg|]}t�|d��qS))r8)r�)r3�chkptr)rrrr5�sz0virDomain.listAllCheckpoints.<locals>.<listcomp>)rZvirDomainListAllCheckpointsrfr)rr7r9r)rr�listAllCheckpoints�szvirDomain.listAllCheckpoints)�filesr7rcCs$tj|j||�}|dkr td��|S)aLaunch a defined domain. If the call succeeds the domain moves from the
        defined to the running domains pools.

        @files provides an array of file descriptors which will be
        made available to the 'init' process of the guest. The file
        handles exposed to the guest will be renumbered to start
        from 3 (ie immediately following stderr). This is only
        supported for guests which use container based virtualization
        technology.

        If the VIR_DOMAIN_START_PAUSED flag is set, or if the guest domain
        has a managed save image that requested paused state (see
        virDomainManagedSave()) the guest domain will be started, but its
        CPUs will remain paused. The CPUs can later be manually started
        using virDomainResume().  In all other cases, the guest domain will
        be running.

        If the VIR_DOMAIN_START_AUTODESTROY flag is set, the guest
        domain will be automatically destroyed when the virConnectPtr
        object is finally released. This will also happen if the
        client application crashes / loses its connection to the
        libvirtd daemon. Any domains marked for auto destroy will
        block attempts at migration, save-to-file, or snapshots.

        If the VIR_DOMAIN_START_BYPASS_CACHE flag is set, and there is a
        managed save file for this domain (created by virDomainManagedSave()),
        then libvirt will attempt to bypass the file system cache while restoring
        the file, or fail if it cannot do so for the given system; this can allow
        less pressure on file system cache, but also risks slowing loads from NFS.

        If the VIR_DOMAIN_START_FORCE_BOOT flag is set, then any managed save
        file for this domain is discarded, and the domain boots from scratch. rz!virDomainCreateWithFiles() failedrO)rZvirDomainCreateWithFilesrfr)rr9r7r9rrr�createWithFiles�s!zvirDomain.createWithFiles)�mountpointsr7rcCs$tj|j||�}|dkr td��|S)z.Freeze specified filesystems within the guest rzvirDomainFSFreeze() failedrO)rZvirDomainFSFreezerfr)rr;r7r9rrr�fsFreeze
szvirDomain.fsFreezecCs$tj|j||�}|dkr td��|S)z,Thaw specified filesystems within the guest rzvirDomainFSThaw() failedrO)rZvirDomainFSThawrfr)rr;r7r9rrr�fsThaw
szvirDomain.fsThawcCs"tj|j|�}|dkrtd��|S)z%Extract information about guest time NzvirDomainGetTime() failed)rZvirDomainGetTimerfr)rr7r9rrr�getTime&
szvirDomain.getTime)�timer7rcCs$tj|j||�}|dkr td��|S)z�Set guest time to the given value. @time is a dict containing
        'seconds' field for seconds and 'nseconds' field for nanoseconds rzvirDomainSetTime() failedrO)rZvirDomainSetTimerfr)rr?r7r9rrr�setTime-
szvirDomain.setTime)N)r)r)r)r)r)Nr)r)r)r)rr)Nr)r)r)r)r)r)r)rr)rr)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)rr)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)rNNr)NrNNr)r)r)r)r)r)r)r)r)rNr)NNNrNr)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)Nr)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)Nr)Nr)r)Nr)�r-r.r/rrhrirjrkrlrmrnrorprrrsrurvrxrzr{r|r}r~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r;r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrr
rr
rrrrrrrrrrrrrrrr!r"r#r$r&r'r(r)r*r+rr,r-r.r/r0r1r2r1rr6r8r:r0r<r=r>r@rrrrrsL
=c,%i)
 
4
		
	=	
'$% t

%!   &  c@s�eZdZd1dd�Zdd�Zdd�Zdd	�Zd2dd�Zd
d�Zdd�Z	d3dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd �Zd4d!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd5d+d,�Zd6eed-d.�d/d0�ZdS)7�
virNetworkNcCs.||_t|�jdkr$tdt|���||_dS)Nrbrcz&Expected a wrapped C Object but got %s)rbrc)rdrer-rrf)rrgr8rrrr6
szvirNetwork.__init__cCs |jdk	rtj|j�d|_dS)N)rfrZvirNetworkFree)rrrrrh<
s
zvirNetwork.__del__cCs|jS)N)rd)rrrrriA
szvirNetwork.connectcCstj|j�S)z"Get C pointer to underlying object)rZvirNetwork_pointerrf)rrrrrjD
szvirNetwork.c_pointerrcCs$tj|j||�}|dkr td��|S)zTReturns a list of dhcp leases for interfaces connected to the given virtual network Nz virNetworkGetDHCPLeases() failed)rZvirNetworkGetDHCPLeasesrfr)rZmacr7r9rrr�
DHCPLeasesL
szvirNetwork.DHCPLeasescCs tj|j�}|dkrtd��|S)z1Extract the UUID unique Identifier of a network. NzvirNetworkGetUUID() failed)rZvirNetworkGetUUIDrfr)rr9rrrrmS
szvirNetwork.UUIDcCs tj|j�}|dkrtd��|S)z5Fetch globally unique ID of the network as a string. Nz virNetworkGetUUIDString() failed)rZvirNetworkGetUUIDStringrfr)rr9rrrrnZ
szvirNetwork.UUIDStringcCs"tj|j|�}|dkrtd��|S)a�Provide an XML description of the network. The description may be reused
        later to relaunch the network with virNetworkCreateXML().
        
        Normally, if a network included a physical function, the output includes
        all virtual functions tied to that physical interface.  If @flags includes
        VIR_NETWORK_XML_INACTIVE, then the expansion of virtual interfaces is
        not performed. NzvirNetworkGetXMLDesc() failed)rZvirNetworkGetXMLDescrfr)rr7r9rrrroe
szvirNetwork.XMLDesccCs tj|j�}|dkrtd��|S)z*Extract the autostart flag for a network. rzvirNetworkGetAutostart() failedrO)rZvirNetworkGetAutostartrfr)rr9rrrr{v
szvirNetwork.autostartcCs tj|j�}|dkrtd��|S)zyProvides a bridge interface name to which a domain may connect
        a network interface in order to join the network. Nz virNetworkGetBridgeName() failed)rZvirNetworkGetBridgeNamerfr)rr9rrr�
bridgeName�
szvirNetwork.bridgeNamecCs tj|j�}|dkrtd��|S)z�Create and start a defined network. If the call succeed the network
        moves from the defined to the running networks pools. rzvirNetworkCreate() failedrO)rZvirNetworkCreaterfr)rr9rrrr��
szvirNetwork.createcCs tj|j�}|dkrtd��|S)aDestroy the network object. The running instance is shutdown if not down
        already and all resources used by it are given back to the hypervisor. This
        does not free the associated virNetworkPtr object.
        This function may require privileged access rzvirNetworkDestroy() failedrO)rZvirNetworkDestroyrfr)rr9rrrr��
szvirNetwork.destroycCs tj|j�}|dkrtd��|S)z.Determine if the network is currently running rzvirNetworkIsActive() failedrO)rZvirNetworkIsActiverfr)rr9rrrr��
szvirNetwork.isActivecCs tj|j�}|dkrtd��|S)ztDetermine if the network has a persistent configuration
        which means it will still exist after shutting down rzvirNetworkIsPersistent() failedrO)rZvirNetworkIsPersistentrfr)rr9rrrr��
szvirNetwork.isPersistentcCstj|j�}|S)z%Get the public name for that network )rZvirNetworkGetNamerf)rr9rrrr;�
szvirNetwork.namecCs0tj|j||�}|dkr td��t||d�}|S)z�Create a new network port, based on an XML description
        similar to the one returned by virNetworkPortGetXMLDesc()
        
        virNetworkPortFree should be used to free the resources after the
        network port object is no longer needed. Nz virNetworkPortCreateXML() failed)r8)rZvirNetworkPortCreateXMLrfr�virNetworkPort)rZxmldescr7r9�_virNetwork__tmprrr�
portCreateXML�
s
zvirNetwork.portCreateXMLcCs.tj|j|�}|dkrtd��t||d�}|S)z=Try to lookup a port on the given network based on its UUID. Nz#virNetworkPortLookupByUUID() failed)r8)rZvirNetworkPortLookupByUUIDrfrrD)r�uuidr9rErrr�portLookupByUUID�
s
zvirNetwork.portLookupByUUIDcCs.tj|j|�}|dkrtd��t||d�}|S)z=Try to lookup a port on the given network based on its UUID. Nz)virNetworkPortLookupByUUIDString() failed)r8)rZ virNetworkPortLookupByUUIDStringrfrrD)r�uuidstrr9rErrr�portLookupByUUIDString�
s
z!virNetwork.portLookupByUUIDStringcCs"tj|j|�}|dkrtd��|S)zWConfigure the network to be automatically started
        when the host machine boots. rzvirNetworkSetAutostart() failedrO)rZvirNetworkSetAutostartrfr)rr{r9rrrr�
szvirNetwork.setAutostartcCs tj|j�}|dkrtd��|S)z9Undefine a network but does not stop it if it is running rzvirNetworkUndefine() failedrO)rZvirNetworkUndefinerfr)rr9rrrr-�
szvirNetwork.undefinecCs*tj|j|||||�}|dkr&td��|S)z|Update the definition of an existing network, either its live
        running state, its persistent configuration, or both. rzvirNetworkUpdate() failedrO)rZvirNetworkUpdaterfr)rZcommandZsectionZparentIndexrtr7r9rrr�update�
szvirNetwork.updaterD)r7rcs0tj�j|�}|dkrtd���fdd�|D�S)zHList all ports on the network and returns a list of network port objectsNzvirNetworkListAllPorts() failedcsg|]}t�|d��qS))r8)rD)r3�domptr)rrrr5�
sz+virNetwork.listAllPorts.<locals>.<listcomp>)rZvirNetworkListAllPortsrfr)rr7r9r)rr�listAllPorts�
szvirNetwork.listAllPorts)N)Nr)r)r)r)r)r-r.r/rrhrirjrBrmrnror{rCr�r�r�r�r;rFrHrJrr-rKr1rrMrrrrrA5
s,





rAc@steZdZddd�dd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	ddd�Z
ddd�Zddd�Zddd�Z
dS)rDN)rcCs8||_|j�|_t|�jdkr.tdt|���||_dS)Nrbrcz&Expected a wrapped C Object but got %s)rbrc)�_netrirdrer-rrf)r�netr8rrrr�
s

zvirNetworkPort.__init__cCs |jdk	rtj|j�d|_dS)N)rfrZvirNetworkPortFree)rrrrrh�
s
zvirNetworkPort.__del__cCs|jS)N)rd)rrrrriszvirNetworkPort.connectcCs|jS)N)rN)rrrr�networkszvirNetworkPort.networkcCstj|j�S)z"Get C pointer to underlying object)rZvirNetworkPort_pointerrf)rrrrrjszvirNetworkPort.c_pointercCs tj|j�}|dkrtd��|S)z6Extract the UUID unique Identifier of a network port. NzvirNetworkPortGetUUID() failed)rZvirNetworkPortGetUUIDrfr)rr9rrrrmszvirNetworkPort.UUIDcCs tj|j�}|dkrtd��|S)z:Fetch globally unique ID of the network port as a string. Nz$virNetworkPortGetUUIDString() failed)rZvirNetworkPortGetUUIDStringrfr)rr9rrrrnszvirNetworkPort.UUIDStringrcCs"tj|j|�}|dkrtd��|S)z�Provide an XML description of the network port. The description may be reused
        later to recreate the port with virNetworkPortCreateXML(). Nz!virNetworkPortGetXMLDesc() failed)rZvirNetworkPortGetXMLDescrfr)rr7r9rrrro"szvirNetworkPort.XMLDesccCs"tj|j|�}|dkrtd��|S)z�Delete the network port. This does not free the
        associated virNetworkPortPtr object. It is the
        caller's responsibility to ensure the port is not
        still in use by a virtual machine before deleting
        port. rzvirNetworkPortDelete() failedrO)rZvirNetworkPortDeleterfr)rr7r9rrr�delete*szvirNetworkPort.deletecCs"tj|j|�}|dkrtd��|S)zGet the port parameters Nz$virNetworkPortGetParameters() failed)rZvirNetworkPortGetParametersrfr)rr7r9rrr�
parameters9szvirNetworkPort.parameterscCs$tj|j||�}|dkr td��|S)zChange the port tunables rz$virNetworkPortSetParameters() failedrO)rZvirNetworkPortSetParametersrfr)rr�r7r9rrr�
setParameters@szvirNetworkPort.setParameters)N)r)r)r)r)r-r.r/rrhrirPrjrmrnrorQrRrSrrrrrD�
s


rDc@sleZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
d�Zddd�Z	ddd�Z
dd�Zdd�Zdd�Z
dS)�virInterfaceNcCs.||_t|�jdkr$tdt|���||_dS)Nrbrcz&Expected a wrapped C Object but got %s)rbrc)rdrer-rrf)rrgr8rrrrHszvirInterface.__init__cCs |jdk	rtj|j�d|_dS)N)rfrZvirInterfaceFree)rrrrrhNs
zvirInterface.__del__cCs|jS)N)rd)rrrrriSszvirInterface.connectcCstj|j�S)z"Get C pointer to underlying object)rZvirInterface_pointerrf)rrrrrjVszvirInterface.c_pointercCs tj|j�}|dkrtd��|S)z\Get the MAC for an interface as string. For more information about
        MAC see RFC4122. Nz!virInterfaceGetMACString() failed)rZvirInterfaceGetMACStringrfr)rr9rrr�	MACString^szvirInterface.MACStringrcCs"tj|j|�}|dkrtd��|S)a@VIR_INTERFACE_XML_INACTIVE - return the static configuration,
                                          suitable for use redefining the
                                          interface via virInterfaceDefineXML()
        
        Provide an XML description of the interface. If
        VIR_INTERFACE_XML_INACTIVE is set, the description may be reused
        later to redefine the interface with virInterfaceDefineXML(). If it
        is not set, the ip address and netmask will be the current live
        setting of the interface, not the settings from the config files. NzvirInterfaceGetXMLDesc() failed)rZvirInterfaceGetXMLDescrfr)rr7r9rrrrofs
zvirInterface.XMLDesccCs"tj|j|�}|dkrtd��|S)aKActivate an interface (i.e. call "ifup").
        
        If there was an open network config transaction at the time this
        interface was defined (that is, if virInterfaceChangeBegin() had
        been called), the interface will be brought back down (and then
        undefined) if virInterfaceChangeRollback() is called. rzvirInterfaceCreate() failedrO)rZvirInterfaceCreaterfr)rr7r9rrrr�uszvirInterface.createcCs"tj|j|�}|dkrtd��|S)adeactivate an interface (ie call "ifdown")
        This does not remove the interface from the config, and
        does not free the associated virInterfacePtr object.
        
        If there is an open network config transaction at the time this
        interface is destroyed (that is, if virInterfaceChangeBegin() had
        been called), and if the interface is later undefined and then
        virInterfaceChangeRollback() is called, the restoral of the
        interface definition will also bring the interface back up. rzvirInterfaceDestroy() failedrO)rZvirInterfaceDestroyrfr)rr7r9rrrr��s
zvirInterface.destroycCs tj|j�}|dkrtd��|S)z0Determine if the interface is currently running rzvirInterfaceIsActive() failedrO)rZvirInterfaceIsActiverfr)rr9rrrr��szvirInterface.isActivecCstj|j�}|S)z'Get the public name for that interface )rZvirInterfaceGetNamerf)rr9rrrr;�szvirInterface.namecCs tj|j�}|dkrtd��|S)a�Undefine an interface, ie remove it from the config.
        This does not free the associated virInterfacePtr object.
        
        Normally this change in the interface configuration is
        permanent/persistent, but if virInterfaceChangeBegin() has been
        previously called (i.e. if an interface config transaction is
        open), the removal of the interface definition will only become
        permanent if virInterfaceChangeCommit() is called prior to the next
        reboot of the system running libvirtd. Prior to that time, the
        definition can be explicitly restored using
        virInterfaceChangeRollback(), or will be automatically restored
        during the next reboot of the system running libvirtd. rzvirInterfaceUndefine() failedrO)rZvirInterfaceUndefinerfr)rr9rrrr-�s
zvirInterface.undefine)N)r)r)r)r-r.r/rrhrirjrUror�r�r�r;r-rrrrrTGs



rTc@s�eZdZd7dd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zd8dd�Z	dd�Z
d9dd�Zd:dd�Zd;dd�Z
d<dd�Zd=dd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd>d+d,�Zd-d.�Zd/d0�Zd1d2�Zd?eed3d4�d5d6�ZdS)@�virStoragePoolNcCs.||_t|�jdkr$tdt|���||_dS)Nrbrcz&Expected a wrapped C Object but got %s)rbrc)rdrer-rrf)rrgr8rrrr�szvirStoragePool.__init__cCs |jdk	rtj|j�d|_dS)N)rfrZvirStoragePoolFree)rrrrrh�s
zvirStoragePool.__del__cCs|jS)N)rd)rrrrri�szvirStoragePool.connectcCstj|j�S)z"Get C pointer to underlying object)rZvirStoragePool_pointerrf)rrrrrj�szvirStoragePool.c_pointercCs tj|j�}|dkrtd��|S)z6Extract the UUID unique Identifier of a storage pool. NzvirStoragePoolGetUUID() failed)rZvirStoragePoolGetUUIDrfr)rr9rrrrm�szvirStoragePool.UUIDcCs tj|j�}|dkrtd��|S)z:Fetch globally unique ID of the storage pool as a string. Nz$virStoragePoolGetUUIDString() failed)rZvirStoragePoolGetUUIDStringrfr)rr9rrrrn�szvirStoragePool.UUIDStringrcCs"tj|j|�}|dkrtd��|S)z�Fetch an XML document describing all aspects of the
        storage pool. This is suitable for later feeding back
        into the virStoragePoolCreateXML method. Nz!virStoragePoolGetXMLDesc() failed)rZvirStoragePoolGetXMLDescrfr)rr7r9rrrro�szvirStoragePool.XMLDesccCs tj|j�}|dkrtd��|S)z.Extract the autostart flag for a storage pool rz#virStoragePoolGetAutostart() failedrO)rZvirStoragePoolGetAutostartrfr)rr9rrrr{�szvirStoragePool.autostartcCs"tj|j|�}|dkrtd��|S)z�Currently only filesystem pool accepts flags VIR_STORAGE_POOL_BUILD_OVERWRITE
        and VIR_STORAGE_POOL_BUILD_NO_OVERWRITE.
        
        Build the underlying storage pool rzvirStoragePoolBuild() failedrO)rZvirStoragePoolBuildrfr)rr7r9rrr�build�szvirStoragePool.buildcCs"tj|j|�}|dkrtd��|S)z Starts an inactive storage pool rzvirStoragePoolCreate() failedrO)rZvirStoragePoolCreaterfr)rr7r9rrrr��szvirStoragePool.createcCs2tj|j||�}|dkr td��t|j|d�}|S)a�Create a storage volume within a pool based
        on an XML description. Not all pools support
        creation of volumes.
        
        Since 1.0.1 VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA
        in flags can be used to get higher performance with
        qcow2 image files which don't support full preallocation,
        by creating a sparse image file with metadata.
        
        virStorageVolFree should be used to free the resources after the
        storage volume object is no longer needed. NzvirStorageVolCreateXML() failed)r8)rZvirStorageVolCreateXMLrfr�
virStorageVolrd)rr�r7r9�_virStoragePool__tmprrr�	createXMLs
zvirStoragePool.createXMLcCsH|dkrd}n|j}tj|j|||�}|dkr6td��t|j|d�}|S)aICreate a storage volume in the parent pool, using the
        'clonevol' volume as input. Information for the new
        volume (name, perms)  are passed via a typical volume
        XML description.
        
        Since 1.0.1 VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA
        in flags can be used to get higher performance with
        qcow2 image files which don't support full preallocation,
        by creating a sparse image file with metadata.
        
        virStorageVolFree should be used to free the resources after the
        storage volume object is no longer needed. Nz#virStorageVolCreateXMLFrom() failed)r8)rfrZvirStorageVolCreateXMLFromrrXrd)rr�Zclonevolr7Zclonevol__or9rYrrr�
createXMLFroms
zvirStoragePool.createXMLFromcCs"tj|j|�}|dkrtd��|S)z�Delete the underlying pool resources. This is
        a non-recoverable operation. The virStoragePoolPtr object
        itself is not free'd. rzvirStoragePoolDelete() failedrO)rZvirStoragePoolDeleterfr)rr7r9rrrrQ)szvirStoragePool.deletecCs tj|j�}|dkrtd��|S)a/Destroy an active storage pool. This will deactivate the
        pool on the host, but keep any persistent config associated
        with it. If it has a persistent config it can later be
        restarted with virStoragePoolCreate(). This does not free
        the associated virStoragePoolPtr object. rzvirStoragePoolDestroy() failedrO)rZvirStoragePoolDestroyrfr)rr9rrrr�2szvirStoragePool.destroycCs tj|j�}|dkrtd��|S)z�Extract information about a storage pool. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted. NzvirStoragePoolGetInfo() failed)rZvirStoragePoolGetInforfr)rr9rrrr�AszvirStoragePool.infocCs tj|j�}|dkrtd��|S)z3Determine if the storage pool is currently running rzvirStoragePoolIsActive() failedrO)rZvirStoragePoolIsActiverfr)rr9rrrr�LszvirStoragePool.isActivecCs tj|j�}|dkrtd��|S)zyDetermine if the storage pool has a persistent configuration
        which means it will still exist after shutting down rz#virStoragePoolIsPersistent() failedrO)rZvirStoragePoolIsPersistentrfr)rr9rrrr�SszvirStoragePool.isPersistentcCs tj|j�}|dkrtd��|S)zElist the storage volumes, stores the pointers to the names in @names Nz"virStoragePoolListVolumes() failed)rZvirStoragePoolListVolumesrfr)rr9rrr�listVolumes_szvirStoragePool.listVolumescCstj|j�}|S)z2Fetch the locally unique name of the storage pool )rZvirStoragePoolGetNamerf)rr9rrrr;jszvirStoragePool.namecCs tj|j�}|dkrtd��|S)z2Fetch the number of storage volumes within a pool rz#virStoragePoolNumOfVolumes() failedrO)rZvirStoragePoolNumOfVolumesrfr)rr9rrr�numOfVolumesoszvirStoragePool.numOfVolumescCs"tj|j|�}|dkrtd��|S)z�Request that the pool refresh its list of volumes. This may
        involve communicating with a remote server, and/or initializing
        new devices at the OS layer rzvirStoragePoolRefresh() failedrO)rZvirStoragePoolRefreshrfr)rr7r9rrr�refreshvszvirStoragePool.refreshcCs"tj|j|�}|dkrtd��|S)z\Configure the storage pool to be automatically started
        when the host machine boots. rz#virStoragePoolSetAutostart() failedrO)rZvirStoragePoolSetAutostartrfr)rr{r9rrrrszvirStoragePool.setAutostartcCs0tj|j|�}|dkrtd��t|j|d�}|S)z�Fetch a pointer to a storage volume based on its name
        within a pool
        
        virStorageVolFree should be used to free the resources after the
        storage volume object is no longer needed. Nz"virStorageVolLookupByName() failed)r8)rZvirStorageVolLookupByNamerfrrXrd)rr;r9rYrrr�storageVolLookupByName�s
z%virStoragePool.storageVolLookupByNamecCs tj|j�}|dkrtd��|S)z"Undefine an inactive storage pool rzvirStoragePoolUndefine() failedrO)rZvirStoragePoolUndefinerfr)rr9rrrr-�szvirStoragePool.undefinerX)r7rcs0tj�j|�}|dkrtd���fdd�|D�S)zEList all storage volumes and returns a list of storage volume objectsNz%virStoragePoolListAllVolumes() failedcsg|]}t�j|d��qS))r8)rXrd)r3Zvolptr)rrrr5�sz1virStoragePool.listAllVolumes.<locals>.<listcomp>)rZvirStoragePoolListAllVolumesrfr)rr7r9r)rr�listAllVolumes�szvirStoragePool.listAllVolumes)N)r)r)r)r)r)r)r)r)r-r.r/rrhrirjrmrnror{rWr�rZr[rQr�r�r�r�r\r;r]r^rr_r-r1rr`rrrrrV�s2








	
	
rVc@s�eZdZdZd&dd�Zdd�Zdd�Zd	d
�Zd'dd
�Zd(dd�Z	d)dd�Z
dd�Zd*dd�Zdd�Z
dd�Zdd�Zd+dd�Zdd�Zd,d d!�Zd-d"d#�Zd.d$d%�ZdS)/rXi�NcCs.||_t|�jdkr$tdt|���||_dS)Nrbrcz&Expected a wrapped C Object but got %s)rbrc)rdrer-rrf)rrgr8rrrr�szvirStorageVol.__init__cCs |jdk	rtj|j�d|_dS)N)rfrZvirStorageVolFree)rrrrrh�s
zvirStorageVol.__del__cCs|jS)N)rd)rrrrri�szvirStorageVol.connectcCstj|j�S)z"Get C pointer to underlying object)rZvirStorageVol_pointerrf)rrrrrj�szvirStorageVol.c_pointerrcCs"tj|j|�}|dkrtd��|S)zKFetch an XML document describing all aspects of
        the storage volume Nz virStorageVolGetXMLDesc() failed)rZvirStorageVolGetXMLDescrfr)rr7r9rrrro�szvirStorageVol.XMLDesccCs"tj|j|�}|dkrtd��|S)z(Delete the storage volume from the pool rzvirStorageVolDelete() failedrO)rZvirStorageVolDeleterfr)rr7r9rrrrQ�szvirStorageVol.deletecCs<|dkrd}n|j}tj|j||||�}|dkr8td��|S)a'Download the content of the volume as a stream. If @length
        is zero, then the remaining contents of the volume after
        @offset will be downloaded. Please note that the stream
        transports the volume itself as is, so the downloaded data may
        not correspond to guest OS visible state in cases when a
        complex storage format such as qcow2 or vmdk is used.
        
        If VIR_STORAGE_VOL_DOWNLOAD_SPARSE_STREAM is set in @flags
        effective transmission of holes is enabled. This assumes using
        the @stream with combination of virStreamSparseRecvAll() or
        virStreamRecvFlags(stream, ..., flags =
        VIR_STREAM_RECV_STOP_AT_HOLE) for honouring holes sent by
        server.
        
        This call sets up an asynchronous stream; subsequent use of
        stream APIs is necessary to transfer the actual data,
        determine how much data is successfully transferred, and
        detect any errors. The results will be unpredictable if
        another active stream is writing to the storage volume. NrzvirStorageVolDownload() failedrO)rfrZvirStorageVolDownloadr)rr�r��lengthr7r�r9rrr�download�szvirStorageVol.downloadcCs tj|j�}|dkrtd��|S)z�Extract information about a storage volume. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted. NzvirStorageVolGetInfo() failed)rZvirStorageVolGetInforfr)rr9rrrr��szvirStorageVol.infocCs"tj|j|�}|dkrtd��|S)z�Extract information about a storage volume. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted. Nz"virStorageVolGetInfoFlags() failed)rZvirStorageVolGetInfoFlagsrfr)rr7r9rrr�	infoFlags�szvirStorageVol.infoFlagscCs tj|j�}|dkrtd��|S)z�Fetch the storage volume key. This is globally
        unique, so the same volume will have the same
        key no matter what host it is accessed from NzvirStorageVolGetKey() failed)rZvirStorageVolGetKeyrfr)rr9rrrrszvirStorageVol.keycCstj|j�}|S)zQFetch the storage volume name. This is unique
        within the scope of a pool )rZvirStorageVolGetNamerf)rr9rrrr;
szvirStorageVol.namecCs tj|j�}|dkrtd��|S)aFetch the storage volume path. Depending on the pool
        configuration this is either persistent across hosts,
        or dynamically assigned at pool startup. Consult
        pool documentation for information on getting the
        persistent naming NzvirStorageVolGetPath() failed)rZvirStorageVolGetPathrfr)rr9rrrr�szvirStorageVol.pathcCs$tj|j||�}|dkr td��|S)aXChanges the capacity of the storage volume @vol to @capacity. The
        operation will fail if the new capacity requires allocation that would
        exceed the remaining free space in the parent pool.  The contents of
        the new capacity will appear as all zero bytes. The capacity value will
        be rounded to the granularity supported by the hypervisor.
        
        Normally, the operation will attempt to affect capacity with a minimum
        impact on allocation (that is, the default operation favors a sparse
        resize).  If @flags contains VIR_STORAGE_VOL_RESIZE_ALLOCATE, then the
        operation will ensure that allocation is sufficient for the new
        capacity; this may make the operation take noticeably longer.
        
        Normally, the operation treats @capacity as the new size in bytes;
        but if @flags contains VIR_STORAGE_VOL_RESIZE_DELTA, then @capacity
        represents the size difference to add to the current size.  It is
        up to the storage pool implementation whether unaligned requests are
        rounded up to the next valid boundary, or rejected.
        
        Normally, this operation should only be used to enlarge capacity;
        but if @flags contains VIR_STORAGE_VOL_RESIZE_SHRINK, it is possible to
        attempt a reduction in capacity even though it might cause data loss.
        If VIR_STORAGE_VOL_RESIZE_DELTA is also present, then @capacity is
        subtracted from the current size; without it, @capacity represents
        the absolute new size regardless of whether it is larger or smaller
        than the current size. rzvirStorageVolResize() failedrO)rZvirStorageVolResizerfr)rZcapacityr7r9rrr�resizeszvirStorageVol.resizecCs.tj|j�}|dkrtd��t|j|d�}|S)z�Fetch a storage pool which contains a particular volume
        
        virStoragePoolFree should be used to free the resources after the
        storage pool object is no longer needed. Nz%virStoragePoolLookupByVolume() failed)r8)rZvirStoragePoolLookupByVolumerfrrVrd)rr9Z_virStorageVol__tmprrr�storagePoolLookupByVolume=s
z'virStorageVol.storagePoolLookupByVolumecCs<|dkrd}n|j}tj|j||||�}|dkr8td��|S)apUpload new content to the volume from a stream. This call
        will fail if @offset + @length exceeds the size of the
        volume. Otherwise, if @length is non-zero, an error
        will be raised if an attempt is made to upload greater
        than @length bytes of data. Please note that the stream
        transports the volume itself as is, so the downloaded data may
        not correspond to guest OS visible state in cases when a
        complex storage format such as qcow2 or vmdk is used.
        
        If VIR_STORAGE_VOL_UPLOAD_SPARSE_STREAM is set in @flags
        effective transmission of holes is enabled. This assumes using
        the @stream with combination of virStreamSparseSendAll() or
        virStreamSendHole() to preserve source file sparseness.
        
        This call sets up an asynchronous stream; subsequent use of
        stream APIs is necessary to transfer the actual data,
        determine how much data is successfully transferred, and
        detect any errors. The results will be unpredictable if
        another active stream is writing to the storage volume.
        
        When the data stream is closed whether the upload is successful
        or not an attempt will be made to refresh the target storage pool
        if an asynchronous build is not running in order to reflect pool
        and volume changes as a result of the upload. Depending on
        the target volume storage backend and the source stream type
        for a successful upload, the target volume may take on the
        characteristics from the source stream such as format type,
        capacity, and allocation. NrzvirStorageVolUpload() failedrO)rfrZvirStorageVolUploadr)rr�r�rar7r�r9rrr�uploadHszvirStorageVol.uploadcCs"tj|j|�}|dkrtd��|S)a�Ensure data previously on a volume is not accessible to future reads.
        
        The data to be wiped may include the format and possibly size information,
        so non-raw images might become raw with a different size. It is storage
        backend dependent whether the format and size information is regenerated
        once the initial volume wipe is completed.
        
        Depending on the actual volume representation, this call may not
        overwrite the physical location of the volume. For instance, files
        stored journaled, log structured, copy-on-write, versioned, and
        network file systems are known to be problematic. rzvirStorageVolWipe() failedrO)rZvirStorageVolWiperfr)rr7r9rrr�wipenszvirStorageVol.wipecCs$tj|j||�}|dkr td��|S)a�Similar to virStorageVolWipe, but one can choose between
        different wiping algorithms. Also note, that depending on the
        actual volume representation, this call may not really
        overwrite the physical location of the volume. For instance,
        files stored journaled, log structured, copy-on-write,
        versioned, and network file systems are known to be
        problematic. rz!virStorageVolWipePattern() failedrO)rZvirStorageVolWipePatternrfr)r�	algorithmr7r9rrr�wipePatternszvirStorageVol.wipePattern)N)r)r)r)r)r)r)r)r)r-r.r/�
streamBufSizerrhrirjrorQrbr�rcrr;r�rdrerfrgrirrrrrX�s$



!
	

&
rXc
@s
eZdZ�d�dd�Zdd�Z�d�dd�Z�d�d	d
�Z�d�dd�Z�d�d
d�Z�d�dd�Z	�d�dd�Z
dd�Z�d�dd�Z�d�dd�Z
�d�dd�Z�d�dd�Zdd�Z�d�dd �Z�d�d!d"�Z�d�d#d$�Z�d�d%d&�Z�d�d'd(�Z�d�d)d*�Z�d�d+d,�Zd-d.�Zd/d0�Z�d�d1d2�Zd3d4�Z�d�d5d6�Zd7d8�Zd9d:�Zd;d<�Zd=d>�Z �d�d?d@�Z!�d�dAdB�Z"�d�dCdD�Z#dEdF�Z$�d�dGdH�Z%�d�dIdJ�Z&dKdL�Z'dMdN�Z(dOdP�Z)�d�dQdR�Z*dSdT�Z+dUdV�Z,dWdX�Z-dYdZ�Z.d[d\�Z/d]d^�Z0d_d`�Z1dadb�Z2dcdd�Z3�d�dedf�Z4dgdh�Z5didj�Z6dkdl�Z7dmdn�Z8dodp�Z9dqdr�Z:dsdt�Z;dudv�Z<dwdx�Z=dydz�Z>d{d|�Z?�d�d}d~�Z@dd��ZA�d�d�d��ZBd�d��ZCd�d��ZDd�d��ZE�d�d�d��ZF�d�d�d��ZG�d�d�d��ZHd�d��ZI�d�d�d��ZJd�d��ZKd�d��ZLd�d��ZMd�d��ZN�d�d�d��ZOd�d��ZPd�d��ZQd�d��ZRd�d��ZSd�d��ZTd�d��ZU�d�d�d��ZVd�d��ZWd�d��ZX�d�d�d��ZYd�d��ZZd�d��Z[d�d��Z\d�d��Z]�d�d�d��Z^�d�d�d��Z_�d�d�d��Z`�d�d�d��Zad�d„Zbd�dĄZcd�dƄZd�d�d�dȄZed�dʄZf�d�d�d̄Zg�d�d�d΄Zh�d�d�dЄZid�d҄Zjd�dԄZkd�dքZld�d؄Zmd�dڄZnd�d܄Zo�d�d�dބZpd�d�Zqd�d�Zrdd�d�d�Zsdd�d�d�Zteueveweueweuexdd�d�d�Zyezdd�d�d�Z{eze|dd�d�d�Z}d�e~e~dd�d�d�Zd�e~e~e�e�e�fe~d��d�d��Z�d�e�e�e�fe~d��d�d��Z�d�e~e�e�e�fe~d��d�d��Z�d�e~e�e�e�fe~d��d��d�Z�d�e�e�e~e�e�e�fe~�d��d�d�Z�d�e�e�e~e~e�e�e�fe~�d��d�d�Z�d�e~e�e�e�e�e�e�e�fe~�d��d�d	�Z�d�e�e~e~e�e�e�fd�d
��d�d�Z�d�e�e�e�e~e�e�e�fe~�d
��d�d�Z�d�e�e~e�e�e�fe~�d��d�d�Z�d�e~e�e�e�fe~�d��d�d�Z�d�e~e�e�e�fe~�d��d�d�Z�d�e~e�e�e�fe~�d��d�d�Z�d�e~e�e�e�fe~�d��d�d�Z�d�e�e�e�e�fe~�d��d�d�Z�d�e�e�e�e�fe~�d ��d!�d"�Z�d�e~e~e�e�e�fe~�d#��d$�d%�Z�d�e�e�e�e�fe~�d��d&�d'�Z�d�e~e�e�e�fe~�d(��d)�d*�Z�d�e�e�e�fe�e�e�fe~�d ��d+�d,�Z�d�e�e�e�e�fe~�d��d-�d.�Z�d�e~e�e�e�e�fe~�d/��d0�d1�Z�d�e�e�e~e~e�e�e�fe~�d2��d3�d4�Z�d�e~e~e~e�e�e�fe~�d5��d6�d7�Z�d�e�e~e�e�e�fe~�d8��d9�d:�Z�e~d�d;��d<�d=�Z��d>e~e~e�e�e�fe~�d?��d@�dA�Z�e~d�d;��dB�dC�Z�eu�d>e~e�e|e~�dD��dE�dF�Z�eud�e~e�e|e~�dG��dH�dI�Z��dJe~e~e�e�e�fe~�dK��dL�dM�Z��dJe�e�e�fe~�dN��dO�dP�Z�e~d�d;��dQ�dR�Z�eu�dJe~e�e|e~�dS��dT�dU�Z��dVe~e~e�e�e�fe~�dW��dX�dY�Z��dVe�e�e�fe~�dZ��d[�d\�Z�e~d�d;��d]�d^�Z�eu�dVe~e�e|e~�d_��d`�da�Z��dbe~e~e�e�e�fe~�dc��dd�de�Z��dbe�e�e�fe~�df��dg�dh�Z�e~d�d;��di�dj�Z�eu�dbe~e�e|e~�dk��dl�dm�Z��d�e~e�d��dn��do�dp�Z��d�e~e��dJ�dn��dq�dr�Z��d�e~e��d>�dn��ds�dt�Z��d�e~e��du�dn��dv�dw�Z��d�e~e��dV�dn��dx�dy�Z��d�e~e��dz�dn��d{�d|�Z��d�e~e��d}�dn��d~�d�Z��d�e~e��db�dn��d��d��Z�e~e�e�e�fe~�d���d��d��Z�dd��d��d��Z�e�e|e~d��d��d��Z��d�e�e�e~e~d�d���d��d��Z��d�e~e~e�e�d�e�e�e�ff�d���d��d��Z��d�e�d�e~e~e�e�d�e�e�e�ff�d���d��d��Z�dS(�rNcCs(t|�jdkrtdt|���||_dS)Nrbrcz&Expected a wrapped C Object but got %s)rbrc)rer-rrf)rr8rrrr�szvirConnect.__init__cCstj|j�S)z"Get C pointer to underlying object)rZvirConnect_pointerrf)rrrrrj�szvirConnect.c_pointerrcCs(tj|j||||�}|dkr$td��|S)z3Allocate or free some pages in the huge pages pool rzvirNodeAllocPages() failedrO)rZvirNodeAllocPagesrfr)r�pages�	startCellZ	cellCountr7r9rrr�
allocPages�szvirConnect.allocPagescCs$tj|j||�}|dkr td��|S)zQComputes the most feature-rich CPU which is compatible with all given host CPUs. NzvirConnectBaselineCPU() failed)rZvirConnectBaselineCPUrfr)r�xmlCPUsr7r9rrr�baselineCPU�szvirConnect.baselineCPUcCs,tj|j||||||�}|dkr(td��|S)z|Computes the most feature-rich CPU which is compatible with all given CPUs and can be provided by the specified hypervisor. Nz(virConnectBaselineHypervisorCPU() failed)rZvirConnectBaselineHypervisorCPUrfr)r�emulator�arch�machine�virttypernr7r9rrr�baselineHypervisorCPU�sz virConnect.baselineHypervisorCPUcCs"tj|j|�}|dkrtd��|S)aThis function creates a restore point to which one can return
        later by calling virInterfaceChangeRollback(). This function should
        be called before any transaction with interface configuration.
        Once it is known that a new configuration works, it can be committed via
        virInterfaceChangeCommit(), which frees the restore point.
        
        If virInterfaceChangeBegin() is called when a transaction is
        already opened, this function will fail, and a
        VIR_ERR_INVALID_OPERATION will be logged. rz virInterfaceChangeBegin() failedrO)rZvirInterfaceChangeBeginrfr)rr7r9rrr�changeBegin�s
zvirConnect.changeBegincCs"tj|j|�}|dkrtd��|S)a*This commits the changes made to interfaces and frees the restore point
        created by virInterfaceChangeBegin().
        
        If virInterfaceChangeCommit() is called when a transaction is not
        opened, this function will fail, and a VIR_ERR_INVALID_OPERATION
        will be logged. rz!virInterfaceChangeCommit() failedrO)rZvirInterfaceChangeCommitrfr)rr7r9rrr�changeCommit�szvirConnect.changeCommitcCs"tj|j|�}|dkrtd��|S)a1This cancels changes made to interfaces settings by restoring previous
        state created by virInterfaceChangeBegin().
        
        If virInterfaceChangeRollback() is called when a transaction is not
        opened, this function will fail, and a VIR_ERR_INVALID_OPERATION
        will be logged. rz#virInterfaceChangeRollback() failedrO)rZvirInterfaceChangeRollbackrfr)rr7r9rrr�changeRollback�szvirConnect.changeRollbackcCs&tj|j�}d|_|dkr"td��|S)a�This function closes the connection to the Hypervisor. This should
        not be called if further interaction with the Hypervisor are needed
        especially if there is running domain which need further monitoring by
        the application.
        
        Connections are reference counted; the count is explicitly
        increased by the initial open (virConnectOpen, virConnectOpenAuth,
        and the like) as well as virConnectRef; it is also temporarily
        increased by other API that depend on the connection remaining
        alive.  The open and every virConnectRef call should have a
        matching virConnectClose, and all other references will be released
        after the corresponding operation completes. NrzvirConnectClose() failedrO)r�virConnectCloserfr)rr9rrr�close�s

zvirConnect.closecCs$tj|j||�}|dkr td��|S)z�Compares the given CPU description with the host CPU.
        
        See virConnectCompareHypervisorCPU() if you want to consider hypervisor
        abilities and compare the CPU to the CPU which a hypervisor is able to
        provide on the host. rzvirConnectCompareCPU() failedrO)rZvirConnectCompareCPUrfr)rr�r7r9rrr�
compareCPU�szvirConnect.compareCPUcCs,tj|j||||||�}|dkr(td��|S)a�Compares the given CPU description with the CPU the specified hypervisor is
        able to provide on the host. Any of @emulator, @arch, @machine, and
        @virttype parameters may be None; libvirt will choose sensible defaults
        tailored to the host and its current configuration.
        
        This is different from virConnectCompareCPU() which compares the CPU
        definition with the host CPU without considering any specific hypervisor and
        its abilities. rz'virConnectCompareHypervisorCPU() failedrO)rZvirConnectCompareHypervisorCPUrfr)rrprqrrrsZxmlCPUr7r9rrr�compareHypervisorCPU�s	zvirConnect.compareHypervisorCPUcCs0tj|j||�}|dkr td��t||d�}|S)z�Deprecated after 0.4.6.
        Renamed to virDomainCreateXML() providing identical functionality.
        This existing name will be left indefinitely for API compatibility. NzvirDomainCreateLinux() failed)r8)rZvirDomainCreateLinuxrfrr)rr�r7r9�_virConnect__tmprrr�createLinuxs
zvirConnect.createLinuxcCs0tj|j||�}|dkr td��t||d�}|S)a~Launch a new guest domain, based on an XML description similar
        to the one returned by virDomainGetXMLDesc()
        This function may require privileged access to the hypervisor.
        The domain is not persistent, so its definition will disappear when it
        is destroyed, or if the host is restarted (see virDomainDefineXML() to
        define persistent domains).
        
        If the VIR_DOMAIN_START_PAUSED flag is set, the guest domain
        will be started, but its CPUs will remain paused. The CPUs
        can later be manually started using virDomainResume.
        
        If the VIR_DOMAIN_START_AUTODESTROY flag is set, the guest
        domain will be automatically destroyed when the virConnectPtr
        object is finally released. This will also happen if the
        client application crashes / loses its connection to the
        libvirtd daemon. Any domains marked for auto destroy will
        block attempts at migration. Hypervisors may also block save-to-file,
        or snapshots.
        
        virDomainFree should be used to free the resources after the
        domain object is no longer needed. NzvirDomainCreateXML() failed)r8)rZvirDomainCreateXMLrfrr)rr�r7r9r|rrrrZs
zvirConnect.createXMLcCs.tj|j|�}|dkrtd��t||d�}|S)ayDefine a domain, but does not start it.
        This definition is persistent, until explicitly undefined with
        virDomainUndefine(). A previous definition for this domain with the same
        UUID and name would be overridden if it already exists.
        
        virDomainFree should be used to free the resources after the
        domain object is no longer needed. NzvirDomainDefineXML() failed)r8)rZvirDomainDefineXMLrfrr)rrtr9r|rrr�	defineXML4s
zvirConnect.defineXMLcCs0tj|j||�}|dkr td��t||d�}|S)azDefines a domain, but does not start it.
        This definition is persistent, until explicitly undefined with
        virDomainUndefine(). A previous definition for this domain with the same
        UUID and name would be overridden if it already exists.
        
        virDomainFree should be used to free the resources after the
        domain object is no longer needed. Nz virDomainDefineXMLFlags() failed)r8)rZvirDomainDefineXMLFlagsrfrr)rrtr7r9r|rrr�defineXMLFlagsBs
zvirConnect.defineXMLFlagscCs&tj|j|||�}|dkr"td��|S)z�Reads native configuration data  describing a domain, and
        generates libvirt domain XML. The format of the native
        data is hypervisor dependent. Nz&virConnectDomainXMLFromNative() failed)rZvirConnectDomainXMLFromNativerfr)r�nativeFormatZnativeConfigr7r9rrr�domainXMLFromNativePszvirConnect.domainXMLFromNativecCs&tj|j|||�}|dkr"td��|S)z�Reads a domain XML configuration document, and generates
        a native configuration file describing the domain.
        The format of the native data is hypervisor dependent. Nz$virConnectDomainXMLToNative() failed)rZvirConnectDomainXMLToNativerfr)rr�Z	domainXmlr7r9rrr�domainXMLToNativeYszvirConnect.domainXMLToNativecCs&tj|j|||�}|dkr"td��|S)aTalks to a storage backend and attempts to auto-discover the set of
        available storage pool sources. e.g. For iSCSI this would be a set of
        iSCSI targets. For NFS this would be a list of exported paths.  The
        srcSpec (optional for some storage pool types, e.g. local ones) is
        an instance of the storage pool's source element specifying where
        to look for the pools.
        
        srcSpec is not required for some types (e.g., those querying
        local storage resources only) Nz)virConnectFindStoragePoolSources() failed)rZ virConnectFindStoragePoolSourcesrfr)rreZsrcSpecr7r9rrr�findStoragePoolSourcesfs
z!virConnect.findStoragePoolSourcescCs"tj|j|�}|dkrtd��|S)zGet node CPU information NzvirNodeGetCPUMap() failed)rZvirNodeGetCPUMaprfr)rr7r9rrr�	getCPUMapyszvirConnect.getCPUMapcCs$tj|j||�}|dkr td��|S)z&Get the list of supported CPU models. Nz#virConnectGetCPUModelNames() failed)rZvirConnectGetCPUModelNamesrfr)rrqr7r9rrr�getCPUModelNames�szvirConnect.getCPUModelNamescCs$tj|j||�}|dkr td��|S)zExtract node's CPU statistics. NzvirNodeGetCPUStats() failed)rZvirNodeGetCPUStatsrfr)rZcpuNumr7r9rrrr��szvirConnect.getCPUStatscCs tj|j�}|dkrtd��|S)z2Provides capabilities of the hypervisor / driver. Nz"virConnectGetCapabilities() failed)rZvirConnectGetCapabilitiesrfr)rr9rrr�getCapabilities�szvirConnect.getCapabilitiescCs$tj|j||�}|dkr td��|S)z1Returns the available memory for a list of cells Nz"virNodeGetCellsFreeMemory() failed)rZvirNodeGetCellsFreeMemoryrfr)rrl�maxCellsr9rrr�getCellsFreeMemory�szvirConnect.getCellsFreeMemorycCs*tj|j|||||�}|dkr&td��|S)zQuery domain capabilities Nz(virConnectGetDomainCapabilities() failed)rZvirConnectGetDomainCapabilitiesrfr)rZemulatorbinrqrrrsr7r9rrr�getDomainCapabilities�sz virConnect.getDomainCapabilitiescCstj|j�}|S)z�provides the free memory available on the Node
        Note: most libvirt APIs provide memory sizes in kibibytes, but in this
        function the returned value is in bytes. Divide by 1024 as necessary. )rZvirNodeGetFreeMemoryrf)rr9rrr�
getFreeMemory�szvirConnect.getFreeMemorycCs(tj|j||||�}|dkr$td��|S)zIReturns the number of available pages for a list of cells and page sizes NzvirNodeGetFreePages() failed)rZvirNodeGetFreePagesrfr)rrkrlr�r7r9rrr�getFreePages�szvirConnect.getFreePagescCs tj|j�}|dkrtd��|S)a=This returns a system hostname on which the hypervisor is
        running (based on the result of the gethostname system call, but
        possibly expanded to a fully-qualified domain name via getaddrinfo).
        If we are connected to a remote system, then this returns the
        hostname of the remote system. NzvirConnectGetHostname() failed)rZvirConnectGetHostnamerfr)rr9rrr�getHostname�szvirConnect.getHostnamecCs tj|j�}|dkrtd��|S)zjExtract hardware information about the Node. Note that the memory size is reported in MiB instead of KiB. NzvirNodeGetInfo() failed)rZvirNodeGetInforfr)rr9rrr�getInfo�szvirConnect.getInfocCs tj|j�}|dkrtd��|S)z3Returns the libvirt version of the connection host rz virConnectGetLibVersion() failedrO)rZvirConnectGetLibVersionrfr)rr9rrr�
getLibVersion�szvirConnect.getLibVersioncCs"tj|j|�}|dkrtd��|S)a�Provides the maximum number of virtual CPUs supported for a guest VM of a
        specific type. The 'type' parameter here corresponds to the 'type'
        attribute in the <domain> element of the XML. This API doesn't take emulator
        limits into consideration, hence the returned value is not guaranteed to be
        usable. It is recommended to use virConnectGetDomainCapabilities() and look
        for "<vcpu max='...'>" in its output instead. rzvirConnectGetMaxVcpus() failedrO)rZvirConnectGetMaxVcpusrfr)rrer9rrr�getMaxVcpus�szvirConnect.getMaxVcpuscCs"tj|j|�}|dkrtd��|S)zGet the node memory parameters Nz#virNodeGetMemoryParameters() failed)rZvirNodeGetMemoryParametersrfr)rr7r9rrr�getMemoryParameters�szvirConnect.getMemoryParameterscCs$tj|j||�}|dkr td��|S)z"Extract node's memory statistics. NzvirNodeGetMemoryStats() failed)rZvirNodeGetMemoryStatsrfr)rZcellNumr7r9rrr�getMemoryStatsszvirConnect.getMemoryStatscCs"tj|j|�}|dkrtd��|S)z8Get platform specific information from the SEV firmware NzvirNodeGetSEVInfo() failed)rZvirNodeGetSEVInforfr)rr7r9rrr�
getSEVInfoszvirConnect.getSEVInfocCs tj|j�}|dkrtd��|S)z8Extract information about the hypervisor security model Nz virNodeGetSecurityModel() failed)rZvirNodeGetSecurityModelrfr)rr9rrr�getSecurityModelszvirConnect.getSecurityModelcCs"tj|j|�}|dkrtd��|S)z�Prior creating a storage pool (for instance via virStoragePoolCreateXML
        or virStoragePoolDefineXML) it may be suitable to know what pool types
        are supported along with the file/disk formats for each pool. Nz-virConnectGetStoragePoolCapabilities() failed)rZ$virConnectGetStoragePoolCapabilitiesrfr)rr7r9rrr�getStoragePoolCapabilitiessz%virConnect.getStoragePoolCapabilitiescCs"tj|j|�}|dkrtd��|S)aThis returns the XML description of the sysinfo details for the
        host on which the hypervisor is running, in the same format as the
        <sysinfo> element of a domain XML.  This information is generally
        available only for hypervisors running with root privileges. NzvirConnectGetSysinfo() failed)rZvirConnectGetSysinforfr)rr7r9rrr�
getSysinfo'szvirConnect.getSysinfocCs tj|j�}|dkrtd��|S)aXGet the name of the Hypervisor driver used. This is merely the driver
        name; for example, both KVM and QEMU guests are serviced by the
        driver for the qemu:// URI, so a return of "QEMU" does not indicate
        whether KVM acceleration is present.  For more details about the
        hypervisor, use virConnectGetCapabilities(). NzvirConnectGetType() failed)rZvirConnectGetTyperfr)rr9rrr�getType1szvirConnect.getTypecCs tj|j�}|dkrtd��|S)a�This returns the URI (name) of the hypervisor connection.
        Normally this is the same as or similar to the string passed
        to the virConnectOpen/virConnectOpenReadOnly call, but
        the driver may make the URI canonical.  If name == None
        was passed to virConnectOpen, then the driver will return
        a non-None URI which can be used to connect to the same
        hypervisor later. NzvirConnectGetURI() failed)rZvirConnectGetURIrfr)rr9rrr�getURI<szvirConnect.getURIcCs tj|j�}|dkrtd��|S)z>Returns the running hypervisor version of the connection host rzvirConnectGetVersion() failedrO)rZvirConnectGetVersionrfr)rr9rrrr<MszvirConnect.getVersioncCs0tj|j||�}|dkr td��t||d�}|S)a[Define an inactive persistent physical host interface or modify an existing
        persistent one from the XML description.
        
        Normally this change in the interface configuration is immediately
        permanent/persistent, but if virInterfaceChangeBegin() has been
        previously called (i.e. if an interface config transaction is
        open), the new interface definition will only become permanent if
        virInterfaceChangeCommit() is called prior to the next reboot of
        the system running libvirtd. Prior to that time, it can be
        explicitly removed using virInterfaceChangeRollback(), or will be
        automatically removed during the next reboot of the system running
        libvirtd.
        
        virInterfaceFree should be used to free the resources after the
        interface object is no longer needed. NzvirInterfaceDefineXML() failed)r8)rZvirInterfaceDefineXMLrfrrT)rrtr7r9r|rrr�interfaceDefineXMLXs
zvirConnect.interfaceDefineXMLcCs.tj|j|�}|dkrtd��t||d�}|S)z�Try to lookup an interface on the given hypervisor based on its MAC.
        
        virInterfaceFree should be used to free the resources after the
        interface object is no longer needed. Nz&virInterfaceLookupByMACString() failed)r8)rZvirInterfaceLookupByMACStringrfrrT)rZmacstrr9r|rrr�interfaceLookupByMACStringns
z%virConnect.interfaceLookupByMACStringcCs.tj|j|�}|dkrtd��t||d�}|S)z�Try to lookup an interface on the given hypervisor based on its name.
        
        virInterfaceFree should be used to free the resources after the
        interface object is no longer needed. Nz!virInterfaceLookupByName() failed)r8)rZvirInterfaceLookupByNamerfrrT)rr;r9r|rrr�interfaceLookupByNameys
z virConnect.interfaceLookupByNamecCs tj|j�}|dkrtd��|S)z�Determine if the connection to the hypervisor is still alive
        
        A connection will be classed as alive if it is either local, or running
        over a channel (TCP or UNIX socket) which is not closed. rzvirConnectIsAlive() failedrO)rZvirConnectIsAliverfr)rr9rrr�isAlive�szvirConnect.isAlivecCs tj|j�}|dkrtd��|S)z;Determine if the connection to the hypervisor is encrypted rzvirConnectIsEncrypted() failedrO)rZvirConnectIsEncryptedrfr)rr9rrr�isEncrypted�szvirConnect.isEncryptedcCs tj|j�}|dkrtd��|S)z�Determine if the connection to the hypervisor is secure
        
        A connection will be classed as secure if it is either
        encrypted, or running over a channel which is not exposed
        to eavesdropping (eg a UNIX domain socket, or pipe) rzvirConnectIsSecure() failedrO)rZvirConnectIsSecurerfr)rr9rrr�isSecure�szvirConnect.isSecurecCs tj|j�}|dkrtd��|S)zElist the defined domains, stores the pointers to the names in @names Nz%virConnectListDefinedDomains() failed)rZvirConnectListDefinedDomainsrfr)rr9rrr�listDefinedDomains�szvirConnect.listDefinedDomainscCs tj|j�}|dkrtd��|S)zHlist the defined interfaces, stores the pointers to the names in @names Nz(virConnectListDefinedInterfaces() failed)rZvirConnectListDefinedInterfacesrfr)rr9rrr�listDefinedInterfaces�sz virConnect.listDefinedInterfacescCs tj|j�}|dkrtd��|S)zFlist the defined networks, stores the pointers to the names in @names Nz&virConnectListDefinedNetworks() failed)rZvirConnectListDefinedNetworksrfr)rr9rrr�listDefinedNetworks�szvirConnect.listDefinedNetworkscCs tj|j�}|dkrtd��|S)zJlist the defined storage pool, stores the pointers to the names in @names Nz*virConnectListDefinedStoragePools() failed)rZ!virConnectListDefinedStoragePoolsrfr)rr9rrr�listDefinedStoragePools�sz"virConnect.listDefinedStoragePoolscCs$tj|j||�}|dkr td��|S)zlist the node devices NzvirNodeListDevices() failed)rZvirNodeListDevicesrfr)r�capr7r9rrr�listDevices�szvirConnect.listDevicescCs tj|j�}|dkrtd��|S)z<Returns the list of the ID of the domains on the hypervisor Nz virConnectListDomainsID() failed)rZvirConnectListDomainsIDrfr)rr9rrr�
listDomainsID�szvirConnect.listDomainsIDcCs tj|j�}|dkrtd��|S)zHlist the running interfaces, stores the pointers to the names in @names Nz!virConnectListInterfaces() failed)rZvirConnectListInterfacesrfr)rr9rrr�listInterfaces�szvirConnect.listInterfacescCs tj|j�}|dkrtd��|S)z!List the defined network filters Nz virConnectListNWFilters() failed)rZvirConnectListNWFiltersrfr)rr9rrr�
listNWFilters�szvirConnect.listNWFilterscCs tj|j�}|dkrtd��|S)z>list the networks, stores the pointers to the names in @names NzvirConnectListNetworks() failed)rZvirConnectListNetworksrfr)rr9rrr�listNetworks�szvirConnect.listNetworkscCs tj|j�}|dkrtd��|S)zList the defined secret IDs NzvirConnectListSecrets() failed)rZvirConnectListSecretsrfr)rr9rrr�listSecrets�szvirConnect.listSecretscCs tj|j�}|dkrtd��|S)zClist the storage pools, stores the pointers to the names in @names Nz#virConnectListStoragePools() failed)rZvirConnectListStoragePoolsrfr)rr9rrr�listStoragePools�szvirConnect.listStoragePoolscCs.tj|j|�}|dkrtd��t||d�}|S)aPTry to find a domain based on the hypervisor ID number
        Note that this won't work for inactive domains which have an ID of -1,
        in that case a lookup based on the Name or UUID need to be done instead.
        
        virDomainFree should be used to free the resources after the
        domain object is no longer needed. NzvirDomainLookupByID() failed)r8)rZvirDomainLookupByIDrfrr)r�idr9r|rrr�
lookupByID	s
zvirConnect.lookupByIDcCs.tj|j|�}|dkrtd��t||d�}|S)z�Try to lookup a domain on the given hypervisor based on its name.
        
        virDomainFree should be used to free the resources after the
        domain object is no longer needed. NzvirDomainLookupByName() failed)r8)rZvirDomainLookupByNamerfrr)rr;r9r|rrr�lookupByNames
zvirConnect.lookupByNamecCs.tj|j|�}|dkrtd��t||d�}|S)zBTry to lookup a domain on the given hypervisor based on its UUID. NzvirDomainLookupByUUID() failed)r8)rZvirDomainLookupByUUIDrfrr)rrGr9r|rrr�lookupByUUID%s
zvirConnect.lookupByUUIDcCs.tj|j|�}|dkrtd��t||d�}|S)z�Try to lookup a domain on the given hypervisor based on its UUID.
        
        virDomainFree should be used to free the resources after the
        domain object is no longer needed. Nz$virDomainLookupByUUIDString() failed)r8)rZvirDomainLookupByUUIDStringrfrr)rrIr9r|rrr�lookupByUUIDString1s
zvirConnect.lookupByUUIDStringcCs.tj|j|�}|dkrtd��t||d�}|S)z�Create and start a new virtual network, based on an XML description
        similar to the one returned by virNetworkGetXMLDesc()
        
        virNetworkFree should be used to free the resources after the
        network object is no longer needed. NzvirNetworkCreateXML() failed)r8)rZvirNetworkCreateXMLrfrrA)rr�r9r|rrr�networkCreateXML@s
zvirConnect.networkCreateXMLcCs0tj|j||�}|dkr td��t||d�}|S)z�Create and start a new virtual network, based on an XML description
        similar to the one returned by virNetworkGetXMLDesc()
        
        virNetworkFree should be used to free the resources after the
        network object is no longer needed. Nz!virNetworkCreateXMLFlags() failed)r8)rZvirNetworkCreateXMLFlagsrfrrA)rr�r7r9r|rrr�networkCreateXMLFlagsLs
z virConnect.networkCreateXMLFlagscCs.tj|j|�}|dkrtd��t||d�}|S)z�Define an inactive persistent virtual network or modify an existing
        persistent one from the XML description.
        
        virNetworkFree should be used to free the resources after the
        network object is no longer needed. NzvirNetworkDefineXML() failed)r8)rZvirNetworkDefineXMLrfrrA)rrtr9r|rrr�networkDefineXMLXs
zvirConnect.networkDefineXMLcCs0tj|j||�}|dkr td��t||d�}|S)z�Define an inactive persistent virtual network or modify an existing
        persistent one from the XML description.
        
        virNetworkFree should be used to free the resources after the
        network object is no longer needed. Nz!virNetworkDefineXMLFlags() failed)r8)rZvirNetworkDefineXMLFlagsrfrrA)rrtr7r9r|rrr�networkDefineXMLFlagsds
z virConnect.networkDefineXMLFlagscCs.tj|j|�}|dkrtd��t||d�}|S)z�Try to lookup a network on the given hypervisor based on its name.
        
        virNetworkFree should be used to free the resources after the
        network object is no longer needed. NzvirNetworkLookupByName() failed)r8)rZvirNetworkLookupByNamerfrrA)rr;r9r|rrr�networkLookupByNameps
zvirConnect.networkLookupByNamecCs.tj|j|�}|dkrtd��t||d�}|S)zCTry to lookup a network on the given hypervisor based on its UUID. NzvirNetworkLookupByUUID() failed)r8)rZvirNetworkLookupByUUIDrfrrA)rrGr9r|rrr�networkLookupByUUIDs
zvirConnect.networkLookupByUUIDcCs.tj|j|�}|dkrtd��t||d�}|S)zCTry to lookup a network on the given hypervisor based on its UUID. Nz%virNetworkLookupByUUIDString() failed)r8)rZvirNetworkLookupByUUIDStringrfrrA)rrIr9r|rrr�networkLookupByUUIDString�s
z$virConnect.networkLookupByUUIDStringcCs.tj|j|�}|dkrtd��t||d�}|S)a	Creates a new stream object which can be used to perform
        streamed I/O with other public API function.
        
        When no longer needed, a stream object must be released
        with virStreamFree. If a data stream has been used,
        then the application must call virStreamFinish or
        virStreamAbort before free'ing to, in order to notify
        the driver of termination.
        
        If a non-blocking data stream is required passed
        VIR_STREAM_NONBLOCK for flags, otherwise pass 0. NzvirStreamNew() failed)r8)rZvirStreamNewrfr�	virStream)rr7r9r|rrr�	newStream�s
zvirConnect.newStreamcCs0tj|j||�}|dkr td��t||d�}|S)z�Create a new device on the VM host machine, for example, virtual
        HBAs created using vport_create.
        
        virNodeDeviceFree should be used to free the resources after the
        node device object is no longer needed. NzvirNodeDeviceCreateXML() failed)r8)rZvirNodeDeviceCreateXMLrfr�
virNodeDevice)rr�r7r9r|rrr�nodeDeviceCreateXML�s
zvirConnect.nodeDeviceCreateXMLcCs0tj|j||�}|dkr td��t||d�}|S)z�Define a new device on the VM host machine, for example, a mediated device
        
        virNodeDeviceFree should be used to free the resources after the
        node device object is no longer needed. NzvirNodeDeviceDefineXML() failed)r8)rZvirNodeDeviceDefineXMLrfrr�)rr�r7r9r|rrr�nodeDeviceDefineXML�s
zvirConnect.nodeDeviceDefineXMLcCs.tj|j|�}|dkrtd��t||d�}|S)z�Lookup a node device by its name.
        
        virNodeDeviceFree should be used to free the resources after the
        node device object is no longer needed. Nz"virNodeDeviceLookupByName() failed)r8)rZvirNodeDeviceLookupByNamerfrr�)rr;r9r|rrr�nodeDeviceLookupByName�s
z!virConnect.nodeDeviceLookupByNamecCs2tj|j|||�}|dkr"td��t||d�}|S)z�Lookup SCSI Host which is capable with 'fc_host' by its WWNN and WWPN.
        
        virNodeDeviceFree should be used to free the resources after the
        node device object is no longer needed. Nz)virNodeDeviceLookupSCSIHostByWWN() failed)r8)rZ virNodeDeviceLookupSCSIHostByWWNrfrr�)rZwwnnZwwpnr7r9r|rrr�nodeDeviceLookupSCSIHostByWWN�s
z(virConnect.nodeDeviceLookupSCSIHostByWWNcCs tj|j�}|dkrtd��|S)z5Provides the number of defined but inactive domains. rz&virConnectNumOfDefinedDomains() failedrO)rZvirConnectNumOfDefinedDomainsrfr)rr9rrr�numOfDefinedDomains�szvirConnect.numOfDefinedDomainscCs tj|j�}|dkrtd��|S)zKProvides the number of defined (inactive) interfaces on the physical host. rz)virConnectNumOfDefinedInterfaces() failedrO)rZ virConnectNumOfDefinedInterfacesrfr)rr9rrr�numOfDefinedInterfaces�sz!virConnect.numOfDefinedInterfacescCs tj|j�}|dkrtd��|S)z*Provides the number of inactive networks. rz'virConnectNumOfDefinedNetworks() failedrO)rZvirConnectNumOfDefinedNetworksrfr)rr9rrr�numOfDefinedNetworks�szvirConnect.numOfDefinedNetworkscCs tj|j�}|dkrtd��|S)z.Provides the number of inactive storage pools rz+virConnectNumOfDefinedStoragePools() failedrO)rZ"virConnectNumOfDefinedStoragePoolsrfr)rr9rrr�numOfDefinedStoragePools�sz#virConnect.numOfDefinedStoragePoolscCs$tj|j||�}|dkr td��|S)z�Provides the number of node devices.
        
        If the optional 'cap'  argument is non-None, then the count
        will be restricted to devices with the specified capability rzvirNodeNumOfDevices() failedrO)rZvirNodeNumOfDevicesrfr)rr�r7r9rrr�numOfDevices
szvirConnect.numOfDevicescCs tj|j�}|dkrtd��|S)z'Provides the number of active domains. rzvirConnectNumOfDomains() failedrO)rZvirConnectNumOfDomainsrfr)rr9rrr�numOfDomainsszvirConnect.numOfDomainscCs tj|j�}|dkrtd��|S)z?Provides the number of active interfaces on the physical host. rz"virConnectNumOfInterfaces() failedrO)rZvirConnectNumOfInterfacesrfr)rr9rrr�numOfInterfaces#szvirConnect.numOfInterfacescCs tj|j�}|dkrtd��|S)z"Provides the number of nwfilters. rz!virConnectNumOfNWFilters() failedrO)rZvirConnectNumOfNWFiltersrfr)rr9rrr�numOfNWFilters.szvirConnect.numOfNWFilterscCs tj|j�}|dkrtd��|S)z(Provides the number of active networks. rz virConnectNumOfNetworks() failedrO)rZvirConnectNumOfNetworksrfr)rr9rrr�
numOfNetworks9szvirConnect.numOfNetworkscCs tj|j�}|dkrtd��|S)z+Fetch number of currently defined secrets. rzvirConnectNumOfSecrets() failedrO)rZvirConnectNumOfSecretsrfr)rr9rrr�numOfSecretsDszvirConnect.numOfSecretscCs tj|j�}|dkrtd��|S)z,Provides the number of active storage pools rz$virConnectNumOfStoragePools() failedrO)rZvirConnectNumOfStoragePoolsrfr)rr9rrr�numOfStoragePoolsOszvirConnect.numOfStoragePoolscCs0tj|j||�}|dkr td��t||d�}|S)a�Define a new network filter, based on an XML description
        similar to the one returned by virNWFilterGetXMLDesc(). This
        API may be used to associate a filter with a currently running
        guest that does not have a filter defined for a specific network
        port. Since the bindings are generally automatically managed by
        the hypervisor, using this command to define a filter for a network
        port and then starting the guest afterwards may prevent the guest
        from starting if it attempts to use the network port and finds a
        filter already defined.
        
        virNWFilterFree should be used to free the resources after the
        binding object is no longer needed. Nz$virNWFilterBindingCreateXML() failed)r8)rZvirNWFilterBindingCreateXMLrfr�virNWFilterBinding)rrtr7r9r|rrr�nwfilterBindingCreateXMLZs

z#virConnect.nwfilterBindingCreateXMLcCs.tj|j|�}|dkrtd��t||d�}|S)z�Try to lookup a network filter binding on the given hypervisor based
        on network port device name.
        
        virNWFilterBindingFree should be used to free the resources after the
        binding object is no longer needed. Nz*virNWFilterBindingLookupByPortDev() failed)r8)rZ!virNWFilterBindingLookupByPortDevrfrr�)rZportdevr9r|rrr�nwfilterBindingLookupByPortDevms
z)virConnect.nwfilterBindingLookupByPortDevcCs.tj|j|�}|dkrtd��t||d�}|S)z�Define a new network filter, based on an XML description
        similar to the one returned by virNWFilterGetXMLDesc()
        
        virNWFilterFree should be used to free the resources after the
        nwfilter object is no longer needed. NzvirNWFilterDefineXML() failed)r8)rZvirNWFilterDefineXMLrfr�virNWFilter)rr�r9r|rrr�nwfilterDefineXMLys
zvirConnect.nwfilterDefineXMLcCs0tj|j||�}|dkr td��t||d�}|S)z�Define a new network filter, based on an XML description
        similar to the one returned by virNWFilterGetXMLDesc()
        
        virNWFilterFree should be used to free the resources after the
        nwfilter object is no longer needed. Nz"virNWFilterDefineXMLFlags() failed)r8)rZvirNWFilterDefineXMLFlagsrfrr�)rr�r7r9r|rrr�nwfilterDefineXMLFlags�s
z!virConnect.nwfilterDefineXMLFlagscCs.tj|j|�}|dkrtd��t||d�}|S)z�Try to lookup a network filter on the given hypervisor based on its name.
        
        virNWFilterFree should be used to free the resources after the
        nwfilter object is no longer needed. Nz virNWFilterLookupByName() failed)r8)rZvirNWFilterLookupByNamerfrr�)rr;r9r|rrr�nwfilterLookupByName�s
zvirConnect.nwfilterLookupByNamecCs.tj|j|�}|dkrtd��t||d�}|S)zJTry to lookup a network filter on the given hypervisor based on its UUID. Nz virNWFilterLookupByUUID() failed)r8)rZvirNWFilterLookupByUUIDrfrr�)rrGr9r|rrr�nwfilterLookupByUUID�s
zvirConnect.nwfilterLookupByUUIDcCs.tj|j|�}|dkrtd��t||d�}|S)z�Try to lookup an nwfilter on the given hypervisor based on its UUID.
        
        virNWFilterFree should be used to free the resources after the
        nwfilter object is no longer needed. Nz&virNWFilterLookupByUUIDString() failed)r8)rZvirNWFilterLookupByUUIDStringrfrr�)rrIr9r|rrr�nwfilterLookupByUUIDString�s
z%virConnect.nwfilterLookupByUUIDStringcCs"tj|j|�}|dkrtd��|S)z�This method will restore a domain saved to disk by virDomainSave().
        
        See virDomainRestoreFlags() for more control. rzvirDomainRestore() failedrO)rZvirDomainRestorerfr)r�frmr9rrr�restore�szvirConnect.restorecCs&tj|j|||�}|dkr"td��|S)aeThis method will restore a domain saved to disk by virDomainSave().
        
        If the hypervisor supports it, @dxml can be used to alter
        host-specific portions of the domain XML that will be used when
        restoring an image.  For example, it is possible to alter the
        backing filename that is associated with a disk device, in order to
        prepare for file renaming done as part of backing up the disk
        device while the domain is stopped.
        
        If @flags includes VIR_DOMAIN_SAVE_BYPASS_CACHE, then libvirt will
        attempt to bypass the file system cache while restoring the file, or
        fail if it cannot do so for the given system; this can allow less
        pressure on file system cache, but also risks slowing restores from NFS.
        
        Normally, the saved state file will remember whether the domain was
        running or paused, and restore defaults to the same state.
        Specifying VIR_DOMAIN_SAVE_RUNNING or VIR_DOMAIN_SAVE_PAUSED in
        @flags will override the default read from the file.  These two
        flags are mutually exclusive. rzvirDomainRestoreFlags() failedrO)rZvirDomainRestoreFlagsrfr)rr�r�r7r9rrr�restoreFlags�szvirConnect.restoreFlagscCs&tj|j|||�}|dkr"td��|S)a�This updates the definition of a domain stored in a saved state
        file.  @file must be a file created previously by virDomainSave()
        or virDomainSaveFlags().
        
        @dxml can be used to alter host-specific portions of the domain XML
        that will be used when restoring an image.  For example, it is
        possible to alter the backing filename that is associated with a
        disk device, to match renaming done as part of backing up the disk
        device while the domain is stopped.
        
        Normally, the saved state file will remember whether the domain was
        running or paused, and restore defaults to the same state.
        Specifying VIR_DOMAIN_SAVE_RUNNING or VIR_DOMAIN_SAVE_PAUSED in
        @flags will override the default saved into the file; omitting both
        leaves the file's default unchanged.  These two flags are mutually
        exclusive. rz$virDomainSaveImageDefineXML() failedrO)rZvirDomainSaveImageDefineXMLrfr)r�filer�r7r9rrr�saveImageDefineXML�szvirConnect.saveImageDefineXMLcCs$tj|j||�}|dkr td��|S)aFThis method will extract the XML describing the domain at the time
        a saved state file was created.  @file must be a file created
        previously by virDomainSave() or virDomainSaveFlags().
        
        No security-sensitive data will be included unless @flags contains
        VIR_DOMAIN_SAVE_IMAGE_XML_SECURE. Nz%virDomainSaveImageGetXMLDesc() failed)rZvirDomainSaveImageGetXMLDescrfr)rr�r7r9rrr�saveImageGetXMLDesc�szvirConnect.saveImageGetXMLDesccCs0tj|j||�}|dkr td��t||d�}|S)a�If XML specifies a UUID, locates the specified secret and replaces all
        attributes of the secret specified by UUID by attributes specified in xml
        (any attributes not specified in xml are discarded).
        
        Otherwise, creates a new secret with an automatically chosen UUID, and
        initializes its attributes from xml.
        
        virSecretFree should be used to free the resources after the
        secret object is no longer needed. NzvirSecretDefineXML() failed)r8)rZvirSecretDefineXMLrfr�	virSecret)rrtr7r9r|rrr�secretDefineXMLs

zvirConnect.secretDefineXMLcCs.tj|j|�}|dkrtd��t||d�}|S)zBTry to lookup a secret on the given hypervisor based on its UUID. NzvirSecretLookupByUUID() failed)r8)rZvirSecretLookupByUUIDrfrr�)rrGr9r|rrr�secretLookupByUUIDs
zvirConnect.secretLookupByUUIDcCs.tj|j|�}|dkrtd��t||d�}|S)z�Try to lookup a secret on the given hypervisor based on its UUID.
        Uses the printable string value to describe the UUID
        
        virSecretFree should be used to free the resources after the
        secret object is no longer needed. Nz$virSecretLookupByUUIDString() failed)r8)rZvirSecretLookupByUUIDStringrfrr�)rrIr9r|rrr�secretLookupByUUIDString#s
z#virConnect.secretLookupByUUIDStringcCs0tj|j||�}|dkr td��t||d�}|S)aTry to lookup a secret on the given hypervisor based on its usage
        The usageID is unique within the set of secrets sharing the
        same usageType value.
        
        virSecretFree should be used to free the resources after the
        secret object is no longer needed. NzvirSecretLookupByUsage() failed)r8)rZvirSecretLookupByUsagerfrr�)r�	usageType�usageIDr9r|rrr�secretLookupByUsage/s
zvirConnect.secretLookupByUsagecCs$tj|j||�}|dkr td��|S)zJOverride the default identity information associated with the connection. rzvirConnectSetIdentity() failedrO)rZvirConnectSetIdentityrfr)rr�r7r9rrr�setIdentity@szvirConnect.setIdentitycCs$tj|j||�}|dkr td��|S)aStart sending keepalive messages after @interval seconds of inactivity and
        consider the connection to be broken when no response is received after
        @count keepalive messages sent in a row.  In other words, sending count + 1
        keepalive message results in closing the connection.  When @interval is
        <= 0, no keepalive messages will be sent.  When @count is 0, the connection
        will be automatically closed after @interval seconds of inactivity without
        sending any keepalive messages.
        
        Note: The client has to implement and run an event loop with
        virEventRegisterImpl() or virEventRegisterDefaultImpl() to be able to
        use keepalive messages.  Failure to do so may result in connections
        being closed unexpectedly.
        
        Note: This API function controls only keepalive messages sent by the client.
        If the server is configured to use keepalive you still need to run the event
        loop to respond to them, even if you disable keepalives by this function. rzvirConnectSetKeepAlive() failedrO)rZvirConnectSetKeepAliverfr)rZinterval�countr9rrr�setKeepAliveGszvirConnect.setKeepAlivecCs$tj|j||�}|dkr td��|S)z Change the node memory tunables rz#virNodeSetMemoryParameters() failedrO)rZvirNodeSetMemoryParametersrfr)rr�r7r9rrrraszvirConnect.setMemoryParameterscCs0tj|j||�}|dkr td��t||d�}|S)a6Create a new storage based on its XML description. The
        pool is not persistent, so its definition will disappear
        when it is destroyed, or if the host is restarted
        
        virStoragePoolFree should be used to free the resources after the
        storage pool object is no longer needed. Nz virStoragePoolCreateXML() failed)r8)rZvirStoragePoolCreateXMLrfrrV)rr�r7r9r|rrr�storagePoolCreateXMLls
zvirConnect.storagePoolCreateXMLcCs0tj|j||�}|dkr td��t||d�}|S)z�Define an inactive persistent storage pool or modify an existing persistent
        one from the XML description.
        
        virStoragePoolFree should be used to free the resources after the
        storage pool object is no longer needed. Nz virStoragePoolDefineXML() failed)r8)rZvirStoragePoolDefineXMLrfrrV)rrtr7r9r|rrr�storagePoolDefineXMLys
zvirConnect.storagePoolDefineXMLcCs.tj|j|�}|dkrtd��t||d�}|S)z�Fetch a storage pool based on its unique name
        
        virStoragePoolFree should be used to free the resources after the
        storage pool object is no longer needed. Nz#virStoragePoolLookupByName() failed)r8)rZvirStoragePoolLookupByNamerfrrV)rr;r9r|rrr�storagePoolLookupByName�s
z"virConnect.storagePoolLookupByNamecCs.tj|j|�}|dkrtd��t||d�}|S)a,Fetch a storage pool which maps to a particular target directory.
        If more than one pool maps to the path, it is undefined which
        will be returned first.
        
        virStoragePoolFree should be used to free the resources after the
        storage pool object is no longer needed. Nz)virStoragePoolLookupByTargetPath() failed)r8)rZ virStoragePoolLookupByTargetPathrfrrV)rr�r9r|rrr�storagePoolLookupByTargetPath�s
z(virConnect.storagePoolLookupByTargetPathcCs.tj|j|�}|dkrtd��t||d�}|S)z�Fetch a storage pool based on its globally unique id
        
        virStoragePoolFree should be used to free the resources after the
        storage pool object is no longer needed. Nz#virStoragePoolLookupByUUID() failed)r8)rZvirStoragePoolLookupByUUIDrfrrV)rrGr9r|rrr�storagePoolLookupByUUID�s
z"virConnect.storagePoolLookupByUUIDcCs.tj|j|�}|dkrtd��t||d�}|S)z�Fetch a storage pool based on its globally unique id
        
        virStoragePoolFree should be used to free the resources after the
        storage pool object is no longer needed. Nz)virStoragePoolLookupByUUIDString() failed)r8)rZ virStoragePoolLookupByUUIDStringrfrrV)rrIr9r|rrr�storagePoolLookupByUUIDString�s
z(virConnect.storagePoolLookupByUUIDStringcCs.tj|j|�}|dkrtd��t||d�}|S)z�Fetch a pointer to a storage volume based on its
        globally unique key
        
        virStorageVolFree should be used to free the resources after the
        storage volume object is no longer needed. Nz!virStorageVolLookupByKey() failed)r8)rZvirStorageVolLookupByKeyrfrrX)rrr9r|rrr�storageVolLookupByKey�s
z virConnect.storageVolLookupByKeycCs.tj|j|�}|dkrtd��t||d�}|S)z�Fetch a pointer to a storage volume based on its
        locally (host) unique path
        
        virStorageVolFree should be used to free the resources after the
        storage volume object is no longer needed. Nz"virStorageVolLookupByPath() failed)r8)rZvirStorageVolLookupByPathrfrrX)rr�r9r|rrr�storageVolLookupByPath�s
z!virConnect.storageVolLookupByPathcCs&tj|j|||�}|dkr"td��|S)aAttempt to suspend the node (host machine) for the given duration of
        time in the specified state (Suspend-to-RAM, Suspend-to-Disk or
        Hybrid-Suspend). Schedule the node's Real-Time-Clock interrupt to
        resume the node after the duration is complete. rz"virNodeSuspendForDuration() failedrO)rZvirNodeSuspendForDurationrfr)rr�r�r7r9rrr�suspendForDuration�szvirConnect.suspendForDurationcCstj|j�}|S)a�Provide a pointer to the last error caught on that connection
        
        This method is not protected against access from multiple
        threads. In a multi-threaded application, always use the
        global virGetLastError() API which is backed by thread
        local storage.
        
        If the connection object was discovered to be invalid by
        an API call, then the error will be reported against the
        global error object.
        
        Since 0.6.0, all errors reported in the per-connection object
        are also duplicated in the global error object. As such an
        application can always use virGetLastError(). This method
        remains for backwards compatibility. )r�virConnGetLastErrorrf)rr9rrrr��szvirConnect.virConnGetLastErrorcCstj|j�dS)z�The error object is kept in thread local storage, so separate
        threads can safely access this concurrently.
        
        Reset the last error caught on that connection N)r�virConnResetLastErrorrf)rrrrr��sz virConnect.virConnResetLastError)rcCsVy |jj�|`tj|j|�Wntk
r4YnX|jdk	rLtj|j�d|_dS)N)�domainEventCallbacks�clearr�virConnectDomainEventDeregisterrf�AttributeErrorrx)rrrrrh�s

zvirConnect.__del__cCs|S)Nr)rrrr�	__enter__szvirConnect.__enter__)�	exc_type_�
exc_value_�
traceback_rcCs|j�dS)N)ry)rr�r�r�rrr�__exit__	szvirConnect.__exit__)rLrcCsVy<|j|=t|j�dkr:|`tj|j|�}|dkr:td��Wntk
rPYnXdS)zzRemoves a Domain Event Callback. De-registering for a
           domain callback will disable delivery of this event type rrz(virConnectDomainEventDeregister() failedNrO)r��lenrr�rfrr�)rrLr9rrr�domainEventDeregistersz virConnect.domainEventDeregister)rLr@rcCsPy||j|<Wn<tk
rJ||i|_tj|j|�}|dkrFtd��YnXdS)znAdds a Domain Event Callback. Registering for a domain
           callback will enable delivery of the events rz&virConnectDomainEventRegister() failedNrO)r�r�rZvirConnectDomainEventRegisterrfr)rrLr@r9rrr�domainEventRegisters
zvirConnect.domainEventRegisterr)�domr?�detailrc
CsNy4x.|jj�D] \}}||t||d�|||�qWWntk
rHYnXdS)z@Dispatches events to python user domain event callbacks
        )r8N)r��itemsrr�)rr�r?r�rLr@rrr�_dispatchDomainEventCallbacks$s
 z(virConnect._dispatchDomainEventCallbacks)r�r?r�rKrcCs,|d}|d}||t||d�|||�dS)zJDispatches events to python user domain lifecycle event callbacks
        rLr@)r8r)r)rr�r?r�rKrLr@rrr�%_dispatchDomainEventLifecycleCallback-sz0virConnect._dispatchDomainEventLifecycleCallback)r�rKrcCs(|d}|d}||t||d�|�dS)zHDispatches events to python user domain generic event callbacks
        rLr@)r8r)r)rr�rKrLr@rrr�#_dispatchDomainEventGenericCallback6sz.virConnect._dispatchDomainEventGenericCallback)r�r�rKrcCs*|d}|d}||t||d�||�dS)zKDispatches events to python user domain RTC change event callbacks
        rLr@)r8r)r)rr�r�rKrLr@rrr�%_dispatchDomainEventRTCChangeCallback?sz0virConnect._dispatchDomainEventRTCChangeCallback)r�rrKrcCs*|d}|d}||t||d�||�dS)zIDispatches events to python user domain watchdog event callbacks
        rLr@)r8r)r)rr�rrKrLr@rrr�$_dispatchDomainEventWatchdogCallbackHsz/virConnect._dispatchDomainEventWatchdogCallback)r��srcPath�devAliasrrKrcCs.|d}|d}||t||d�||||�dS)zIDispatches events to python user domain IO error event callbacks
        rLr@)r8r)r)rr�rrrrKrLr@rrr�#_dispatchDomainEventIOErrorCallbackQsz.virConnect._dispatchDomainEventIOErrorCallback)r�rrr�reasonrKrc	Cs0|d}|d}||t||d�|||||�dS)zIDispatches events to python user domain IO error event callbacks
        rLr@)r8r)r)	rr�rrrrrKrLr@rrr�)_dispatchDomainEventIOErrorReasonCallbackZs
z4virConnect._dispatchDomainEventIOErrorReasonCallback)r��phase�	localAddr�
remoteAddr�
authScheme�subjectrKrc
	Cs2|d}|d}	||t||d�||||||	�dS)zIDispatches events to python user domain graphics event callbacks
        rLr@)r8r)r)
rr�rrrrr	rKrLr@rrr�$_dispatchDomainEventGraphicsCallbackds

z/virConnect._dispatchDomainEventGraphicsCallback)r�rre�statusrKrc
CsHy.|d}|d}||t||d�||||�Wntk
rBYnXdS)zSDispatches events to python user domain blockJob/blockJob2 event callbacks
        rLr@)r8N)rr�)rr�rrerrKrLr@rrr�$_dispatchDomainEventBlockJobCallbacknsz/virConnect._dispatchDomainEventBlockJobCallback)r��
oldSrcPath�
newSrcPathrrrKrc	Cs0|d}|d}||t||d�|||||�dS)zJDispatches event to python user domain diskChange event callbacks
        rLr@)r8r)r)	rr�r
rrrrKrLr@rrr�&_dispatchDomainEventDiskChangeCallbackysz1virConnect._dispatchDomainEventDiskChangeCallback)r�rrrKrcCs,|d}|d}||t||d�|||�dS)zJDispatches event to python user domain trayChange event callbacks
        rLr@)r8r)r)rr�rrrKrLr@rrr�&_dispatchDomainEventTrayChangeCallback�sz1virConnect._dispatchDomainEventTrayChangeCallback)r�rrKrcCs*|d}|d}||t||d�||�dS)zHDispatches event to python user domain pmwakeup event callbacks
        rLr@)r8r)r)rr�rrKrLr@rrr�$_dispatchDomainEventPMWakeupCallback�sz/virConnect._dispatchDomainEventPMWakeupCallbackcCs*|d}|d}||t||d�||�dS)zIDispatches event to python user domain pmsuspend event callbacks
        rLr@)r8r)r)rr�rrKrLr@rrr�%_dispatchDomainEventPMSuspendCallback�sz0virConnect._dispatchDomainEventPMSuspendCallback)r��actualrKrcCs*|d}|d}||t||d�||�dS)zODispatches events to python user domain balloon change event callbacks
        rLr@)r8r)r)rr�rrKrLr@rrr�)_dispatchDomainEventBalloonChangeCallback�sz4virConnect._dispatchDomainEventBalloonChangeCallbackcCs*|d}|d}||t||d�||�dS)zNDispatches event to python user domain pmsuspend-disk event callbacks
        rLr@)r8r)r)rr�rrKrLr@rrr�)_dispatchDomainEventPMSuspendDiskCallback�sz4virConnect._dispatchDomainEventPMSuspendDiskCallback)r�rrKrcCs*|d}|d}||t||d�||�dS)zNDispatches event to python user domain device removed event callbacks
        rLr@)r8r)r)rr�rrKrLr@rrr�)_dispatchDomainEventDeviceRemovedCallback�sz4virConnect._dispatchDomainEventDeviceRemovedCallback)r�r�rKrcCs*|d}|d}||t||d�||�dS)zGDispatches event to python user domain tunable event callbacks
        rLr@)r8r)r)rr�r�rKrLr@rrr�#_dispatchDomainEventTunableCallback�sz.virConnect._dispatchDomainEventTunableCallback)r�rrrKrcCs,|d}|d}||t||d�|||�dS)zNDispatches event to python user domain agent lifecycle event callback
        rLr@)r8r)r)rr�rrrKrLr@rrr�*_dispatchDomainEventAgentLifecycleCallback�sz5virConnect._dispatchDomainEventAgentLifecycleCallbackcCs*|d}|d}||t||d�||�dS)zLDispatches event to python user domain device added event callbacks
        rLr@)r8r)r)rr�rrKrLr@rrr�'_dispatchDomainEventDeviceAddedCallback�sz2virConnect._dispatchDomainEventDeviceAddedCallback)r��	iterationrKrcCs*|d}|d}||t||d�||�dS)zSDispatches event to python user domain migration iteration event callbacks
        rLr@)r8r)r)rr�rrKrLr@rrr�._dispatchDomainEventMigrationIterationCallback�sz9virConnect._dispatchDomainEventMigrationIterationCallbackcCs*|d}|d}||t||d�||�dS)zGDispatches event to python user domain job completed callbacks
        rLr@)r8r)r)rr�r�rKrLr@rrr�(_dispatchDomainEventJobCompletedCallback�sz3virConnect._dispatchDomainEventJobCompletedCallbackcCs*|d}|d}||t||d�||�dS)zUDispatches event to python user domain device removal failed event callbacks
        rLr@)r8r)r)rr�rrKrLr@rrr�/_dispatchDomainEventDeviceRemovalFailedCallback�sz:virConnect._dispatchDomainEventDeviceRemovalFailedCallback)r��mtype�nsurirKrcCs,|d}|d}||t||d�|||�dS)zODispatches event to python user domain metadata change event callbacks
        rLr@)r8r)r)rr�rrrKrLr@rrr�*_dispatchDomainEventMetadataChangeCallback�sz5virConnect._dispatchDomainEventMetadataChangeCallback)r�rr�r	�excessrKrc	Cs0|d}|d}||t||d�|||||�dS)zVDispatches event to python user domain block device threshold event callbacks
        rLr@)r8r)r)	rr�rr�r	r!rKrLr@rrr�*_dispatchDomainEventBlockThresholdCallback�sz5virConnect._dispatchDomainEventBlockThresholdCallback)r��	recipientrr7rKrcCs.|d}|d}||t||d�||||�dS)zNDispatches event to python user domain memory failure event callbacks
        rLr@)r8r)r)rr�r#rr7rKrLr@rrr�)_dispatchDomainEventMemoryFailureCallbacksz4virConnect._dispatchDomainEventMemoryFailureCallback)r�r�r�rKrcCs,|d}|d}||t||d�|||�dS)zYDispatches event to python user domain memory device size change event callbacks
        rLr@)r8r)r)rr�r�r�rKrLr@rrr�2_dispatchDomainEventMemoryDeviceSizeChangeCallback
sz=virConnect._dispatchDomainEventMemoryDeviceSizeChangeCallback)�
callbackIDrcCsDy*tj|j|�}|dkr td��|j|=Wntk
r>YnXdS)zzRemoves a Domain Event Callback. De-registering for a
           domain callback will disable delivery of this event type rz+virConnectDomainEventDeregisterAny() failedNrO)rZ"virConnectDomainEventDeregisterAnyrfr�domainEventCallbackIDr�)rr&r9rrr�domainEventDeregisterAnysz#virConnect.domainEventDeregisterAnyrA)rOr?r�rKrcCs,|d}|d}||t||d�|||�dS)zKDispatches events to python user network lifecycle event callbacks
        rLr@)r8r)rA)rrOr?r�rKrLr@rrr�&_dispatchNetworkEventLifecycleCallbacksz1virConnect._dispatchNetworkEventLifecycleCallbackcCsDy*tj|j|�}|dkr td��|j|=Wntk
r>YnXdS)z{Removes a Network Event Callback. De-registering for a
           network callback will disable delivery of this event typerz,virConnectNetworkEventDeregisterAny() failedNrO)rZ#virConnectNetworkEventDeregisterAnyrfr�networkEventCallbackIDr�)rr&r9rrr�networkEventDeregisterAny'sz$virConnect.networkEventDeregisterAny)rO�eventIDrLr@rcCsjt|d�si|_|||d�}|dkr8tj|jd||�}ntj|j|j||�}|dkr\td��||j|<|S)zoAdds a Network Event Callback. Registering for a network
           callback will enable delivery of the eventsr*)rLrgr@Nrz*virConnectNetworkEventRegisterAny() failedrO)�hasattrr*rZ!virConnectNetworkEventRegisterAnyrfr)rrOr,rLr@rKr9rrr�networkEventRegisterAny2s

z"virConnect.networkEventRegisterAny)r�r,rLr@rcCsjt|d�si|_|||d�}|dkr8tj|jd||�}ntj|j|j||�}|dkr\td��||j|<|S)znAdds a Domain Event Callback. Registering for a domain
           callback will enable delivery of the events r')rLrgr@Nrz)virConnectDomainEventRegisterAny() failedrO)r-r'rZ virConnectDomainEventRegisterAnyrfr)rr�r,rLr@rKr9rrr�domainEventRegisterAnyAs

z!virConnect.domainEventRegisterAnyrV)�poolr?r�rKrcCs,|d}|d}||t||d�|||�dS)z[Dispatches events to python user storage pool
           lifecycle event callbacks
        rLr@)r8r)rV)rr0r?r�rKrLr@rrr�*_dispatchStoragePoolEventLifecycleCallbackPsz5virConnect._dispatchStoragePoolEventLifecycleCallback)r0rKrcCs(|d}|d}||t||d�|�dS)zYDispatches events to python user storage pool
           generic event callbacks
        rLr@)r8r)rV)rr0rKrLr@rrr�(_dispatchStoragePoolEventGenericCallbackZsz3virConnect._dispatchStoragePoolEventGenericCallbackcCsDy*tj|j|�}|dkr td��|j|=Wntk
r>YnXdS)z�Removes a Storage Pool Event Callback. De-registering for a
           storage pool callback will disable delivery of this event typerz0virConnectStoragePoolEventDeregisterAny() failedNrO)rZ'virConnectStoragePoolEventDeregisterAnyrfr�storagePoolEventCallbackIDr�)rr&r9rrr�storagePoolEventDeregisterAnydsz(virConnect.storagePoolEventDeregisterAny)r0r,rLr@rcCsjt|d�si|_|||d�}|dkr8tj|jd||�}ntj|j|j||�}|dkr\td��||j|<|S)zyAdds a Storage Pool Event Callback. Registering for a storage pool
           callback will enable delivery of the eventsr3)rLrgr@Nrz.virConnectStoragePoolEventRegisterAny() failedrO)r-r3rZ%virConnectStoragePoolEventRegisterAnyrfr)rr0r,rLr@rKr9rrr�storagePoolEventRegisterAnyos

z&virConnect.storagePoolEventRegisterAnyr�)rr?r�rKrcCs,|d}|d}||t||d�|||�dS)zZDispatches events to python user node device
           lifecycle event callbacks
        rLr@)r8r)r�)rrr?r�rKrLr@rrr�)_dispatchNodeDeviceEventLifecycleCallback~sz4virConnect._dispatchNodeDeviceEventLifecycleCallback)rrKrcCs(|d}|d}||t||d�|�dS)zXDispatches events to python user node device
           generic event callbacks
        rLr@)r8r)r�)rrrKrLr@rrr�'_dispatchNodeDeviceEventGenericCallback�sz2virConnect._dispatchNodeDeviceEventGenericCallbackcCsDy*tj|j|�}|dkr td��|j|=Wntk
r>YnXdS)z�Removes a Node Device Event Callback. De-registering for a
           node device callback will disable delivery of this event typerz/virConnectNodeDeviceEventDeregisterAny() failedNrO)rZ&virConnectNodeDeviceEventDeregisterAnyrfr�nodeDeviceEventCallbackIDr�)rr&r9rrr�nodeDeviceEventDeregisterAny�sz'virConnect.nodeDeviceEventDeregisterAny)rr,rLr@rcCsjt|d�si|_|||d�}|dkr8tj|jd||�}ntj|j|j||�}|dkr\td��||j|<|S)zwAdds a Node Device Event Callback. Registering for a node device
           callback will enable delivery of the eventsr8)rLrgr@Nrz-virConnectNodeDeviceEventRegisterAny() failedrO)r-r8rZ$virConnectNodeDeviceEventRegisterAnyrfr)rrr,rLr@rKr9rrr�nodeDeviceEventRegisterAny�s

z%virConnect.nodeDeviceEventRegisterAnyr�)�secretr?r�rKrcCs,|d}|d}||t||d�|||�dS)zJDispatches events to python user secret lifecycle event callbacks
        rLr@)r8r)r�)rr;r?r�rKrLr@rrr�%_dispatchSecretEventLifecycleCallback�sz0virConnect._dispatchSecretEventLifecycleCallback)r;rKrcCs(|d}|d}||t||d�|�dS)zHDispatches events to python user secret generic event callbacks
        rLr@)r8r)r�)rr;rKrLr@rrr�#_dispatchSecretEventGenericCallback�sz.virConnect._dispatchSecretEventGenericCallbackcCsDy*tj|j|�}|dkr td��|j|=Wntk
r>YnXdS)zyRemoves a Secret Event Callback. De-registering for a
           secret callback will disable delivery of this event typerz+virConnectSecretEventDeregisterAny() failedNrO)rZ"virConnectSecretEventDeregisterAnyrfr�secretEventCallbackIDr�)rr&r9rrr�secretEventDeregisterAny�sz#virConnect.secretEventDeregisterAny)r;r,rLr@rcCsjt|d�si|_|||d�}|dkr8tj|jd||�}ntj|j|j||�}|dkr\td��||j|<|S)zmAdds a Secret Event Callback. Registering for a secret
           callback will enable delivery of the eventsr>)rLrgr@Nrz)virConnectSecretEventRegisterAny() failedrO)r-r>rZ virConnectSecretEventRegisterAnyrfr)rr;r,rLr@rKr9rrr�secretEventRegisterAny�s

z!virConnect.secretEventRegisterAny)r7rcs0tj�j|�}|dkrtd���fdd�|D�S)z5List all domains and returns a list of domain objectsNz!virConnectListAllDomains() failedcsg|]}t�|d��qS))r8)r)r3rL)rrrr5�sz-virConnect.listAllDomains.<locals>.<listcomp>)rZvirConnectListAllDomainsrfr)rr7r9r)rr�listAllDomains�szvirConnect.listAllDomainscs0tj�j|�}|dkrtd���fdd�|D�S)z&Returns a list of storage pool objectsNz&virConnectListAllStoragePools() failedcsg|]}t�|d��qS))r8)rV)r3Zpoolptr)rrrr5�sz2virConnect.listAllStoragePools.<locals>.<listcomp>)rZvirConnectListAllStoragePoolsrfr)rr7r9r)rr�listAllStoragePools�szvirConnect.listAllStoragePoolscs0tj�j|�}|dkrtd���fdd�|D�S)z!Returns a list of network objectsNz"virConnectListAllNetworks() failedcsg|]}t�|d��qS))r8)rA)r3Znetptr)rrrr5�sz.virConnect.listAllNetworks.<locals>.<listcomp>)rZvirConnectListAllNetworksrfr)rr7r9r)rr�listAllNetworks�szvirConnect.listAllNetworksrTcs0tj�j|�}|dkrtd���fdd�|D�S)z#Returns a list of interface objectsNz$virConnectListAllInterfaces() failedcsg|]}t�|d��qS))r8)rT)r3Zifaceptr)rrrr5�sz0virConnect.listAllInterfaces.<locals>.<listcomp>)rZvirConnectListAllInterfacesrfr)rr7r9r)rr�listAllInterfaces�szvirConnect.listAllInterfacescs0tj�j|�}|dkrtd���fdd�|D�S)z*Returns a list of host node device objectsNz%virConnectListAllNodeDevices() failedcsg|]}t�|d��qS))r8)r�)r3Zdevptr)rrrr5�sz-virConnect.listAllDevices.<locals>.<listcomp>)rZvirConnectListAllNodeDevicesrfr)rr7r9r)rr�listAllDevices�szvirConnect.listAllDevicesr�cs0tj�j|�}|dkrtd���fdd�|D�S)z(Returns a list of network filter objectsNz#virConnectListAllNWFilters() failedcsg|]}t�|d��qS))r8)r�)r3�
filter_ptr)rrrr5sz/virConnect.listAllNWFilters.<locals>.<listcomp>)rZvirConnectListAllNWFiltersrfr)rr7r9r)rr�listAllNWFiltersszvirConnect.listAllNWFiltersr�cs0tj�j|�}|dkrtd���fdd�|D�S)z0Returns a list of network filter binding objectsNz*virConnectListAllNWFilterBindings() failedcsg|]}t�|d��qS))r8)r�)r3rF)rrrr5sz6virConnect.listAllNWFilterBindings.<locals>.<listcomp>)rZ!virConnectListAllNWFilterBindingsrfr)rr7r9r)rr�listAllNWFilterBindingssz"virConnect.listAllNWFilterBindingscs0tj�j|�}|dkrtd���fdd�|D�S)z Returns a list of secret objectsNz!virConnectListAllSecrets() failedcsg|]}t�|d��qS))r8)r�)r3Z
secret_ptr)rrrr5sz-virConnect.listAllSecrets.<locals>.<listcomp>)rZvirConnectListAllSecretsrfr)rr7r9r)rr�listAllSecretsszvirConnect.listAllSecrets)rrKrcCs |d}|d}||||�dS)z/Dispatches events to python user close callbackrLr@rr)rrrKrLr@rrr�_dispatchCloseCallbacksz!virConnect._dispatchCloseCallbackcCs tj|j�}|dkrtd��dS)zRemoves a close event callbackrz*virConnectUnregisterCloseCallback() failedNrO)rZ!virConnectUnregisterCloseCallbackrfr)rr9rrr�unregisterCloseCallback sz"virConnect.unregisterCloseCallbackcCs.|||d�}tj|j|�}|dkr*td��|S)z_Adds a close event callback, providing a notification
         when a connection fails / closes)rLrgr@rz(virConnectRegisterCloseCallback() failedrO)rZvirConnectRegisterCloseCallbackrfr)rrLr@rKr9rrr�registerCloseCallback&s
z virConnect.registerCloseCallback)r�r9r7rcCs2tj|j|||�}|dkr"td��t||d�}|S)a4Launch a new guest domain, based on an XML description similar
        to the one returned by virDomainGetXMLDesc()
        This function may require privileged access to the hypervisor.
        The domain is not persistent, so its definition will disappear when it
        is destroyed, or if the host is restarted (see virDomainDefineXML() to
        define persistent domains).

        @files provides an array of file descriptors which will be
        made available to the 'init' process of the guest. The file
        handles exposed to the guest will be renumbered to start
        from 3 (ie immediately following stderr). This is only
        supported for guests which use container based virtualization
        technology.

        If the VIR_DOMAIN_START_PAUSED flag is set, the guest domain
        will be started, but its CPUs will remain paused. The CPUs
        can later be manually started using virDomainResume.

        If the VIR_DOMAIN_START_AUTODESTROY flag is set, the guest
        domain will be automatically destroyed when the virConnectPtr
        object is finally released. This will also happen if the
        client application crashes / loses its connection to the
        libvirtd daemon. Any domains marked for auto destroy will
        block attempts at migration, save-to-file, or snapshots. Nz$virDomainCreateXMLWithFiles() failed)r8)rZvirDomainCreateXMLWithFilesrfrr)rr�r9r7r9r|rrr�createXMLWithFiles/s
zvirConnect.createXMLWithFiles)�statsr7rcs2tj�j||�}|dkr td���fdd�|D�S)a�Query statistics for all domains on a given connection.

        Report statistics of various parameters for a running VM according to @stats
        field. The statistics are returned as an array of structures for each queried
        domain. The structure contains an array of typed parameters containing the
        individual statistics. The typed parameter name for each statistic field
        consists of a dot-separated string containing name of the requested group
        followed by a group specific description of the statistic value.

        The statistic groups are enabled using the @stats parameter which is a
        binary-OR of enum virDomainStatsTypes. The following groups are available
        (although not necessarily implemented for each hypervisor):

        VIR_DOMAIN_STATS_STATE: Return domain state and reason for entering that
        state. The typed parameter keys are in this format:
        "state.state" - state of the VM, returned as int from virDomainState enum
        "state.reason" - reason for entering given state, returned as int from
                         virDomain*Reason enum corresponding to given state.

        Using 0 for @stats returns all stats groups supported by the given
        hypervisor.

        Specifying VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS as @flags makes
        the function return error in case some of the stat types in @stats were
        not recognized by the daemon.

        Similarly to virConnectListAllDomains, @flags can contain various flags to
        filter the list of domains to provide stats for.

        VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE selects online domains while
        VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVE selects offline ones.

        VIR_CONNECT_GET_ALL_DOMAINS_STATS_PERSISTENT and
        VIR_CONNECT_GET_ALL_DOMAINS_STATS_TRANSIENT allow to filter the list
        according to their persistence.

        To filter the list of VMs by domain state @flags can contain
        VIR_CONNECT_GET_ALL_DOMAINS_STATS_RUNNING,
        VIR_CONNECT_GET_ALL_DOMAINS_STATS_PAUSED,
        VIR_CONNECT_GET_ALL_DOMAINS_STATS_SHUTOFF and/or
        VIR_CONNECT_GET_ALL_DOMAINS_STATS_OTHER for all other states. Nz$virConnectGetAllDomainStats() failedcs$g|]}t�|dd�|df�qS)r)r8r)r)r3�elem)rrrr5|sz0virConnect.getAllDomainStats.<locals>.<listcomp>)rZvirConnectGetAllDomainStatsrfr)rrNr7r9r)rr�getAllDomainStatsNs*zvirConnect.getAllDomainStats)�domsrNr7rcsft�}x*|D]"}t|t�s"td��|j|j�qWtj�j|||�}|dkrTtd���fdd�|D�S)a" Query statistics for given domains.

        Report statistics of various parameters for a running VM according to @stats
        field. The statistics are returned as an array of structures for each queried
        domain. The structure contains an array of typed parameters containing the
        individual statistics. The typed parameter name for each statistic field
        consists of a dot-separated string containing name of the requested group
        followed by a group specific description of the statistic value.

        The statistic groups are enabled using the @stats parameter which is a
        binary-OR of enum virDomainStatsTypes. The following groups are available
        (although not necessarily implemented for each hypervisor):

        VIR_DOMAIN_STATS_STATE: Return domain state and reason for entering that
        state. The typed parameter keys are in this format:
        "state.state" - state of the VM, returned as int from virDomainState enum
        "state.reason" - reason for entering given state, returned as int from
                         virDomain*Reason enum corresponding to given state.

        Using 0 for @stats returns all stats groups supported by the given
        hypervisor.

        Specifying VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS as @flags makes
        the function return error in case some of the stat types in @stats were
        not recognized by the daemon.

        Get statistics about domains provided as a list in @doms. @stats is
        a bit field selecting requested statistics types.z(domain list contains non-domain elementsNzvirDomainListGetStats() failedcs$g|]}t�|dd�|df�qS)r)r8r)r)r3rO)rrrr5�sz1virConnect.domainListGetStats.<locals>.<listcomp>)�listrCrr�appendrfrZvirDomainListGetStats)rrQrNr7Zdomlistr�r9r)rr�domainListGetStats~s

zvirConnect.domainListGetStats)N)rrr)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)NNNNr)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)Nr)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)r)rr)rr)�r-r.r/rrjrmrortrurvrwryrzr{r}rZr~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r<r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�rhr�rr
�
BaseExceptionrr��	_DomainCBr�r
r�r1r�rr0rr�r�r�r�rrr
rrrrrrrrrrrrrrr r"r$r%r(r)r+rr.r/r1r2r4r5r6r7r9r:r<r=r?r@rrArBrCrDrErGrHrIrJrKrLrMr	rPrTrrrrr�s\
	




	


$
					&	(
*
&(	$	"	"	"	"	"	"	$
"	"	*	"	$	(	&	$	&	" &
"
"&
"
"&	"	"        	"00c@s�eZdZd+dd�Zdd�Zdd�Zdd	�Zd,dd�Zd
d�Zd-dd�Z	dd�Z
d.dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd/d)d*�ZdS)0r�NcCs.||_t|�jdkr$tdt|���||_dS)Nrbrcz&Expected a wrapped C Object but got %s)rbrc)rdrer-rrf)rrgr8rrrr�szvirNodeDevice.__init__cCs |jdk	rtj|j�d|_dS)N)rfrZvirNodeDeviceFree)rrrrrh�s
zvirNodeDevice.__del__cCs|jS)N)rd)rrrrri�szvirNodeDevice.connectcCstj|j�S)z"Get C pointer to underlying object)rZvirNodeDevice_pointerrf)rrrrrj�szvirNodeDevice.c_pointerrcCs"tj|j|�}|dkrtd��|S)zDFetch an XML document describing all aspects of
        the device. Nz virNodeDeviceGetXMLDesc() failed)rZvirNodeDeviceGetXMLDescrfr)rr7r9rrrro�szvirNodeDevice.XMLDesccCs tj|j�}|dkrtd��|S)z.Extract the autostart flag for a node device. rz"virNodeDeviceGetAutostart() failedrO)rZvirNodeDeviceGetAutostartrfr)rr9rrrr{�szvirNodeDevice.autostartcCs"tj|j|�}|dkrtd��|S)zStart a defined node device: rzvirNodeDeviceCreate() failedrO)rZvirNodeDeviceCreaterfr)rr7r9rrrr��szvirNodeDevice.createcCs tj|j�}|dkrtd��|S)z�Destroy the device object. The virtual device (only works for vHBA
        currently) is removed from the host operating system.  This function
        may require privileged access. rzvirNodeDeviceDestroy() failedrO)rZvirNodeDeviceDestroyrfr)rr9rrrr��szvirNodeDevice.destroycCs$tj|j||�}|dkr td��|S)aNDetach the node device from the node itself so that it may be
        assigned to a guest domain.
        
        Depending on the hypervisor, this may involve operations such as
        unbinding any device drivers from the device, binding the device to
        a dummy device driver and resetting the device. Different backend
        drivers expect the device to be bound to different dummy
        devices. For example, QEMU's "kvm" backend driver (the default)
        expects the device to be bound to "pci-stub", but its "vfio"
        backend driver expects the device to be bound to "vfio-pci".
        
        If the device is currently in use by the node, this method may
        fail.
        
        Once the device is not assigned to any guest, it may be re-attached
        to the node using the virNodeDeviceReAttach() method. rz!virNodeDeviceDetachFlags() failedrO)rZvirNodeDeviceDetachFlagsrfr)rZ
driverNamer7r9rrr�detachFlags�szvirNodeDevice.detachFlagscCs tj|j�}|dkrtd��|S)a0Detach the node device from the node itself so that it may be
        assigned to a guest domain.
        
        Depending on the hypervisor, this may involve operations such
        as unbinding any device drivers from the device, binding the
        device to a dummy device driver and resetting the device.
        
        If the device is currently in use by the node, this method may
        fail.
        
        Once the device is not assigned to any guest, it may be re-attached
        to the node using the virNodeDeviceReattach() method.
        
        If the caller needs control over which backend driver will be used
        during PCI device assignment (to use something other than the
        default, for example VFIO), the newer virNodeDeviceDetachFlags()
        API should be used instead. rzvirNodeDeviceDettach() failedrO)rZvirNodeDeviceDettachrfr)rr9rrr�dettach�szvirNodeDevice.dettachcCs tj|j�}|dkrtd��|S)z1Determine if the node device is currently active rzvirNodeDeviceIsActive() failedrO)rZvirNodeDeviceIsActiverfr)rr9rrrr�szvirNodeDevice.isActivecCs tj|j�}|dkrtd��|S)zxDetermine if the node device has a persistent configuration
        which means it will still exist after shutting down rz"virNodeDeviceIsPersistent() failedrO)rZvirNodeDeviceIsPersistentrfr)rr9rrrr�szvirNodeDevice.isPersistentcCs tj|j�}|dkrtd��|S)z$list the node device's capabilities NzvirNodeDeviceListCaps() failed)rZvirNodeDeviceListCapsrfr)rr9rrr�listCaps&szvirNodeDevice.listCapscCstj|j�}|S)zJust return the device name )rZvirNodeDeviceGetNamerf)rr9rrrr;1szvirNodeDevice.namecCs tj|j�}|dkrtd��|S)zAAccessor for the number of capabilities supported by the device. rzvirNodeDeviceNumOfCaps() failedrO)rZvirNodeDeviceNumOfCapsrfr)rr9rrr�	numOfCaps6szvirNodeDevice.numOfCapscCstj|j�}|S)z&Accessor for the parent of the device )rZvirNodeDeviceGetParentrf)rr9rrr�parent=szvirNodeDevice.parentcCs tj|j�}|dkrtd��|S)a�Re-attach a previously detached node device to the node so that it
        may be used by the node again.
        
        Depending on the hypervisor, this may involve operations such
        as resetting the device, unbinding it from a dummy device driver
        and binding it to its appropriate driver.
        
        If the device is currently in use by a guest, this method may fail. rzvirNodeDeviceReAttach() failedrO)rZvirNodeDeviceReAttachrfr)rr9rrr�reAttachBs	zvirNodeDevice.reAttachcCs tj|j�}|dkrtd��|S)a�Reset a previously detached node device to the node before or
        after assigning it to a guest.
        
        The exact reset semantics depends on the hypervisor and device
        type but, for example, KVM will attempt to reset PCI devices with
        a Function Level Reset, Secondary Bus Reset or a Power Management
        D-State reset.
        
        If the reset will affect other devices which are currently in use,
        this function may fail. rzvirNodeDeviceReset() failedrO)rZvirNodeDeviceResetrfr)rr9rrrr�PszvirNodeDevice.resetcCs"tj|j|�}|dkrtd��|S)z�Configure the node device to be automatically started when the host machine
        boots or the parent device becomes available. rz"virNodeDeviceSetAutostart() failedrO)rZvirNodeDeviceSetAutostartrfr)rr{r9rrrr`szvirNodeDevice.setAutostartcCs"tj|j|�}|dkrtd��|S)z�Undefine the device object. The virtual device  is removed from the host
        operating system.  This function may require privileged access. rzvirNodeDeviceUndefine() failedrO)rZvirNodeDeviceUndefinerfr)rr7r9rrrr-hszvirNodeDevice.undefine)N)r)r)r)r)r-r.r/rrhrirjror{r�r�rWrXr�r�rYr;rZr[r\r�rr-rrrrr��s(


	
r�c@steZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zddd�Z	ddd�Z
dd�Zdd�Zdd�Z
ddd�ZdS)r�NcCs.||_t|�jdkr$tdt|���||_dS)Nrbrcz&Expected a wrapped C Object but got %s)rbrc)rdrer-rrf)rrgr8rrrrqszvirSecret.__init__cCs |jdk	rtj|j�d|_dS)N)rfrZ
virSecretFree)rrrrrhws
zvirSecret.__del__cCs|jS)N)rd)rrrrri|szvirSecret.connectcCstj|j�S)z"Get C pointer to underlying object)rZvirSecret_pointerrf)rrrrrjszvirSecret.c_pointercCs tj|j�}|dkrtd��|S)z0Extract the UUID unique Identifier of a secret. NzvirSecretGetUUID() failed)rZvirSecretGetUUIDrfr)rr9rrrrm�szvirSecret.UUIDcCs tj|j�}|dkrtd��|S)z4Fetch globally unique ID of the secret as a string. NzvirSecretGetUUIDString() failed)rZvirSecretGetUUIDStringrfr)rr9rrrrn�szvirSecret.UUIDStringrcCs"tj|j|�}|dkrtd��|S)z=Fetches an XML document describing attributes of the secret. NzvirSecretGetXMLDesc() failed)rZvirSecretGetXMLDescrfr)rr7r9rrrro�szvirSecret.XMLDesccCs$tj|j||�}|dkr td��|S)z"Associates a value with a secret. rzvirSecretSetValue() failedrO)rZvirSecretSetValuerfr)r�valuer7r9rrr�setValue�szvirSecret.setValuecCs tj|j�}|dkrtd��|S)z^Deletes the specified secret.  This does not free the associated
        virSecretPtr object. rzvirSecretUndefine() failedrO)rZvirSecretUndefinerfr)rr9rrrr-�szvirSecret.undefinecCstj|j�}|S)a�Get the unique identifier of the object with which this
        secret is to be used. The format of the identifier is
        dependent on the usage type of the secret. For a secret
        with a usage type of VIR_SECRET_USAGE_TYPE_VOLUME the
        identifier will be a fully qualified path name. The
        identifiers are intended to be unique within the set of
        all secrets sharing the same usage type. ie, there shall
        only ever be one secret for each volume path. )rZvirSecretGetUsageIDrf)rr9rrrr��s	zvirSecret.usageIDcCstj|j�}|S)a4Get the type of object which uses this secret. The returned
        value is one of the constants defined in the virSecretUsageType
        enumeration. More values may be added to this enumeration in
        the future, so callers should expect to see usage types they
        do not explicitly know about. )rZvirSecretGetUsageTyperf)rr9rrrr��szvirSecret.usageTypecCs"tj|j|�}|dkrtd��|S)z,Fetches the value associated with a secret. NzvirSecretGetValue() failed)rZvirSecretGetValuerfr)rr7r9rrrr]�szvirSecret.value)N)r)r)r)r-r.r/rrhrirjrmrnror^r-r�r�r]rrrrr�ps



r�c@sXeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zddd�Z	dd�Z
dd�ZdS)r�NcCs.||_t|�jdkr$tdt|���||_dS)Nrbrcz&Expected a wrapped C Object but got %s)rbrc)rdrer-rrf)rrgr8rrrr�szvirNWFilter.__init__cCs |jdk	rtj|j�d|_dS)N)rfrZvirNWFilterFree)rrrrrh�s
zvirNWFilter.__del__cCs|jS)N)rd)rrrrri�szvirNWFilter.connectcCstj|j�S)z"Get C pointer to underlying object)rZvirNWFilter_pointerrf)rrrrrj�szvirNWFilter.c_pointercCs tj|j�}|dkrtd��|S)z8Extract the UUID unique Identifier of a network filter. NzvirNWFilterGetUUID() failed)rZvirNWFilterGetUUIDrfr)rr9rrrrm�szvirNWFilter.UUIDcCs tj|j�}|dkrtd��|S)z<Fetch globally unique ID of the network filter as a string. Nz!virNWFilterGetUUIDString() failed)rZvirNWFilterGetUUIDStringrfr)rr9rrrrn�szvirNWFilter.UUIDStringrcCs"tj|j|�}|dkrtd��|S)z�Provide an XML description of the network filter. The description may be
        reused later to redefine the network filter with virNWFilterCreateXML(). NzvirNWFilterGetXMLDesc() failed)rZvirNWFilterGetXMLDescrfr)rr7r9rrrroszvirNWFilter.XMLDesccCstj|j�}|S)z+Get the public name for the network filter )rZvirNWFilterGetNamerf)rr9rrrr;szvirNWFilter.namecCs tj|j�}|dkrtd��|S)z�Undefine the nwfilter object. This call will not succeed if
        a running VM is referencing the filter. This does not free the
        associated virNWFilterPtr object. rzvirNWFilterUndefine() failedrO)rZvirNWFilterUndefinerfr)rr9rrrr-
szvirNWFilter.undefine)N)r)r-r.r/rrhrirjrmrnror;r-rrrrr��s

r�c@sPeZdZddd�Zdd�Zdd�Zdd	�Zddd�Zd
d�Zdd�Z	dd�Z
dS)r�NcCs.||_t|�jdkr$tdt|���||_dS)Nrbrcz&Expected a wrapped C Object but got %s)rbrc)rdrer-rrf)rrgr8rrrrszvirNWFilterBinding.__init__cCs |jdk	rtj|j�d|_dS)N)rfrZvirNWFilterBindingFree)rrrrrhs
zvirNWFilterBinding.__del__cCs|jS)N)rd)rrrrri"szvirNWFilterBinding.connectcCstj|j�S)z"Get C pointer to underlying object)rZvirNWFilterBinding_pointerrf)rrrrrj%szvirNWFilterBinding.c_pointerrcCs"tj|j|�}|dkrtd��|S)z�Provide an XML description of the network filter. The description may be
        reused later to redefine the network filter with virNWFilterCreateXML(). Nz%virNWFilterBindingGetXMLDesc() failed)rZvirNWFilterBindingGetXMLDescrfr)rr7r9rrrro-szvirNWFilterBinding.XMLDesccCs tj|j�}|dkrtd��|S)a�Delete the binding object. This does not free the
        associated virNWFilterBindingPtr object. This API
        may be used to remove the network port binding filter
        currently in use for the guest while the guest is
        running without needing to restart the guest. Restoring
        the network port binding filter for the running guest
        would be accomplished by using virNWFilterBindingCreateXML. rz!virNWFilterBindingDelete() failedrO)rZvirNWFilterBindingDeleterfr)rr9rrrrQ5szvirNWFilterBinding.deletecCstj|j�}|S)z3Get the filter name for the network filter binding )rZvirNWFilterBindingGetFilterNamerf)rr9rrr�
filterNameBszvirNWFilterBinding.filterNamecCstj|j�}|S)z5Get the port dev name for the network filter binding )rZvirNWFilterBindingGetPortDevrf)rr9rrr�portDevGszvirNWFilterBinding.portDev)N)r)r-r.r/rrhrirjrorQr_r`rrrrr�s


r�c@s�eZdZd4dd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�dd�Z
eee
efed�dd�Zeedeegdfedd�dd�Zedeegefedd�dd�Zedeegefedd�dd�Zeed�dd �Zeed!�d"d#�Zd5eed%�d&d'�Zd6eeed(�d)d*�Zd7eeeeefd+�d,d-�Zedeegeeeffedeegeefedd.�d/d0�Zedeegeeeffedegeeeffedeegefedd1�d2d3�Z dS)8r�NcCs.||_t|�jdkr$tdt|���||_dS)Nrbrcz&Expected a wrapped C Object but got %s)rbrc)rdrer-rrf)rrgr8rrrrMszvirStream.__init__cCs|jS)N)rd)rrrrriSszvirStream.connectcCstj|j�S)z"Get C pointer to underlying object)rZvirStream_pointerrf)rrrrrjVszvirStream.c_pointercCs tj|j�}|dkrtd��|S)a�Request that the in progress data transfer be cancelled
        abnormally before the end of the stream has been reached.
        For output streams this can be used to inform the driver
        that the stream is being terminated early. For input
        streams this can be used to inform the driver that it
        should stop sending data.
        
        If the stream is non-blocking, any callback must be removed
        beforehand. rzvirStreamAbort() failedrO)rZvirStreamAbortrfr)rr9rrr�abort^s
zvirStream.abortcCs tj|j�}|dkrtd��|S)z)Remove an event callback from the stream rz%virStreamEventRemoveCallback() failedrO)r�virStreamEventRemoveCallbackrfr)rr9rrr�eventRemoveCallbackmszvirStream.eventRemoveCallbackcCs"tj|j|�}|dkrtd��|S)aChanges the set of events to monitor for a stream. This allows
        for event notification to be changed without having to
        unregister & register the callback completely. This method
        is guaranteed to succeed if a callback is already registered rz%virStreamEventUpdateCallback() failedrO)rZvirStreamEventUpdateCallbackrfr)rrJr9rrr�eventUpdateCallbacktszvirStream.eventUpdateCallbackcCs tj|j�}|dkrtd��|S)a,Indicate that there is no further data to be transmitted
        on the stream. For output streams this should be called once
        all data has been written. For input streams this should be
        called once virStreamRecv returns end-of-file.
        
        This method is a synchronization point for all asynchronous
        errors, so if this returns a success code the application can
        be sure that all data has been successfully processed.
        
        If the stream is non-blocking, any callback must be removed
        beforehand. rzvirStreamFinish() failedrO)rZvirStreamFinishrfr)rr9rrr�finish~szvirStream.finish)rcCsLy|jrtj|j�Wntk
r*YnX|jdk	rBtj|j�d|_dS)N)rLrrbrfr�Z
virStreamFree)rrrrrh�s
zvirStream.__del__)rJrKrcCs |d}|d}||||�dS)zK
        Dispatches events to python user's stream event callbacks
        rLr@rr)rrJrKrLr@rrr�_dispatchStreamEventCallback�sz&virStream._dispatchStreamEventCallback)rJrLr@rcCs6||_|||d�}tj|j||�}|dkr2td��dS)N)r�rLr@rz"virStreamEventAddCallback() failedrO)rLrZvirStreamEventAddCallbackrfr)rrJrLr@rKr9rrr�eventAddCallback�s
zvirStream.eventAddCallback)�handlerr@rcCs�x�|jtj�}|dkrtd��t|�dkr,Py.||||�}t|t�rX|dkrXtd|��Wqtk
r�y|j	�Wnt
k
r�YnX�YqXqWdS)a�Receive the entire data stream, sending the data to the
        requested data sink. This is simply a convenient alternative
        to virStreamRecv, for apps that do blocking-I/O.

        A hypothetical handler function looks like:

            def handler(stream, # virStream instance
                        buf,    # string containing received data
                        opaque): # extra data passed to recvAll as opaque
                fd = opaque
                return os.write(fd, buf)
        rz*cannot use recvAll with nonblocking streamrzrecvAll handler returned %dN���)�recvrXrjrr�rCr1�RuntimeErrorrUrar)rrhr@�gotr9rrr�recvAll�s 
zvirStream.recvAllcCsvxpy||tj|�}Wn8tk
rLy|j�Wntk
rDYnX�YnX|sTP|j|�}|dkrtd��qWdS)a�
        Send the entire data stream, reading the data from the
        requested data source. This is simply a convenient alternative
        to virStreamSend, for apps that do blocking-I/O.

        A hypothetical handler function looks like:

            def handler(stream, # virStream instance
                        nbytes, # int amt of data to read
                        opaque): # extra data passed to recvAll as opaque
                fd = opaque
                return os.read(fd, nbytes)
        rz*cannot use sendAll with nonblocking streamNri)rXrjrUrar�sendr)rrhr@rlr9rrr�sendAll�s
zvirStream.sendAll)�nbytesrcCs"tj|j|�}|dkrtd��|S)a�Reads a series of bytes from the stream. This method may
        block the calling application for an arbitrary amount
        of time.

        Errors are not guaranteed to be reported synchronously
        with the call, but may instead be delayed until a
        subsequent call.

        On success, the received data is returned. On failure, an
        exception is raised. If the stream is a NONBLOCK stream and
        the request would block, integer -2 is returned.
        NzvirStreamRecv() failed)rZ
virStreamRecvrfr)rrpr9rrrrj�s
zvirStream.recv)�datarcCs"tj|j|�}|dkrtd��|S)aWrite a series of bytes to the stream. This method may
        block the calling application for an arbitrary amount
        of time. Once an application has finished sending data
        it should call virStreamFinish to wait for successful
        confirmation from the driver, or detect any error

        This method may not be used if a stream source has been
        registered

        Errors are not guaranteed to be reported synchronously
        with the call, but may instead be delayed until a
        subsequent call.
        rzvirStreamSend() failedrO)rZ
virStreamSendrfr)rrqr9rrrrnszvirStream.sendr)r7rcCs"tj|j|�}|dkrtd��|S)z�This method is used to determine the length in bytes
        of the empty space to be created in a stream's target
        file when uploading or downloading sparsely populated
        files. This is the counterpart to sendHole.
        NzvirStreamRecvHole() failed)rZvirStreamRecvHolerfr)rr7r9rrr�recvHoleszvirStream.recvHole)rar7rcCs$tj|j||�}|dkr td��|S)a"Rather than transmitting empty file space, this method
        directs the stream target to create length bytes of empty
        space.  This method would be used when uploading or
        downloading sparsely populated files to avoid the
        needless copy of empty file space.
        rzvirStreamSendHole() failedrO)rZvirStreamSendHolerfr)rrar7r9rrr�sendHoleszvirStream.sendHole)rpr7rcCs$tj|j||�}|dkr td��|S)a Reads a series of bytes from the stream. This method may
        block the calling application for an arbitrary amount
        of time. This is just like recv except it has flags
        argument.

        Errors are not guaranteed to be reported synchronously
        with the call, but may instead be delayed until a
        subsequent call.

        On success, the received data is returned. On failure, an
        exception is raised. If the stream is a NONBLOCK stream and
        the request would block, integer -2 is returned.
        NzvirStreamRecvFlags() failed)rZvirStreamRecvFlagsrfr)rrpr7r9rrr�	recvFlags*szvirStream.recvFlags)rh�holeHandlerr@rc	Cs�x�tj}|j|t�}|d	kr&td��n�|d
kr�|j�}|dkrN|j�td��||||�}t|t	�r|dkr|j�td|��qn*t|t	�r�t
|��nt|t�s�tt
|���t|�dkr�P||||�}t|t	�r|dkr|j�td|��qWdS)a1Receive the entire data stream, sending the data to
        the requested data sink handler and calling the skip
        holeHandler to generate holes for sparse stream targets.
        This is simply a convenient alternative to recvFlags, for
        apps that do blocking-I/O and want to preserve sparseness.

        Hypothetical callbacks can look like this:

            def handler(stream, # virStream instance
                        buf,    # string containing received data
                        opaque): # extra data passed to sparseRecvAll as opaque
                fd = opaque
                return os.write(fd, buf)

            def holeHandler(stream, # virStream instance
                            length, # number of bytes to skip
                            opaque): # extra data passed to sparseRecvAll as opaque
                fd = opaque
                cur = os.lseek(fd, length, os.SEEK_CUR)
                return os.ftruncate(fd, cur) # take this extra step to
                                             # actually allocate the hole
        rz0cannot use sparseRecvAll with nonblocking streamr!NzrecvHole handler failedrzholeHandler handler returned %dz!sparseRecvAll handler returned %dri���)rXrjrt�VIR_STREAM_RECV_STOP_AT_HOLErrrrarkrCr1�
ValueError�bytes�	TypeErrorrer�)	rrhrur@�wantrlraZret_holeZret_datarrr�
sparseRecvAll=s2



zvirStream.sparseRecvAll)rhru�skipHandlerr@rc
Cs�x�|||�\}}|rF|dkrF|j|�dks<||||�dkr|j�qtj}||krX|}||||�}t|t�r�|dkr�|j�td|��|s�Pt|t�s�t�|j	|�}	|	dkrt
d��qWdS)aSend the entire data stream, reading the data from the
        requested data source. This is simply a convenient
        alternative to virStreamSend, for apps that do
        blocking-I/O and want to preserve sparseness.

        Hypothetical callbacks can look like this:

            def handler(stream, # virStream instance
                        nbytes, # int amt of data to read
                        opaque): # extra data passed to sparseSendAll as opaque
                fd = opaque
                return os.read(fd, nbytes)

            def holeHandler(stream, # virStream instance
                            opaque): # extra data passed to sparseSendAll as opaque
                fd = opaque
                cur = os.lseek(fd, 0, os.SEEK_CUR)
                # ... find out current section and its boundaries
                # and set inData = True/False and sectionLen correspondingly
                os.lseek(fd, cur, os.SEEK_SET)
                return [inData, sectionLen]

            def skipHandler(stream, # virStream instance
                            length, # number of bytes to skip
                            opaque): # extra data passed to sparseSendAll as opaque
                fd = opaque
                return os.lseek(fd, length, os.SEEK_CUR)

        rz!sparseSendAll handler returned %drz0cannot use sparseSendAll with nonblocking streamNri)rsrarXrjrCr1rkryrErnr)
rrhrur}r@ZinDataZ
sectionLenr{rlr9rrr�
sparseSendAllqs(
zvirStream.sparseSendAll)N)r)r)r)!r-r.r/rrirjrarcrdrerhr1rr0rrfrr
rgryrmrorjrnrrrsrrtrr|r	�boolr~rrrrr�Ls&


"    <4r�c@s�eZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zd d
d�Zdd�Z	d!dd�Z
d"dd�Zdd�dd�Zdd�dd�Z
d#eedd�dd�ZdS)$r�NcCs8||_|j�|_t|�jdkr.tdt|���||_dS)Nrbrcz&Expected a wrapped C Object but got %s)rbrc)�_domrirdrer-rrf)rr�r8rrrr�s

zvirDomainCheckpoint.__init__cCs |jdk	rtj|j�d|_dS)N)rfrZvirDomainCheckpointFree)rrrrrh�s
zvirDomainCheckpoint.__del__cCs|jS)N)rd)rrrrri�szvirDomainCheckpoint.connectcCs|jS)N)r�)rrrr�domain�szvirDomainCheckpoint.domaincCstj|j�S)z"Get C pointer to underlying object)rZvirDomainCheckpoint_pointerrf)rrrrrj�szvirDomainCheckpoint.c_pointerrcCs"tj|j|�}|dkrtd��|S)a�Removes a checkpoint from the domain.
        
        When removing a checkpoint, the record of which portions of the
        disk were dirtied after the checkpoint will be merged into the
        record tracked by the parent checkpoint, if any.
        
        If @flags includes VIR_DOMAIN_CHECKPOINT_DELETE_CHILDREN, then any
        descendant checkpoints are also deleted. If @flags includes
        VIR_DOMAIN_CHECKPOINT_DELETE_CHILDREN_ONLY, then any descendant
        checkepoints are deleted, but this checkpoint remains. These two
        flags are mutually exclusive.
        
        If @flags includes VIR_DOMAIN_CHECKPOINT_DELETE_METADATA_ONLY, then
        any checkpoint metadata tracked by libvirt is removed while keeping
        the checkpoint contents intact; if a hypervisor does not require
        any libvirt metadata to track checkpoints, then this flag is
        silently ignored. rz"virDomainCheckpointDelete() failedrO)rZvirDomainCheckpointDeleterfr)rr7r9rrrrQ�szvirDomainCheckpoint.deletecCs tj|j�}|dkrtd��|S)z(Get the public name for that checkpoint Nz#virDomainCheckpointGetName() failed)rZvirDomainCheckpointGetNamerfr)rr9rrr�getName�szvirDomainCheckpoint.getNamecCs0tj|j|�}|dkrtd��t|j|d�}|S)z�Get the parent checkpoint for @checkpoint, if any.
        
        virDomainCheckpointFree should be used to free the resources after the
        checkpoint object is no longer needed. Nz%virDomainCheckpointGetParent() failed)r8)rZvirDomainCheckpointGetParentrfrr�r�)rr7r9Z_virDomainCheckpoint__tmprrr�	getParent�s
zvirDomainCheckpoint.getParentcCs"tj|j|�}|dkrtd��|S)a�Provide an XML description of the domain checkpoint.
        
        No security-sensitive data will be included unless @flags contains
        VIR_DOMAIN_CHECKPOINT_XML_SECURE; this flag is rejected on read-only
        connections.
        
        Normally, the XML description includes an element giving a full
        description of the domain at the time the checkpoint was created; to
        reduce parsing time, it will be suppressed when @flags contains
        VIR_DOMAIN_CHECKPOINT_XML_NO_DOMAIN.
        
        By default, the XML description contains only static information that
        does not change over time. However, when @flags contains
        VIR_DOMAIN_CHECKPOINT_XML_SIZE, each <disk> listing adds an additional
        attribute that shows an estimate of the current size in bytes that
        have been dirtied between the time the checkpoint was created and the
        current point in time. Note that updating the size may be expensive and
        data will be inaccurate once guest OS writes to the disk. Also note that
        hypervisors may require that the domain associated with @checkpoint is
        running when VIR_DOMAIN_CHECKPOINT_XML_SIZE is used. Nz&virDomainCheckpointGetXMLDesc() failed)rZvirDomainCheckpointGetXMLDescrfr)rr7r9rrr�
getXMLDesc�szvirDomainCheckpoint.getXMLDescr)rcCs|j�S)zIGet the connection that owns the domain that a checkpoint was created for)ri)rrrr�
getConnect
szvirDomainCheckpoint.getConnectrcCs|j�S)z0Get the domain that a checkpoint was created for)r�)rrrr�	getDomainszvirDomainCheckpoint.getDomain)r7rcs0tj�j|�}|dkrtd���fdd�|D�S)zCList all child checkpoints and returns a list of checkpoint objectsNz+virDomainCheckpointListAllChildren() failedcsg|]}t�j�|d��qS))r8)r�r�)r3r7)rrrr5sz7virDomainCheckpoint.listAllChildren.<locals>.<listcomp>)rZ"virDomainCheckpointListAllChildrenrfr)rr7r9r)rr�listAllChildrensz#virDomainCheckpoint.listAllChildren)N)r)r)r)r)r-r.r/rrhrir�rjrQr�r�r�r�r�r1rr�rrrrr��s



r�c@s�eZdZd'dd�Zdd�Zdd�Zdd	�Zd
d�Zd(d
d�Zdd�Z	d)dd�Z
d*dd�Zd+dd�Zd,dd�Z
d-dd�Zd.dd�Zdd�dd �Zd!d�d"d#�Zd/eedd$�d%d&�ZdS)0r%NcCs8||_|j�|_t|�jdkr.tdt|���||_dS)Nrbrcz&Expected a wrapped C Object but got %s)rbrc)r�rirdrer-rrf)rr�r8rrrrs

zvirDomainSnapshot.__init__cCs |jdk	rtj|j�d|_dS)N)rfrZvirDomainSnapshotFree)rrrrrh"s
zvirDomainSnapshot.__del__cCs|jS)N)rd)rrrrri'szvirDomainSnapshot.connectcCs|jS)N)r�)rrrrr�*szvirDomainSnapshot.domaincCstj|j�S)z"Get C pointer to underlying object)rZvirDomainSnapshot_pointerrf)rrrrrj-szvirDomainSnapshot.c_pointerrcCs"tj|j|�}|dkrtd��|S)a?Delete the snapshot.
        
        If @flags is 0, then just this snapshot is deleted, and changes
        from this snapshot are automatically merged into children
        snapshots.  If @flags includes VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN,
        then this snapshot and any descendant snapshots are deleted.  If
        @flags includes VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY, then any
        descendant snapshots are deleted, but this snapshot remains.  These
        two flags are mutually exclusive.
        
        If @flags includes VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY, then
        any snapshot metadata tracked by libvirt is removed while keeping
        the snapshot contents intact; if a hypervisor does not require any
        libvirt metadata to track snapshots, then this flag is silently
        ignored. rz virDomainSnapshotDelete() failedrO)rZvirDomainSnapshotDeleterfr)rr7r9rrrrQ5szvirDomainSnapshot.deletecCs tj|j�}|dkrtd��|S)z&Get the public name for that snapshot Nz!virDomainSnapshotGetName() failed)rZvirDomainSnapshotGetNamerfr)rr9rrrr�JszvirDomainSnapshot.getNamecCs0tj|j|�}|dkrtd��t|j|d�}|S)z�Get the parent snapshot for @snapshot, if any.
        
        virDomainSnapshotFree should be used to free the resources after the
        snapshot object is no longer needed. Nz#virDomainSnapshotGetParent() failed)r8)rZvirDomainSnapshotGetParentrfrr%r�)rr7r9Z_virDomainSnapshot__tmprrrr�Qs
zvirDomainSnapshot.getParentcCs"tj|j|�}|dkrtd��|S)aProvide an XML description of the domain snapshot, with a top-level
        element of <domainsnapshot>.
        
        No security-sensitive data will be included unless @flags contains
        VIR_DOMAIN_SNAPSHOT_XML_SECURE; this flag is rejected on read-only
        connections. Nz$virDomainSnapshotGetXMLDesc() failed)rZvirDomainSnapshotGetXMLDescrfr)rr7r9rrrr�\szvirDomainSnapshot.getXMLDesccCs"tj|j|�}|dkrtd��|S)z{Determine if the given snapshot is associated with libvirt metadata
        that would prevent the deletion of the domain. rz%virDomainSnapshotHasMetadata() failedrO)rZvirDomainSnapshotHasMetadatarfr)rr7r9rrr�hasMetadatahszvirDomainSnapshot.hasMetadatacCs"tj|j|�}|dkrtd��|S)zsDetermine if the given snapshot is the domain's current snapshot.  See
        also virDomainHasCurrentSnapshot(). rz#virDomainSnapshotIsCurrent() failedrO)rZvirDomainSnapshotIsCurrentrfr)rr7r9rrr�	isCurrentpszvirDomainSnapshot.isCurrentcCs"tj|j|�}|dkrtd��|S)z@collect the list of child snapshot names for the given snapshot Nz+virDomainSnapshotListChildrenNames() failed)rZ"virDomainSnapshotListChildrenNamesrfr)rr7r9rrr�listChildrenNames|sz#virDomainSnapshot.listChildrenNamescCs"tj|j|�}|dkrtd��|S)acProvides the number of child snapshots for this domain snapshot.
        
        This function will accept VIR_DOMAIN_SNAPSHOT_LIST_TOPOLOGICAL in
        @flags only if virDomainSnapshotListChildrenNames() can honor it,
        although the flag has no other effect here.
        
        By default, this command covers only direct children. It is also
        possible to expand things to cover all descendants, when @flags
        includes VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS. Additional filters
        are provided via the same @flags values as documented in
        virDomainSnapshotListAllChildren(). rz%virDomainSnapshotNumChildren() failedrO)rZvirDomainSnapshotNumChildrenrfr)rr7r9rrr�numChildren�szvirDomainSnapshot.numChildrenr)rcCs|j�S)zGGet the connection that owns the domain that a snapshot was created for)ri)rrrrr��szvirDomainSnapshot.getConnectrcCs|j�S)z.Get the domain that a snapshot was created for)r�)rrrrr��szvirDomainSnapshot.getDomain)r7rcs0tj�j|�}|dkrtd���fdd�|D�S)z?List all child snapshots and returns a list of snapshot objectsNz)virDomainSnapshotListAllChildren() failedcsg|]}t�j�|d��qS))r8)r%r�)r3r4)rrrr5�sz5virDomainSnapshot.listAllChildren.<locals>.<listcomp>)rZ virDomainSnapshotListAllChildrenrfr)rr7r9r)rrr��sz!virDomainSnapshot.listAllChildren)N)r)r)r)r)r)r)r)r)r-r.r/rrhrir�rjrQr�r�r�r�r�r�r�r�r�r1rr�rrrrr%s 







r%rrr!r#r%r'r)r+�	�� �@�i i@l�iiiii i@i�iiiiii �
���
������������������!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�nz
group-namez
process-idzprocess-timezsasl-user-namezselinux-contextz
unix-group-idzunix-user-idz	user-namezx509-distinguished-namezinbound.averagez
inbound.burstz
inbound.floorzinbound.peakzoutbound.averagezoutbound.burstz
outbound.peakZdevice_read_bytes_secZdevice_read_iops_secZ
device_weightZdevice_write_bytes_secZdevice_write_iops_secZweightr�zbuf-sizeZgranularityZ
group_nameZread_bytes_secZread_bytes_sec_maxZread_bytes_sec_max_lengthZ
read_iops_secZread_iops_sec_maxZread_iops_sec_max_lengthZ
size_iops_secZtotal_bytes_secZtotal_bytes_sec_maxZtotal_bytes_sec_max_lengthZtotal_iops_secZtotal_iops_sec_maxZtotal_iops_sec_max_lengthZwrite_bytes_secZwrite_bytes_sec_maxZwrite_bytes_sec_max_lengthZwrite_iops_secZwrite_iops_sec_maxZwrite_iops_sec_max_lengthZerrsZflush_operationsZflush_total_timesZrd_bytesZ
rd_operationsZrd_total_timesZwr_bytesZ
wr_operationsZwr_total_timesZcpu_timeZsystem_timeZ	user_timeZ	vcpu_timeZ	poll_growZpoll_max_nsZpoll_shrinkZauto_converge_throttleZcompression_bytesZcompression_cacheZcompression_cache_missesZcompression_overflowZcompression_pagesZdata_processedZdata_remainingZ
data_totalZdisk_bpsZdisk_processedZdisk_remainingZdisk_temp_totalZdisk_temp_usedZ
disk_totalr�Zdowntime_net�errmsgZ
memory_bpsZmemory_constantZmemory_dirty_rateZmemory_iterationZ
memory_normalZmemory_normal_bytesZmemory_page_sizeZmemory_postcopy_requestsZmemory_processedZmemory_remainingZmemory_totalZ	operationZ
setup_time�successZtime_elapsedZtime_elapsed_netZtime_remainingz
sev-api-majorz
sev-api-minorzsev-build-idzsev-measurementz
sev-policyz
sev-secretzsev-secret-headerzsev-secret-set-addressZ
hard_limitZ
min_guaranteeZ
soft_limitZswap_hard_limitZ	numa_modeZnuma_nodesetr�Z
cpu_sharesZemulator_periodZemulator_quotaZ
global_periodZglobal_quotaZiothread_periodZiothread_quota�limitZreservationZsharesZvcpu_periodZ
vcpu_quotazblkdeviotune.diskzblkdeviotune.group_namezblkdeviotune.read_bytes_seczblkdeviotune.read_bytes_sec_maxz&blkdeviotune.read_bytes_sec_max_lengthzblkdeviotune.read_iops_seczblkdeviotune.read_iops_sec_maxz%blkdeviotune.read_iops_sec_max_lengthzblkdeviotune.size_iops_seczblkdeviotune.total_bytes_secz blkdeviotune.total_bytes_sec_maxz'blkdeviotune.total_bytes_sec_max_lengthzblkdeviotune.total_iops_seczblkdeviotune.total_iops_sec_maxz&blkdeviotune.total_iops_sec_max_lengthzblkdeviotune.write_bytes_secz blkdeviotune.write_bytes_sec_maxz'blkdeviotune.write_bytes_sec_max_lengthzblkdeviotune.write_iops_seczblkdeviotune.write_iops_sec_maxz&blkdeviotune.write_iops_sec_max_lengthzcputune.cpu_shareszcputune.emulatorpinzcputune.emulator_periodzcputune.emulator_quotazcputune.global_periodzcputune.global_quotazcputune.iothreadpin%uzcputune.iothread_periodzcputune.iothread_quotazcputune.vcpupin%uzcputune.vcpu_periodzcputune.vcpu_quotazauto_converge.incrementzauto_converge.initialzbandwidth.postcopyZcompressionzcompression.mt.dthreadszcompression.mt.levelzcompression.mt.threadszcompression.xbzrle.cacheZdestination_nameZdestination_xmlZ
disks_portZ	disks_uriZgraphics_uriZlisten_addressZ
migrate_diskszparallel.connectionsZpersistent_xmlztls.destinationZmigrate_uriZidleZintrZiowaitZkernelrwZutilizationZshm_full_scansZshm_merge_across_nodesZshm_pages_sharedZshm_pages_sharingZshm_pages_to_scanZshm_pages_unsharedZshm_pages_volatileZshm_sleep_millisecsZbuffers�cachedZfreer�Zcbitposz
cert-chainz
max-es-guestsz
max-guestsZpdhzreduced-phys-bitsZalignment_faultsZbranch_instructionsZ
branch_missesZ
bus_cyclesZcache_missesZcache_referencesZcmtZcontext_switchesZ	cpu_clockZ
cpu_cyclesZcpu_migrationsZemulation_faultsZinstructionsZmbmlZmbmtZpage_faultsZpage_faults_majZpage_faults_minZref_cpu_cyclesZstalled_cycles_backendZstalled_cycles_frontendZ
task_clock)r)N)N)N)N)N)N)NrOrirOrOrOrirO(�r�ImportErrorZlib_eZ
cygvirtmodZcyg_er0r�rZtypingrrrrrrr	r
rrr
r1Z_EventCBZ_EventAddHandleFuncZ_EventUpdateHandleFuncZ_EventRemoveHandleFuncZ_TimerCBZ_EventAddTimeoutFuncZ_EventUpdateTimeoutFuncZ_EventRemoveTimeoutFuncrVZ_BlkioParameterZ_MemoryParameterZ_SchedParameterZ_TypedParameterrrr4r:r<rBrIrMrNrPrRrSrTrUrVrWrXrYrZr[r\rr]r^r_r`ra�objectrrArDrTrVrXrr�r�r�r�r�r�r%ZVIR_DOMAIN_BLKIO_PARAM_INTZVIR_DOMAIN_BLKIO_PARAM_UINTZVIR_DOMAIN_BLKIO_PARAM_LLONGZVIR_DOMAIN_BLKIO_PARAM_ULLONGZVIR_DOMAIN_BLKIO_PARAM_DOUBLEZVIR_DOMAIN_BLKIO_PARAM_BOOLEANZVIR_CPU_COMPARE_ERRORZVIR_CPU_COMPARE_INCOMPATIBLEZVIR_CPU_COMPARE_IDENTICALZVIR_CPU_COMPARE_SUPERSETZ(VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURESZ#VIR_CONNECT_BASELINE_CPU_MIGRATABLEZVIR_CONNECT_CLOSE_REASON_ERRORZVIR_CONNECT_CLOSE_REASON_EOFZ"VIR_CONNECT_CLOSE_REASON_KEEPALIVEZVIR_CONNECT_CLOSE_REASON_CLIENTZ)VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLEZ$VIR_CONNECT_COMPARE_CPU_VALIDATE_XMLZVIR_CRED_USERNAMEZVIR_CRED_AUTHNAMEZVIR_CRED_LANGUAGEZVIR_CRED_CNONCEZVIR_CRED_PASSPHRASEZVIR_CRED_ECHOPROMPTZVIR_CRED_NOECHOPROMPTZVIR_CRED_REALMZVIR_CRED_EXTERNALZ7VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_UNKNOWNZ>VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_DOMAIN_STARTEDZ7VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_CHANNELZ8VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_CONNECTEDZ;VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTEDZVIR_DOMAIN_BLOCK_JOB_COMPLETEDZVIR_DOMAIN_BLOCK_JOB_FAILEDZVIR_DOMAIN_BLOCK_JOB_CANCELEDZVIR_DOMAIN_BLOCK_JOB_READYZ-VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_STARTZ+VIR_DOMAIN_EVENT_DISK_DROP_MISSING_ON_STARTZVIR_CONNECT_ROZVIR_CONNECT_NO_ALIASESZ(VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVEZ*VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVEZ,VIR_CONNECT_GET_ALL_DOMAINS_STATS_PERSISTENTZ+VIR_CONNECT_GET_ALL_DOMAINS_STATS_TRANSIENTZ)VIR_CONNECT_GET_ALL_DOMAINS_STATS_RUNNINGZ(VIR_CONNECT_GET_ALL_DOMAINS_STATS_PAUSEDZ)VIR_CONNECT_GET_ALL_DOMAINS_STATS_SHUTOFFZ'VIR_CONNECT_GET_ALL_DOMAINS_STATS_OTHERZ(VIR_CONNECT_GET_ALL_DOMAINS_STATS_NOWAITZ)VIR_CONNECT_GET_ALL_DOMAINS_STATS_BACKINGZ/VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATSZVIR_CONNECT_LIST_DOMAINS_ACTIVEZ!VIR_CONNECT_LIST_DOMAINS_INACTIVEZ#VIR_CONNECT_LIST_DOMAINS_PERSISTENTZ"VIR_CONNECT_LIST_DOMAINS_TRANSIENTZ VIR_CONNECT_LIST_DOMAINS_RUNNINGZVIR_CONNECT_LIST_DOMAINS_PAUSEDZ VIR_CONNECT_LIST_DOMAINS_SHUTOFFZVIR_CONNECT_LIST_DOMAINS_OTHERZ$VIR_CONNECT_LIST_DOMAINS_MANAGEDSAVEZ'VIR_CONNECT_LIST_DOMAINS_NO_MANAGEDSAVEZ"VIR_CONNECT_LIST_DOMAINS_AUTOSTARTZ%VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTARTZ%VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOTZ$VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOTZ'VIR_CONNECT_LIST_DOMAINS_HAS_CHECKPOINTZ&VIR_CONNECT_LIST_DOMAINS_NO_CHECKPOINTZ$VIR_CONNECT_LIST_INTERFACES_INACTIVEZ"VIR_CONNECT_LIST_INTERFACES_ACTIVEZ"VIR_CONNECT_LIST_NETWORKS_INACTIVEZ VIR_CONNECT_LIST_NETWORKS_ACTIVEZ$VIR_CONNECT_LIST_NETWORKS_PERSISTENTZ#VIR_CONNECT_LIST_NETWORKS_TRANSIENTZ#VIR_CONNECT_LIST_NETWORKS_AUTOSTARTZ&VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTARTZ(VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEMZ)VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEVZ)VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_DEVZ/VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_INTERFACEZ%VIR_CONNECT_LIST_NODE_DEVICES_CAP_NETZ+VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_HOSTZ-VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_TARGETZ&VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSIZ)VIR_CONNECT_LIST_NODE_DEVICES_CAP_STORAGEZ)VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOSTZ(VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTSZ.VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERICZ%VIR_CONNECT_LIST_NODE_DEVICES_CAP_DRMZ,VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPESZ&VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEVZ)VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEVZ)VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEVZ&VIR_CONNECT_LIST_NODE_DEVICES_CAP_VDPAZ)VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_CARDZ*VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUEZ+VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIXZ%VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPDZ&VIR_CONNECT_LIST_NODE_DEVICES_INACTIVEZ$VIR_CONNECT_LIST_NODE_DEVICES_ACTIVEZ"VIR_CONNECT_LIST_SECRETS_EPHEMERALZ%VIR_CONNECT_LIST_SECRETS_NO_EPHEMERALZ VIR_CONNECT_LIST_SECRETS_PRIVATEZ#VIR_CONNECT_LIST_SECRETS_NO_PRIVATEZ'VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVEZ%VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVEZ)VIR_CONNECT_LIST_STORAGE_POOLS_PERSISTENTZ(VIR_CONNECT_LIST_STORAGE_POOLS_TRANSIENTZ(VIR_CONNECT_LIST_STORAGE_POOLS_AUTOSTARTZ+VIR_CONNECT_LIST_STORAGE_POOLS_NO_AUTOSTARTZ"VIR_CONNECT_LIST_STORAGE_POOLS_DIRZ!VIR_CONNECT_LIST_STORAGE_POOLS_FSZ$VIR_CONNECT_LIST_STORAGE_POOLS_NETFSZ&VIR_CONNECT_LIST_STORAGE_POOLS_LOGICALZ#VIR_CONNECT_LIST_STORAGE_POOLS_DISKZ$VIR_CONNECT_LIST_STORAGE_POOLS_ISCSIZ#VIR_CONNECT_LIST_STORAGE_POOLS_SCSIZ$VIR_CONNECT_LIST_STORAGE_POOLS_MPATHZ"VIR_CONNECT_LIST_STORAGE_POOLS_RBDZ'VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOGZ&VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTERZ"VIR_CONNECT_LIST_STORAGE_POOLS_ZFSZ'VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGEZ+VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECTZ'VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCKZ)VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_DEFAULTZ(VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_NOWAITZ)VIR_DOMAIN_AUTHORIZED_SSH_KEYS_SET_APPENDZ)VIR_DOMAIN_AUTHORIZED_SSH_KEYS_SET_REMOVEZ&VIR_DOMAIN_BACKUP_BEGIN_REUSE_EXTERNALZVIR_DOMAIN_BLOCK_COMMIT_SHALLOWZVIR_DOMAIN_BLOCK_COMMIT_DELETEZVIR_DOMAIN_BLOCK_COMMIT_ACTIVEZ VIR_DOMAIN_BLOCK_COMMIT_RELATIVEZ'VIR_DOMAIN_BLOCK_COMMIT_BANDWIDTH_BYTESZVIR_DOMAIN_BLOCK_COPY_SHALLOWZVIR_DOMAIN_BLOCK_COPY_REUSE_EXTZ#VIR_DOMAIN_BLOCK_COPY_TRANSIENT_JOBZ(VIR_DOMAIN_BLOCK_COPY_SYNCHRONOUS_WRITESZ VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNCZ VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOTZ)VIR_DOMAIN_BLOCK_JOB_INFO_BANDWIDTH_BYTESZ*VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_BYTESZ!VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWNZVIR_DOMAIN_BLOCK_JOB_TYPE_PULLZVIR_DOMAIN_BLOCK_JOB_TYPE_COPYZ VIR_DOMAIN_BLOCK_JOB_TYPE_COMMITZ'VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMITZ VIR_DOMAIN_BLOCK_JOB_TYPE_BACKUPZ%VIR_DOMAIN_BLOCK_PULL_BANDWIDTH_BYTESZVIR_DOMAIN_BLOCK_REBASE_SHALLOWZ!VIR_DOMAIN_BLOCK_REBASE_REUSE_EXTZ VIR_DOMAIN_BLOCK_REBASE_COPY_RAWZVIR_DOMAIN_BLOCK_REBASE_COPYZ VIR_DOMAIN_BLOCK_REBASE_RELATIVEZ VIR_DOMAIN_BLOCK_REBASE_COPY_DEVZ'VIR_DOMAIN_BLOCK_REBASE_BANDWIDTH_BYTESZVIR_DOMAIN_BLOCK_RESIZE_BYTESZVIR_DOMAIN_BLOCKED_UNKNOWNZVIR_DOMAIN_CHANNEL_FORCEZ%VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINEZ$VIR_DOMAIN_CHECKPOINT_CREATE_QUIESCEZ.VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE_VALIDATEZ%VIR_DOMAIN_CHECKPOINT_DELETE_CHILDRENZ*VIR_DOMAIN_CHECKPOINT_DELETE_METADATA_ONLYZ*VIR_DOMAIN_CHECKPOINT_DELETE_CHILDREN_ONLYZ&VIR_DOMAIN_CHECKPOINT_LIST_DESCENDANTSZ VIR_DOMAIN_CHECKPOINT_LIST_ROOTSZ&VIR_DOMAIN_CHECKPOINT_LIST_TOPOLOGICALZ!VIR_DOMAIN_CHECKPOINT_LIST_LEAVESZ$VIR_DOMAIN_CHECKPOINT_LIST_NO_LEAVESZ VIR_DOMAIN_CHECKPOINT_XML_SECUREZ#VIR_DOMAIN_CHECKPOINT_XML_NO_DOMAINZVIR_DOMAIN_CHECKPOINT_XML_SIZEZVIR_DOMAIN_CONSOLE_FORCEZVIR_DOMAIN_CONSOLE_SAFEZ$VIR_DOMAIN_CONTROL_ERROR_REASON_NONEZ'VIR_DOMAIN_CONTROL_ERROR_REASON_UNKNOWNZ'VIR_DOMAIN_CONTROL_ERROR_REASON_MONITORZ(VIR_DOMAIN_CONTROL_ERROR_REASON_INTERNALZVIR_DOMAIN_CONTROL_OKZVIR_DOMAIN_CONTROL_JOBZVIR_DOMAIN_CONTROL_OCCUPIEDZVIR_DOMAIN_CONTROL_ERRORZVIR_DUMP_CRASHZ
VIR_DUMP_LIVEZVIR_DUMP_BYPASS_CACHEZVIR_DUMP_RESETZVIR_DUMP_MEMORY_ONLYZVIR_DOMAIN_CORE_DUMP_FORMAT_RAWZ&VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_ZLIBZ%VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_LZOZ(VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_SNAPPYZ#VIR_DOMAIN_CORE_DUMP_FORMAT_WIN_DMPZVIR_DOMAIN_CRASHED_UNKNOWNZVIR_DOMAIN_CRASHED_PANICKEDZVIR_DOMAIN_NONEZVIR_DOMAIN_START_PAUSEDZVIR_DOMAIN_START_AUTODESTROYZVIR_DOMAIN_START_BYPASS_CACHEZVIR_DOMAIN_START_FORCE_BOOTZVIR_DOMAIN_START_VALIDATEZVIR_DOMAIN_DEFINE_VALIDATEZVIR_DOMAIN_DESTROY_DEFAULTZVIR_DOMAIN_DESTROY_GRACEFULZ VIR_DOMAIN_DEVICE_MODIFY_CURRENTZVIR_DOMAIN_DEVICE_MODIFY_LIVEZVIR_DOMAIN_DEVICE_MODIFY_CONFIGZVIR_DOMAIN_DEVICE_MODIFY_FORCEZVIR_DOMAIN_DIRTYRATE_UNSTARTEDZVIR_DOMAIN_DIRTYRATE_MEASURINGZVIR_DOMAIN_DIRTYRATE_MEASUREDZVIR_DOMAIN_DISK_ERROR_NONEZVIR_DOMAIN_DISK_ERROR_UNSPECZVIR_DOMAIN_DISK_ERROR_NO_SPACEZ!VIR_DOMAIN_EVENT_CRASHED_PANICKEDZ$VIR_DOMAIN_EVENT_CRASHED_CRASHLOADEDZVIR_DOMAIN_EVENT_DEFINED_ADDEDZ VIR_DOMAIN_EVENT_DEFINED_UPDATEDZ VIR_DOMAIN_EVENT_DEFINED_RENAMEDZ&VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOTZ&VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4Z&VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6Z&VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIXZ!VIR_DOMAIN_EVENT_GRAPHICS_CONNECTZ$VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZEZ$VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECTZVIR_DOMAIN_EVENT_ID_LIFECYCLEZVIR_DOMAIN_EVENT_ID_REBOOTZVIR_DOMAIN_EVENT_ID_RTC_CHANGEZVIR_DOMAIN_EVENT_ID_WATCHDOGZVIR_DOMAIN_EVENT_ID_IO_ERRORZVIR_DOMAIN_EVENT_ID_GRAPHICSZ#VIR_DOMAIN_EVENT_ID_IO_ERROR_REASONZ!VIR_DOMAIN_EVENT_ID_CONTROL_ERRORZVIR_DOMAIN_EVENT_ID_BLOCK_JOBZVIR_DOMAIN_EVENT_ID_DISK_CHANGEZVIR_DOMAIN_EVENT_ID_TRAY_CHANGEZVIR_DOMAIN_EVENT_ID_PMWAKEUPZVIR_DOMAIN_EVENT_ID_PMSUSPENDZ"VIR_DOMAIN_EVENT_ID_BALLOON_CHANGEZ"VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISKZ"VIR_DOMAIN_EVENT_ID_DEVICE_REMOVEDZVIR_DOMAIN_EVENT_ID_BLOCK_JOB_2ZVIR_DOMAIN_EVENT_ID_TUNABLEZ#VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLEZ VIR_DOMAIN_EVENT_ID_DEVICE_ADDEDZ'VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATIONZ!VIR_DOMAIN_EVENT_ID_JOB_COMPLETEDZ)VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILEDZ#VIR_DOMAIN_EVENT_ID_METADATA_CHANGEZ#VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLDZ"VIR_DOMAIN_EVENT_ID_MEMORY_FAILUREZ-VIR_DOMAIN_EVENT_ID_MEMORY_DEVICE_SIZE_CHANGEZVIR_DOMAIN_EVENT_IO_ERROR_NONEZVIR_DOMAIN_EVENT_IO_ERROR_PAUSEZ VIR_DOMAIN_EVENT_IO_ERROR_REPORTZ#VIR_DOMAIN_EVENT_PMSUSPENDED_MEMORYZ!VIR_DOMAIN_EVENT_PMSUSPENDED_DISKZ!VIR_DOMAIN_EVENT_RESUMED_UNPAUSEDZ!VIR_DOMAIN_EVENT_RESUMED_MIGRATEDZ&VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOTZ!VIR_DOMAIN_EVENT_RESUMED_POSTCOPYZ"VIR_DOMAIN_EVENT_SHUTDOWN_FINISHEDZVIR_DOMAIN_EVENT_SHUTDOWN_GUESTZVIR_DOMAIN_EVENT_SHUTDOWN_HOSTZVIR_DOMAIN_EVENT_STARTED_BOOTEDZ!VIR_DOMAIN_EVENT_STARTED_MIGRATEDZ!VIR_DOMAIN_EVENT_STARTED_RESTOREDZ&VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOTZVIR_DOMAIN_EVENT_STARTED_WAKEUPZ!VIR_DOMAIN_EVENT_STOPPED_SHUTDOWNZ"VIR_DOMAIN_EVENT_STOPPED_DESTROYEDZ VIR_DOMAIN_EVENT_STOPPED_CRASHEDZ!VIR_DOMAIN_EVENT_STOPPED_MIGRATEDZVIR_DOMAIN_EVENT_STOPPED_SAVEDZVIR_DOMAIN_EVENT_STOPPED_FAILEDZ&VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOTZ!VIR_DOMAIN_EVENT_SUSPENDED_PAUSEDZ#VIR_DOMAIN_EVENT_SUSPENDED_MIGRATEDZ"VIR_DOMAIN_EVENT_SUSPENDED_IOERRORZ#VIR_DOMAIN_EVENT_SUSPENDED_WATCHDOGZ#VIR_DOMAIN_EVENT_SUSPENDED_RESTOREDZ(VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOTZ$VIR_DOMAIN_EVENT_SUSPENDED_API_ERRORZ#VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPYZ*VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY_FAILEDZ!VIR_DOMAIN_EVENT_TRAY_CHANGE_OPENZ"VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSEZVIR_DOMAIN_EVENT_DEFINEDZVIR_DOMAIN_EVENT_UNDEFINEDZVIR_DOMAIN_EVENT_STARTEDZVIR_DOMAIN_EVENT_SUSPENDEDZVIR_DOMAIN_EVENT_RESUMEDZVIR_DOMAIN_EVENT_STOPPEDZVIR_DOMAIN_EVENT_SHUTDOWNZVIR_DOMAIN_EVENT_PMSUSPENDEDZVIR_DOMAIN_EVENT_CRASHEDZ"VIR_DOMAIN_EVENT_UNDEFINED_REMOVEDZ"VIR_DOMAIN_EVENT_UNDEFINED_RENAMEDZVIR_DOMAIN_EVENT_WATCHDOG_NONEZVIR_DOMAIN_EVENT_WATCHDOG_PAUSEZVIR_DOMAIN_EVENT_WATCHDOG_RESETZ"VIR_DOMAIN_EVENT_WATCHDOG_POWEROFFZ"VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWNZVIR_DOMAIN_EVENT_WATCHDOG_DEBUGZ#VIR_DOMAIN_EVENT_WATCHDOG_INJECTNMIZVIR_DOMAIN_GET_HOSTNAME_LEASEZVIR_DOMAIN_GET_HOSTNAME_AGENTZVIR_DOMAIN_JOB_STATS_COMPLETEDZ#VIR_DOMAIN_JOB_STATS_KEEP_COMPLETEDZVIR_DOMAIN_GUEST_INFO_USERSZVIR_DOMAIN_GUEST_INFO_OSZVIR_DOMAIN_GUEST_INFO_TIMEZONEZVIR_DOMAIN_GUEST_INFO_HOSTNAMEZ VIR_DOMAIN_GUEST_INFO_FILESYSTEMZVIR_DOMAIN_GUEST_INFO_DISKSZ VIR_DOMAIN_GUEST_INFO_INTERFACESZ(VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASEZ(VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENTZ&VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARPZ VIR_DOMAIN_JOB_OPERATION_UNKNOWNZVIR_DOMAIN_JOB_OPERATION_STARTZVIR_DOMAIN_JOB_OPERATION_SAVEZ VIR_DOMAIN_JOB_OPERATION_RESTOREZ%VIR_DOMAIN_JOB_OPERATION_MIGRATION_INZ&VIR_DOMAIN_JOB_OPERATION_MIGRATION_OUTZ!VIR_DOMAIN_JOB_OPERATION_SNAPSHOTZ(VIR_DOMAIN_JOB_OPERATION_SNAPSHOT_REVERTZVIR_DOMAIN_JOB_OPERATION_DUMPZVIR_DOMAIN_JOB_OPERATION_BACKUPZVIR_DOMAIN_JOB_NONEZVIR_DOMAIN_JOB_BOUNDEDZVIR_DOMAIN_JOB_UNBOUNDEDZVIR_DOMAIN_JOB_COMPLETEDZVIR_DOMAIN_JOB_FAILEDZVIR_DOMAIN_JOB_CANCELLEDZVIR_DOMAIN_LIFECYCLE_POWEROFFZVIR_DOMAIN_LIFECYCLE_REBOOTZVIR_DOMAIN_LIFECYCLE_CRASHZ#VIR_DOMAIN_LIFECYCLE_ACTION_DESTROYZ#VIR_DOMAIN_LIFECYCLE_ACTION_RESTARTZ*VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAMEZ$VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVEZ,VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROYZ,VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTARTZ-VIR_DOMAIN_EVENT_MEMORY_FAILURE_ACTION_IGNOREZ-VIR_DOMAIN_EVENT_MEMORY_FAILURE_ACTION_INJECTZ,VIR_DOMAIN_EVENT_MEMORY_FAILURE_ACTION_FATALZ,VIR_DOMAIN_EVENT_MEMORY_FAILURE_ACTION_RESETZ)VIR_DOMAIN_MEMORY_FAILURE_ACTION_REQUIREDZ#VIR_DOMAIN_MEMORY_FAILURE_RECURSIVEZ4VIR_DOMAIN_EVENT_MEMORY_FAILURE_RECIPIENT_HYPERVISORZ/VIR_DOMAIN_EVENT_MEMORY_FAILURE_RECIPIENT_GUESTZVIR_MEMORY_VIRTUALZVIR_MEMORY_PHYSICALZVIR_DOMAIN_MEM_CURRENTZVIR_DOMAIN_MEM_LIVEZVIR_DOMAIN_MEM_CONFIGZVIR_DOMAIN_MEM_MAXIMUMZVIR_DOMAIN_MEMORY_STAT_SWAP_INZVIR_DOMAIN_MEMORY_STAT_SWAP_OUTZ"VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULTZ"VIR_DOMAIN_MEMORY_STAT_MINOR_FAULTZVIR_DOMAIN_MEMORY_STAT_UNUSEDZ VIR_DOMAIN_MEMORY_STAT_AVAILABLEZ%VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOONZVIR_DOMAIN_MEMORY_STAT_RSSZVIR_DOMAIN_MEMORY_STAT_USABLEZ"VIR_DOMAIN_MEMORY_STAT_LAST_UPDATEZ"VIR_DOMAIN_MEMORY_STAT_DISK_CACHESZ&VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGALLOCZ%VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGFAILZVIR_DOMAIN_MEMORY_STAT_LASTZVIR_DOMAIN_MEMORY_STAT_NRZVIR_DOMAIN_MESSAGE_DEPRECATIONZVIR_DOMAIN_MESSAGE_TAINTINGZVIR_DOMAIN_METADATA_DESCRIPTIONZVIR_DOMAIN_METADATA_TITLEZVIR_DOMAIN_METADATA_ELEMENTZVIR_MIGRATE_LIVEZVIR_MIGRATE_PEER2PEERZVIR_MIGRATE_TUNNELLEDZVIR_MIGRATE_PERSIST_DESTZVIR_MIGRATE_UNDEFINE_SOURCEZVIR_MIGRATE_PAUSEDZVIR_MIGRATE_NON_SHARED_DISKZVIR_MIGRATE_NON_SHARED_INCZVIR_MIGRATE_CHANGE_PROTECTIONZVIR_MIGRATE_UNSAFEZVIR_MIGRATE_OFFLINEZVIR_MIGRATE_COMPRESSEDZVIR_MIGRATE_ABORT_ON_ERRORZVIR_MIGRATE_AUTO_CONVERGEZVIR_MIGRATE_RDMA_PIN_ALLZVIR_MIGRATE_POSTCOPYZVIR_MIGRATE_TLSZVIR_MIGRATE_PARALLELZ)VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITESZVIR_MIGRATE_ZEROCOPYZ%VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPYZVIR_DOMAIN_AFFECT_CURRENTZVIR_DOMAIN_AFFECT_LIVEZVIR_DOMAIN_AFFECT_CONFIGZVIR_DOMAIN_NOSTATE_UNKNOWNZVIR_DOMAIN_NUMATUNE_MEM_STRICTZ!VIR_DOMAIN_NUMATUNE_MEM_PREFERREDZ"VIR_DOMAIN_NUMATUNE_MEM_INTERLEAVEZ#VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVEZ!VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTHZ#VIR_DOMAIN_PMSUSPENDED_DISK_UNKNOWNZVIR_DOMAIN_PMSUSPENDED_UNKNOWNZVIR_DOMAIN_PAUSED_UNKNOWNZVIR_DOMAIN_PAUSED_USERZVIR_DOMAIN_PAUSED_MIGRATIONZVIR_DOMAIN_PAUSED_SAVEZVIR_DOMAIN_PAUSED_DUMPZVIR_DOMAIN_PAUSED_IOERRORZVIR_DOMAIN_PAUSED_WATCHDOGZVIR_DOMAIN_PAUSED_FROM_SNAPSHOTZVIR_DOMAIN_PAUSED_SHUTTING_DOWNZVIR_DOMAIN_PAUSED_SNAPSHOTZVIR_DOMAIN_PAUSED_CRASHEDZVIR_DOMAIN_PAUSED_STARTING_UPZVIR_DOMAIN_PAUSED_POSTCOPYZ!VIR_DOMAIN_PAUSED_POSTCOPY_FAILEDZVIR_DOMAIN_PROCESS_SIGNAL_NOPZVIR_DOMAIN_PROCESS_SIGNAL_HUPZVIR_DOMAIN_PROCESS_SIGNAL_INTZVIR_DOMAIN_PROCESS_SIGNAL_QUITZVIR_DOMAIN_PROCESS_SIGNAL_ILLZVIR_DOMAIN_PROCESS_SIGNAL_TRAPZVIR_DOMAIN_PROCESS_SIGNAL_ABRTZVIR_DOMAIN_PROCESS_SIGNAL_BUSZVIR_DOMAIN_PROCESS_SIGNAL_FPEZVIR_DOMAIN_PROCESS_SIGNAL_KILLZVIR_DOMAIN_PROCESS_SIGNAL_USR1ZVIR_DOMAIN_PROCESS_SIGNAL_SEGVZVIR_DOMAIN_PROCESS_SIGNAL_USR2ZVIR_DOMAIN_PROCESS_SIGNAL_PIPEZVIR_DOMAIN_PROCESS_SIGNAL_ALRMZVIR_DOMAIN_PROCESS_SIGNAL_TERMZ VIR_DOMAIN_PROCESS_SIGNAL_STKFLTZVIR_DOMAIN_PROCESS_SIGNAL_CHLDZVIR_DOMAIN_PROCESS_SIGNAL_CONTZVIR_DOMAIN_PROCESS_SIGNAL_STOPZVIR_DOMAIN_PROCESS_SIGNAL_TSTPZVIR_DOMAIN_PROCESS_SIGNAL_TTINZVIR_DOMAIN_PROCESS_SIGNAL_TTOUZVIR_DOMAIN_PROCESS_SIGNAL_URGZVIR_DOMAIN_PROCESS_SIGNAL_XCPUZVIR_DOMAIN_PROCESS_SIGNAL_XFSZZ VIR_DOMAIN_PROCESS_SIGNAL_VTALRMZVIR_DOMAIN_PROCESS_SIGNAL_PROFZVIR_DOMAIN_PROCESS_SIGNAL_WINCHZVIR_DOMAIN_PROCESS_SIGNAL_POLLZVIR_DOMAIN_PROCESS_SIGNAL_PWRZVIR_DOMAIN_PROCESS_SIGNAL_SYSZVIR_DOMAIN_PROCESS_SIGNAL_RT0ZVIR_DOMAIN_PROCESS_SIGNAL_RT1ZVIR_DOMAIN_PROCESS_SIGNAL_RT2ZVIR_DOMAIN_PROCESS_SIGNAL_RT3ZVIR_DOMAIN_PROCESS_SIGNAL_RT4ZVIR_DOMAIN_PROCESS_SIGNAL_RT5ZVIR_DOMAIN_PROCESS_SIGNAL_RT6ZVIR_DOMAIN_PROCESS_SIGNAL_RT7ZVIR_DOMAIN_PROCESS_SIGNAL_RT8ZVIR_DOMAIN_PROCESS_SIGNAL_RT9ZVIR_DOMAIN_PROCESS_SIGNAL_RT10ZVIR_DOMAIN_PROCESS_SIGNAL_RT11ZVIR_DOMAIN_PROCESS_SIGNAL_RT12ZVIR_DOMAIN_PROCESS_SIGNAL_RT13ZVIR_DOMAIN_PROCESS_SIGNAL_RT14ZVIR_DOMAIN_PROCESS_SIGNAL_RT15ZVIR_DOMAIN_PROCESS_SIGNAL_RT16ZVIR_DOMAIN_PROCESS_SIGNAL_RT17ZVIR_DOMAIN_PROCESS_SIGNAL_RT18ZVIR_DOMAIN_PROCESS_SIGNAL_RT19ZVIR_DOMAIN_PROCESS_SIGNAL_RT20ZVIR_DOMAIN_PROCESS_SIGNAL_RT21ZVIR_DOMAIN_PROCESS_SIGNAL_RT22ZVIR_DOMAIN_PROCESS_SIGNAL_RT23ZVIR_DOMAIN_PROCESS_SIGNAL_RT24ZVIR_DOMAIN_PROCESS_SIGNAL_RT25ZVIR_DOMAIN_PROCESS_SIGNAL_RT26ZVIR_DOMAIN_PROCESS_SIGNAL_RT27ZVIR_DOMAIN_PROCESS_SIGNAL_RT28ZVIR_DOMAIN_PROCESS_SIGNAL_RT29ZVIR_DOMAIN_PROCESS_SIGNAL_RT30ZVIR_DOMAIN_PROCESS_SIGNAL_RT31ZVIR_DOMAIN_PROCESS_SIGNAL_RT32ZVIR_DOMAIN_REBOOT_DEFAULTZ VIR_DOMAIN_REBOOT_ACPI_POWER_BTNZVIR_DOMAIN_REBOOT_GUEST_AGENTZVIR_DOMAIN_REBOOT_INITCTLZVIR_DOMAIN_REBOOT_SIGNALZVIR_DOMAIN_REBOOT_PARAVIRTZVIR_DOMAIN_RUNNING_UNKNOWNZVIR_DOMAIN_RUNNING_BOOTEDZVIR_DOMAIN_RUNNING_MIGRATEDZVIR_DOMAIN_RUNNING_RESTOREDZ VIR_DOMAIN_RUNNING_FROM_SNAPSHOTZVIR_DOMAIN_RUNNING_UNPAUSEDZ%VIR_DOMAIN_RUNNING_MIGRATION_CANCELEDZ VIR_DOMAIN_RUNNING_SAVE_CANCELEDZVIR_DOMAIN_RUNNING_WAKEUPZVIR_DOMAIN_RUNNING_CRASHEDZVIR_DOMAIN_RUNNING_POSTCOPYZ VIR_DOMAIN_SAVE_IMAGE_XML_SECUREZVIR_DOMAIN_SAVE_BYPASS_CACHEZVIR_DOMAIN_SAVE_RUNNINGZVIR_DOMAIN_SAVE_PAUSEDZVIR_DOMAIN_TIME_SYNCZVIR_DOMAIN_PASSWORD_ENCRYPTEDZVIR_DOMAIN_SHUTDOWN_DEFAULTZ"VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTNZVIR_DOMAIN_SHUTDOWN_GUEST_AGENTZVIR_DOMAIN_SHUTDOWN_INITCTLZVIR_DOMAIN_SHUTDOWN_SIGNALZVIR_DOMAIN_SHUTDOWN_PARAVIRTZVIR_DOMAIN_SHUTDOWN_UNKNOWNZVIR_DOMAIN_SHUTDOWN_USERZVIR_DOMAIN_SHUTOFF_UNKNOWNZVIR_DOMAIN_SHUTOFF_SHUTDOWNZVIR_DOMAIN_SHUTOFF_DESTROYEDZVIR_DOMAIN_SHUTOFF_CRASHEDZVIR_DOMAIN_SHUTOFF_MIGRATEDZVIR_DOMAIN_SHUTOFF_SAVEDZVIR_DOMAIN_SHUTOFF_FAILEDZ VIR_DOMAIN_SHUTOFF_FROM_SNAPSHOTZVIR_DOMAIN_SHUTOFF_DAEMONZ#VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINEZ"VIR_DOMAIN_SNAPSHOT_CREATE_CURRENTZ&VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATAZVIR_DOMAIN_SNAPSHOT_CREATE_HALTZ$VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLYZ$VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXTZ"VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCEZ!VIR_DOMAIN_SNAPSHOT_CREATE_ATOMICZVIR_DOMAIN_SNAPSHOT_CREATE_LIVEZ#VIR_DOMAIN_SNAPSHOT_CREATE_VALIDATEZ#VIR_DOMAIN_SNAPSHOT_DELETE_CHILDRENZ(VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLYZ(VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLYZ$VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTSZVIR_DOMAIN_SNAPSHOT_LIST_ROOTSZ!VIR_DOMAIN_SNAPSHOT_LIST_METADATAZVIR_DOMAIN_SNAPSHOT_LIST_LEAVESZ"VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVESZ$VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATAZ!VIR_DOMAIN_SNAPSHOT_LIST_INACTIVEZVIR_DOMAIN_SNAPSHOT_LIST_ACTIVEZ"VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLYZ!VIR_DOMAIN_SNAPSHOT_LIST_INTERNALZ!VIR_DOMAIN_SNAPSHOT_LIST_EXTERNALZ$VIR_DOMAIN_SNAPSHOT_LIST_TOPOLOGICALZ"VIR_DOMAIN_SNAPSHOT_REVERT_RUNNINGZ!VIR_DOMAIN_SNAPSHOT_REVERT_PAUSEDZ VIR_DOMAIN_SNAPSHOT_REVERT_FORCEZVIR_DOMAIN_SNAPSHOT_XML_SECUREZVIR_DOMAIN_NOSTATEZVIR_DOMAIN_RUNNINGZVIR_DOMAIN_BLOCKEDZVIR_DOMAIN_PAUSEDZVIR_DOMAIN_SHUTDOWNZVIR_DOMAIN_SHUTOFFZVIR_DOMAIN_CRASHEDZVIR_DOMAIN_PMSUSPENDEDZVIR_DOMAIN_STATS_STATEZVIR_DOMAIN_STATS_CPU_TOTALZVIR_DOMAIN_STATS_BALLOONZVIR_DOMAIN_STATS_VCPUZVIR_DOMAIN_STATS_INTERFACEZVIR_DOMAIN_STATS_BLOCKZVIR_DOMAIN_STATS_PERFZVIR_DOMAIN_STATS_IOTHREADZVIR_DOMAIN_STATS_MEMORYZVIR_DOMAIN_STATS_DIRTYRATEZ VIR_DOMAIN_UNDEFINE_MANAGED_SAVEZ&VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATAZVIR_DOMAIN_UNDEFINE_NVRAMZVIR_DOMAIN_UNDEFINE_KEEP_NVRAMZ(VIR_DOMAIN_UNDEFINE_CHECKPOINTS_METADATAZVIR_DOMAIN_VCPU_CURRENTZVIR_DOMAIN_VCPU_LIVEZVIR_DOMAIN_VCPU_CONFIGZVIR_DOMAIN_VCPU_MAXIMUMZVIR_DOMAIN_VCPU_GUESTZVIR_DOMAIN_VCPU_HOTPLUGGABLEZVIR_DOMAIN_XML_SECUREZVIR_DOMAIN_XML_INACTIVEZVIR_DOMAIN_XML_UPDATE_CPUZVIR_DOMAIN_XML_MIGRATABLEZ
VIR_FROM_NONEZVIR_FROM_XENZ
VIR_FROM_XENDZVIR_FROM_XENSTOREZVIR_FROM_SEXPRZVIR_FROM_XMLZVIR_FROM_DOMZVIR_FROM_RPCZVIR_FROM_PROXYZ
VIR_FROM_CONFZ
VIR_FROM_QEMUZVIR_FROM_NETZ
VIR_FROM_TESTZVIR_FROM_REMOTEZVIR_FROM_OPENVZZVIR_FROM_XENXMZVIR_FROM_STATS_LINUXZVIR_FROM_LXCZVIR_FROM_STORAGEZVIR_FROM_NETWORKZVIR_FROM_DOMAINZVIR_FROM_UMLZVIR_FROM_NODEDEVZVIR_FROM_XEN_INOTIFYZVIR_FROM_SECURITYZ
VIR_FROM_VBOXZVIR_FROM_INTERFACEZVIR_FROM_ONEZVIR_FROM_ESXZ
VIR_FROM_PHYPZVIR_FROM_SECRETZVIR_FROM_CPUZVIR_FROM_XENAPIZVIR_FROM_NWFILTERZ
VIR_FROM_HOOKZVIR_FROM_DOMAIN_SNAPSHOTZVIR_FROM_AUDITZVIR_FROM_SYSINFOZVIR_FROM_STREAMSZVIR_FROM_VMWAREZVIR_FROM_EVENTZVIR_FROM_LIBXLZVIR_FROM_LOCKINGZVIR_FROM_HYPERVZVIR_FROM_CAPABILITIESZVIR_FROM_URIZ
VIR_FROM_AUTHZ
VIR_FROM_DBUSZVIR_FROM_PARALLELSZVIR_FROM_DEVICEZVIR_FROM_SSHZVIR_FROM_LOCKSPACEZVIR_FROM_INITCTLZVIR_FROM_IDENTITYZVIR_FROM_CGROUPZVIR_FROM_ACCESSZVIR_FROM_SYSTEMDZVIR_FROM_BHYVEZVIR_FROM_CRYPTOZVIR_FROM_FIREWALLZVIR_FROM_POLKITZVIR_FROM_THREADZVIR_FROM_ADMINZVIR_FROM_LOGGINGZVIR_FROM_XENXLZ
VIR_FROM_PERFZVIR_FROM_LIBSSHZVIR_FROM_RESCTRLZVIR_FROM_FIREWALLDZVIR_FROM_DOMAIN_CHECKPOINTZVIR_FROM_TPMZVIR_FROM_BPFZVIR_FROM_CHZVIR_ERR_NONEZVIR_ERR_WARNINGZ
VIR_ERR_ERRORZ
VIR_ERR_OKZVIR_ERR_INTERNAL_ERRORZVIR_ERR_NO_MEMORYZVIR_ERR_NO_SUPPORTZVIR_ERR_UNKNOWN_HOSTZVIR_ERR_NO_CONNECTZVIR_ERR_INVALID_CONNZVIR_ERR_INVALID_DOMAINZVIR_ERR_INVALID_ARGZVIR_ERR_OPERATION_FAILEDZVIR_ERR_GET_FAILEDZVIR_ERR_POST_FAILEDZVIR_ERR_HTTP_ERRORZVIR_ERR_SEXPR_SERIALZVIR_ERR_NO_XENZVIR_ERR_XEN_CALLZVIR_ERR_OS_TYPEZVIR_ERR_NO_KERNELZVIR_ERR_NO_ROOTZVIR_ERR_NO_SOURCEZVIR_ERR_NO_TARGETZVIR_ERR_NO_NAMEZ
VIR_ERR_NO_OSZVIR_ERR_NO_DEVICEZVIR_ERR_NO_XENSTOREZVIR_ERR_DRIVER_FULLZVIR_ERR_CALL_FAILEDZVIR_ERR_XML_ERRORZVIR_ERR_DOM_EXISTZVIR_ERR_OPERATION_DENIEDZVIR_ERR_OPEN_FAILEDZVIR_ERR_READ_FAILEDZVIR_ERR_PARSE_FAILEDZVIR_ERR_CONF_SYNTAXZVIR_ERR_WRITE_FAILEDZVIR_ERR_XML_DETAILZVIR_ERR_INVALID_NETWORKZVIR_ERR_NETWORK_EXISTZVIR_ERR_SYSTEM_ERRORZVIR_ERR_RPCZVIR_ERR_GNUTLS_ERRORZVIR_WAR_NO_NETWORKZVIR_ERR_NO_DOMAINZVIR_ERR_NO_NETWORKZVIR_ERR_INVALID_MACZVIR_ERR_AUTH_FAILEDZVIR_ERR_INVALID_STORAGE_POOLZVIR_ERR_INVALID_STORAGE_VOLZVIR_WAR_NO_STORAGEZVIR_ERR_NO_STORAGE_POOLZVIR_ERR_NO_STORAGE_VOLZVIR_WAR_NO_NODEZVIR_ERR_INVALID_NODE_DEVICEZVIR_ERR_NO_NODE_DEVICEZVIR_ERR_NO_SECURITY_MODELZVIR_ERR_OPERATION_INVALIDZVIR_WAR_NO_INTERFACEZVIR_ERR_NO_INTERFACEZVIR_ERR_INVALID_INTERFACEZVIR_ERR_MULTIPLE_INTERFACESZVIR_WAR_NO_NWFILTERZVIR_ERR_INVALID_NWFILTERZVIR_ERR_NO_NWFILTERZVIR_ERR_BUILD_FIREWALLZVIR_WAR_NO_SECRETZVIR_ERR_INVALID_SECRETZVIR_ERR_NO_SECRETZVIR_ERR_CONFIG_UNSUPPORTEDZVIR_ERR_OPERATION_TIMEOUTZVIR_ERR_MIGRATE_PERSIST_FAILEDZVIR_ERR_HOOK_SCRIPT_FAILEDZVIR_ERR_INVALID_DOMAIN_SNAPSHOTZVIR_ERR_NO_DOMAIN_SNAPSHOTZVIR_ERR_INVALID_STREAMZVIR_ERR_ARGUMENT_UNSUPPORTEDZVIR_ERR_STORAGE_PROBE_FAILEDZVIR_ERR_STORAGE_POOL_BUILTZVIR_ERR_SNAPSHOT_REVERT_RISKYZVIR_ERR_OPERATION_ABORTEDZVIR_ERR_AUTH_CANCELLEDZVIR_ERR_NO_DOMAIN_METADATAZVIR_ERR_MIGRATE_UNSAFEZVIR_ERR_OVERFLOWZVIR_ERR_BLOCK_COPY_ACTIVEZVIR_ERR_OPERATION_UNSUPPORTEDZVIR_ERR_SSHZVIR_ERR_AGENT_UNRESPONSIVEZVIR_ERR_RESOURCE_BUSYZVIR_ERR_ACCESS_DENIEDZVIR_ERR_DBUS_SERVICEZVIR_ERR_STORAGE_VOL_EXISTZVIR_ERR_CPU_INCOMPATIBLEZVIR_ERR_XML_INVALID_SCHEMAZVIR_ERR_MIGRATE_FINISH_OKZVIR_ERR_AUTH_UNAVAILABLEZVIR_ERR_NO_SERVERZVIR_ERR_NO_CLIENTZVIR_ERR_AGENT_UNSYNCEDZVIR_ERR_LIBSSHZVIR_ERR_DEVICE_MISSINGZ VIR_ERR_INVALID_NWFILTER_BINDINGZVIR_ERR_NO_NWFILTER_BINDINGZ!VIR_ERR_INVALID_DOMAIN_CHECKPOINTZVIR_ERR_NO_DOMAIN_CHECKPOINTZVIR_ERR_NO_DOMAIN_BACKUPZVIR_ERR_INVALID_NETWORK_PORTZVIR_ERR_NETWORK_PORT_EXISTZVIR_ERR_NO_NETWORK_PORTZVIR_ERR_NO_HOSTNAMEZVIR_ERR_CHECKPOINT_INCONSISTENTZVIR_ERR_MULTIPLE_DOMAINSZVIR_EVENT_HANDLE_READABLEZVIR_EVENT_HANDLE_WRITABLEZVIR_EVENT_HANDLE_ERRORZVIR_EVENT_HANDLE_HANGUPZVIR_IP_ADDR_TYPE_IPV4ZVIR_IP_ADDR_TYPE_IPV6ZVIR_INTERFACE_DEFINE_VALIDATEZVIR_INTERFACE_XML_INACTIVEZVIR_KEYCODE_SET_LINUXZVIR_KEYCODE_SET_XTZVIR_KEYCODE_SET_ATSET1ZVIR_KEYCODE_SET_ATSET2ZVIR_KEYCODE_SET_ATSET3ZVIR_KEYCODE_SET_OSXZVIR_KEYCODE_SET_XT_KBDZVIR_KEYCODE_SET_USBZVIR_KEYCODE_SET_WIN32ZVIR_KEYCODE_SET_QNUMZVIR_DOMAIN_MEMORY_PARAM_INTZVIR_DOMAIN_MEMORY_PARAM_UINTZVIR_DOMAIN_MEMORY_PARAM_LLONGZVIR_DOMAIN_MEMORY_PARAM_ULLONGZVIR_DOMAIN_MEMORY_PARAM_DOUBLEZVIR_DOMAIN_MEMORY_PARAM_BOOLEANZ$VIR_NWFILTER_BINDING_CREATE_VALIDATEZVIR_NWFILTER_DEFINE_VALIDATEZVIR_NETWORK_CREATE_VALIDATEZVIR_NETWORK_DEFINE_VALIDATEZVIR_NETWORK_EVENT_ID_LIFECYCLEZVIR_NETWORK_EVENT_DEFINEDZVIR_NETWORK_EVENT_UNDEFINEDZVIR_NETWORK_EVENT_STARTEDZVIR_NETWORK_EVENT_STOPPEDZVIR_NETWORK_PORT_CREATE_RECLAIMZ VIR_NETWORK_PORT_CREATE_VALIDATEZVIR_NETWORK_UPDATE_COMMAND_NONEZ!VIR_NETWORK_UPDATE_COMMAND_MODIFYZ!VIR_NETWORK_UPDATE_COMMAND_DELETEZ#VIR_NETWORK_UPDATE_COMMAND_ADD_LASTZ$VIR_NETWORK_UPDATE_COMMAND_ADD_FIRSTZ!VIR_NETWORK_UPDATE_AFFECT_CURRENTZVIR_NETWORK_UPDATE_AFFECT_LIVEZ VIR_NETWORK_UPDATE_AFFECT_CONFIGZVIR_NETWORK_SECTION_NONEZVIR_NETWORK_SECTION_BRIDGEZVIR_NETWORK_SECTION_DOMAINZVIR_NETWORK_SECTION_IPZ VIR_NETWORK_SECTION_IP_DHCP_HOSTZ!VIR_NETWORK_SECTION_IP_DHCP_RANGEZVIR_NETWORK_SECTION_FORWARDZ%VIR_NETWORK_SECTION_FORWARD_INTERFACEZVIR_NETWORK_SECTION_FORWARD_PFZVIR_NETWORK_SECTION_PORTGROUPZVIR_NETWORK_SECTION_DNS_HOSTZVIR_NETWORK_SECTION_DNS_TXTZVIR_NETWORK_SECTION_DNS_SRVZVIR_NETWORK_XML_INACTIVEZVIR_NODE_ALLOC_PAGES_ADDZVIR_NODE_ALLOC_PAGES_SETZ"VIR_NODE_DEVICE_EVENT_ID_LIFECYCLEZVIR_NODE_DEVICE_EVENT_ID_UPDATEZVIR_NODE_DEVICE_EVENT_CREATEDZVIR_NODE_DEVICE_EVENT_DELETEDZVIR_NODE_DEVICE_EVENT_DEFINEDZVIR_NODE_DEVICE_EVENT_UNDEFINEDZVIR_NODE_CPU_STATS_ALL_CPUSZVIR_NODE_MEMORY_STATS_ALL_CELLSZVIR_NODE_SUSPEND_TARGET_MEMZVIR_NODE_SUSPEND_TARGET_DISKZVIR_NODE_SUSPEND_TARGET_HYBRIDZVIR_DOMAIN_SCHED_FIELD_INTZVIR_DOMAIN_SCHED_FIELD_UINTZVIR_DOMAIN_SCHED_FIELD_LLONGZVIR_DOMAIN_SCHED_FIELD_ULLONGZVIR_DOMAIN_SCHED_FIELD_DOUBLEZVIR_DOMAIN_SCHED_FIELD_BOOLEANZVIR_SECRET_DEFINE_VALIDATEZVIR_SECRET_EVENT_ID_LIFECYCLEZ!VIR_SECRET_EVENT_ID_VALUE_CHANGEDZVIR_SECRET_EVENT_DEFINEDZVIR_SECRET_EVENT_UNDEFINEDZVIR_SECRET_USAGE_TYPE_NONEZVIR_SECRET_USAGE_TYPE_VOLUMEZVIR_SECRET_USAGE_TYPE_CEPHZVIR_SECRET_USAGE_TYPE_ISCSIZVIR_SECRET_USAGE_TYPE_TLSZVIR_SECRET_USAGE_TYPE_VTPMZVIR_STORAGE_POOL_BUILD_NEWZVIR_STORAGE_POOL_BUILD_REPAIRZVIR_STORAGE_POOL_BUILD_RESIZEZ#VIR_STORAGE_POOL_BUILD_NO_OVERWRITEZ VIR_STORAGE_POOL_BUILD_OVERWRITEZVIR_STORAGE_POOL_CREATE_NORMALZ"VIR_STORAGE_POOL_CREATE_WITH_BUILDZ,VIR_STORAGE_POOL_CREATE_WITH_BUILD_OVERWRITEZ/VIR_STORAGE_POOL_CREATE_WITH_BUILD_NO_OVERWRITEZ VIR_STORAGE_POOL_DEFINE_VALIDATEZVIR_STORAGE_POOL_DELETE_NORMALZVIR_STORAGE_POOL_DELETE_ZEROEDZ#VIR_STORAGE_POOL_EVENT_ID_LIFECYCLEZ!VIR_STORAGE_POOL_EVENT_ID_REFRESHZVIR_STORAGE_POOL_EVENT_DEFINEDZ VIR_STORAGE_POOL_EVENT_UNDEFINEDZVIR_STORAGE_POOL_EVENT_STARTEDZVIR_STORAGE_POOL_EVENT_STOPPEDZVIR_STORAGE_POOL_EVENT_CREATEDZVIR_STORAGE_POOL_EVENT_DELETEDZVIR_STORAGE_POOL_INACTIVEZVIR_STORAGE_POOL_BUILDINGZVIR_STORAGE_POOL_RUNNINGZVIR_STORAGE_POOL_DEGRADEDZVIR_STORAGE_POOL_INACCESSIBLEZ(VIR_STORAGE_VOL_CREATE_PREALLOC_METADATAZVIR_STORAGE_VOL_CREATE_REFLINKZVIR_STORAGE_VOL_DELETE_NORMALZVIR_STORAGE_VOL_DELETE_ZEROEDZ%VIR_STORAGE_VOL_DELETE_WITH_SNAPSHOTSZ&VIR_STORAGE_VOL_DOWNLOAD_SPARSE_STREAMZVIR_STORAGE_VOL_USE_ALLOCATIONZVIR_STORAGE_VOL_GET_PHYSICALZVIR_STORAGE_VOL_RESIZE_ALLOCATEZVIR_STORAGE_VOL_RESIZE_DELTAZVIR_STORAGE_VOL_RESIZE_SHRINKZVIR_STORAGE_VOL_FILEZVIR_STORAGE_VOL_BLOCKZVIR_STORAGE_VOL_DIRZVIR_STORAGE_VOL_NETWORKZVIR_STORAGE_VOL_NETDIRZVIR_STORAGE_VOL_PLOOPZ$VIR_STORAGE_VOL_UPLOAD_SPARSE_STREAMZVIR_STORAGE_VOL_WIPE_ALG_ZEROZVIR_STORAGE_VOL_WIPE_ALG_NNSAZVIR_STORAGE_VOL_WIPE_ALG_DODZVIR_STORAGE_VOL_WIPE_ALG_BSIZ VIR_STORAGE_VOL_WIPE_ALG_GUTMANNZ!VIR_STORAGE_VOL_WIPE_ALG_SCHNEIERZ"VIR_STORAGE_VOL_WIPE_ALG_PFITZNER7Z#VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33ZVIR_STORAGE_VOL_WIPE_ALG_RANDOMZVIR_STORAGE_VOL_WIPE_ALG_TRIMZVIR_STORAGE_XML_INACTIVEZVIR_STREAM_EVENT_READABLEZVIR_STREAM_EVENT_WRITABLEZVIR_STREAM_EVENT_ERRORZVIR_STREAM_EVENT_HANGUPZVIR_STREAM_NONBLOCKrwZVIR_TYPED_PARAM_STRING_OKAYZVIR_TYPED_PARAM_INTZVIR_TYPED_PARAM_UINTZVIR_TYPED_PARAM_LLONGZVIR_TYPED_PARAM_ULLONGZVIR_TYPED_PARAM_DOUBLEZVIR_TYPED_PARAM_BOOLEANZVIR_TYPED_PARAM_STRINGZVIR_VCPU_INFO_CPU_UNAVAILABLEZVIR_VCPU_INFO_CPU_OFFLINEZVIR_VCPU_OFFLINEZVIR_VCPU_RUNNINGZVIR_VCPU_BLOCKEDZVIR_CONNECT_IDENTITY_GROUP_NAMEZVIR_CONNECT_IDENTITY_PROCESS_IDZ!VIR_CONNECT_IDENTITY_PROCESS_TIMEZ#VIR_CONNECT_IDENTITY_SASL_USER_NAMEZ$VIR_CONNECT_IDENTITY_SELINUX_CONTEXTZ"VIR_CONNECT_IDENTITY_UNIX_GROUP_IDZ!VIR_CONNECT_IDENTITY_UNIX_USER_IDZVIR_CONNECT_IDENTITY_USER_NAMEZ,VIR_CONNECT_IDENTITY_X509_DISTINGUISHED_NAMEZVIR_DOMAIN_BANDWIDTH_IN_AVERAGEZVIR_DOMAIN_BANDWIDTH_IN_BURSTZVIR_DOMAIN_BANDWIDTH_IN_FLOORZVIR_DOMAIN_BANDWIDTH_IN_PEAKZ VIR_DOMAIN_BANDWIDTH_OUT_AVERAGEZVIR_DOMAIN_BANDWIDTH_OUT_BURSTZVIR_DOMAIN_BANDWIDTH_OUT_PEAKZ VIR_DOMAIN_BLKIO_DEVICE_READ_BPSZ!VIR_DOMAIN_BLKIO_DEVICE_READ_IOPSZVIR_DOMAIN_BLKIO_DEVICE_WEIGHTZ!VIR_DOMAIN_BLKIO_DEVICE_WRITE_BPSZ"VIR_DOMAIN_BLKIO_DEVICE_WRITE_IOPSZVIR_DOMAIN_BLKIO_WEIGHTZVIR_DOMAIN_BLOCK_COPY_BANDWIDTHZVIR_DOMAIN_BLOCK_COPY_BUF_SIZEZ!VIR_DOMAIN_BLOCK_COPY_GRANULARITYZ"VIR_DOMAIN_BLOCK_IOTUNE_GROUP_NAMEZ&VIR_DOMAIN_BLOCK_IOTUNE_READ_BYTES_SECZ*VIR_DOMAIN_BLOCK_IOTUNE_READ_BYTES_SEC_MAXZ1VIR_DOMAIN_BLOCK_IOTUNE_READ_BYTES_SEC_MAX_LENGTHZ%VIR_DOMAIN_BLOCK_IOTUNE_READ_IOPS_SECZ)VIR_DOMAIN_BLOCK_IOTUNE_READ_IOPS_SEC_MAXZ0VIR_DOMAIN_BLOCK_IOTUNE_READ_IOPS_SEC_MAX_LENGTHZ%VIR_DOMAIN_BLOCK_IOTUNE_SIZE_IOPS_SECZ'VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SECZ+VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SEC_MAXZ2VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SEC_MAX_LENGTHZ&VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_IOPS_SECZ*VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_IOPS_SEC_MAXZ1VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_IOPS_SEC_MAX_LENGTHZ'VIR_DOMAIN_BLOCK_IOTUNE_WRITE_BYTES_SECZ+VIR_DOMAIN_BLOCK_IOTUNE_WRITE_BYTES_SEC_MAXZ2VIR_DOMAIN_BLOCK_IOTUNE_WRITE_BYTES_SEC_MAX_LENGTHZ&VIR_DOMAIN_BLOCK_IOTUNE_WRITE_IOPS_SECZ*VIR_DOMAIN_BLOCK_IOTUNE_WRITE_IOPS_SEC_MAXZ1VIR_DOMAIN_BLOCK_IOTUNE_WRITE_IOPS_SEC_MAX_LENGTHZVIR_DOMAIN_BLOCK_STATS_ERRSZ VIR_DOMAIN_BLOCK_STATS_FLUSH_REQZ(VIR_DOMAIN_BLOCK_STATS_FLUSH_TOTAL_TIMESZ!VIR_DOMAIN_BLOCK_STATS_READ_BYTESZVIR_DOMAIN_BLOCK_STATS_READ_REQZ'VIR_DOMAIN_BLOCK_STATS_READ_TOTAL_TIMESZ"VIR_DOMAIN_BLOCK_STATS_WRITE_BYTESZ VIR_DOMAIN_BLOCK_STATS_WRITE_REQZ(VIR_DOMAIN_BLOCK_STATS_WRITE_TOTAL_TIMESZVIR_DOMAIN_CPU_STATS_CPUTIMEZVIR_DOMAIN_CPU_STATS_SYSTEMTIMEZVIR_DOMAIN_CPU_STATS_USERTIMEZVIR_DOMAIN_CPU_STATS_VCPUTIMEZVIR_DOMAIN_IOTHREAD_POLL_GROWZVIR_DOMAIN_IOTHREAD_POLL_MAX_NSZVIR_DOMAIN_IOTHREAD_POLL_SHRINKZ%VIR_DOMAIN_JOB_AUTO_CONVERGE_THROTTLEZ VIR_DOMAIN_JOB_COMPRESSION_BYTESZ VIR_DOMAIN_JOB_COMPRESSION_CACHEZ'VIR_DOMAIN_JOB_COMPRESSION_CACHE_MISSESZ#VIR_DOMAIN_JOB_COMPRESSION_OVERFLOWZ VIR_DOMAIN_JOB_COMPRESSION_PAGESZVIR_DOMAIN_JOB_DATA_PROCESSEDZVIR_DOMAIN_JOB_DATA_REMAININGZVIR_DOMAIN_JOB_DATA_TOTALZVIR_DOMAIN_JOB_DISK_BPSZVIR_DOMAIN_JOB_DISK_PROCESSEDZVIR_DOMAIN_JOB_DISK_REMAININGZVIR_DOMAIN_JOB_DISK_TEMP_TOTALZVIR_DOMAIN_JOB_DISK_TEMP_USEDZVIR_DOMAIN_JOB_DISK_TOTALZVIR_DOMAIN_JOB_DOWNTIMEZVIR_DOMAIN_JOB_DOWNTIME_NETZVIR_DOMAIN_JOB_ERRMSGZVIR_DOMAIN_JOB_MEMORY_BPSZVIR_DOMAIN_JOB_MEMORY_CONSTANTZ VIR_DOMAIN_JOB_MEMORY_DIRTY_RATEZVIR_DOMAIN_JOB_MEMORY_ITERATIONZVIR_DOMAIN_JOB_MEMORY_NORMALZ"VIR_DOMAIN_JOB_MEMORY_NORMAL_BYTESZVIR_DOMAIN_JOB_MEMORY_PAGE_SIZEZ#VIR_DOMAIN_JOB_MEMORY_POSTCOPY_REQSZVIR_DOMAIN_JOB_MEMORY_PROCESSEDZVIR_DOMAIN_JOB_MEMORY_REMAININGZVIR_DOMAIN_JOB_MEMORY_TOTALZVIR_DOMAIN_JOB_OPERATIONZVIR_DOMAIN_JOB_SETUP_TIMEZVIR_DOMAIN_JOB_SUCCESSZVIR_DOMAIN_JOB_TIME_ELAPSEDZVIR_DOMAIN_JOB_TIME_ELAPSED_NETZVIR_DOMAIN_JOB_TIME_REMAININGZ(VIR_DOMAIN_LAUNCH_SECURITY_SEV_API_MAJORZ(VIR_DOMAIN_LAUNCH_SECURITY_SEV_API_MINORZ'VIR_DOMAIN_LAUNCH_SECURITY_SEV_BUILD_IDZ*VIR_DOMAIN_LAUNCH_SECURITY_SEV_MEASUREMENTZ%VIR_DOMAIN_LAUNCH_SECURITY_SEV_POLICYZ%VIR_DOMAIN_LAUNCH_SECURITY_SEV_SECRETZ,VIR_DOMAIN_LAUNCH_SECURITY_SEV_SECRET_HEADERZ1VIR_DOMAIN_LAUNCH_SECURITY_SEV_SECRET_SET_ADDRESSZVIR_DOMAIN_MEMORY_HARD_LIMITZVIR_DOMAIN_MEMORY_MIN_GUARANTEEZVIR_DOMAIN_MEMORY_SOFT_LIMITZ!VIR_DOMAIN_MEMORY_SWAP_HARD_LIMITZVIR_DOMAIN_NUMA_MODEZVIR_DOMAIN_NUMA_NODESETZVIR_DOMAIN_SCHEDULER_CAPZVIR_DOMAIN_SCHEDULER_CPU_SHARESZ$VIR_DOMAIN_SCHEDULER_EMULATOR_PERIODZ#VIR_DOMAIN_SCHEDULER_EMULATOR_QUOTAZ"VIR_DOMAIN_SCHEDULER_GLOBAL_PERIODZ!VIR_DOMAIN_SCHEDULER_GLOBAL_QUOTAZ$VIR_DOMAIN_SCHEDULER_IOTHREAD_PERIODZ#VIR_DOMAIN_SCHEDULER_IOTHREAD_QUOTAZVIR_DOMAIN_SCHEDULER_LIMITZ VIR_DOMAIN_SCHEDULER_RESERVATIONZVIR_DOMAIN_SCHEDULER_SHARESZ VIR_DOMAIN_SCHEDULER_VCPU_PERIODZVIR_DOMAIN_SCHEDULER_VCPU_QUOTAZVIR_DOMAIN_SCHEDULER_WEIGHTZVIR_DOMAIN_TUNABLE_BLKDEV_DISKZ$VIR_DOMAIN_TUNABLE_BLKDEV_GROUP_NAMEZ(VIR_DOMAIN_TUNABLE_BLKDEV_READ_BYTES_SECZ,VIR_DOMAIN_TUNABLE_BLKDEV_READ_BYTES_SEC_MAXZ3VIR_DOMAIN_TUNABLE_BLKDEV_READ_BYTES_SEC_MAX_LENGTHZ'VIR_DOMAIN_TUNABLE_BLKDEV_READ_IOPS_SECZ+VIR_DOMAIN_TUNABLE_BLKDEV_READ_IOPS_SEC_MAXZ2VIR_DOMAIN_TUNABLE_BLKDEV_READ_IOPS_SEC_MAX_LENGTHZ'VIR_DOMAIN_TUNABLE_BLKDEV_SIZE_IOPS_SECZ)VIR_DOMAIN_TUNABLE_BLKDEV_TOTAL_BYTES_SECZ-VIR_DOMAIN_TUNABLE_BLKDEV_TOTAL_BYTES_SEC_MAXZ4VIR_DOMAIN_TUNABLE_BLKDEV_TOTAL_BYTES_SEC_MAX_LENGTHZ(VIR_DOMAIN_TUNABLE_BLKDEV_TOTAL_IOPS_SECZ,VIR_DOMAIN_TUNABLE_BLKDEV_TOTAL_IOPS_SEC_MAXZ3VIR_DOMAIN_TUNABLE_BLKDEV_TOTAL_IOPS_SEC_MAX_LENGTHZ)VIR_DOMAIN_TUNABLE_BLKDEV_WRITE_BYTES_SECZ-VIR_DOMAIN_TUNABLE_BLKDEV_WRITE_BYTES_SEC_MAXZ4VIR_DOMAIN_TUNABLE_BLKDEV_WRITE_BYTES_SEC_MAX_LENGTHZ(VIR_DOMAIN_TUNABLE_BLKDEV_WRITE_IOPS_SECZ,VIR_DOMAIN_TUNABLE_BLKDEV_WRITE_IOPS_SEC_MAXZ3VIR_DOMAIN_TUNABLE_BLKDEV_WRITE_IOPS_SEC_MAX_LENGTHZ!VIR_DOMAIN_TUNABLE_CPU_CPU_SHARESZ"VIR_DOMAIN_TUNABLE_CPU_EMULATORPINZ&VIR_DOMAIN_TUNABLE_CPU_EMULATOR_PERIODZ%VIR_DOMAIN_TUNABLE_CPU_EMULATOR_QUOTAZ$VIR_DOMAIN_TUNABLE_CPU_GLOBAL_PERIODZ#VIR_DOMAIN_TUNABLE_CPU_GLOBAL_QUOTAZ#VIR_DOMAIN_TUNABLE_CPU_IOTHREADSPINZ&VIR_DOMAIN_TUNABLE_CPU_IOTHREAD_PERIODZ%VIR_DOMAIN_TUNABLE_CPU_IOTHREAD_QUOTAZVIR_DOMAIN_TUNABLE_CPU_VCPUPINZ"VIR_DOMAIN_TUNABLE_CPU_VCPU_PERIODZ!VIR_DOMAIN_TUNABLE_CPU_VCPU_QUOTAZ)VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENTZ'VIR_MIGRATE_PARAM_AUTO_CONVERGE_INITIALZVIR_MIGRATE_PARAM_BANDWIDTHZ$VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPYZVIR_MIGRATE_PARAM_COMPRESSIONZ)VIR_MIGRATE_PARAM_COMPRESSION_MT_DTHREADSZ&VIR_MIGRATE_PARAM_COMPRESSION_MT_LEVELZ(VIR_MIGRATE_PARAM_COMPRESSION_MT_THREADSZ*VIR_MIGRATE_PARAM_COMPRESSION_XBZRLE_CACHEZVIR_MIGRATE_PARAM_DEST_NAMEZVIR_MIGRATE_PARAM_DEST_XMLZVIR_MIGRATE_PARAM_DISKS_PORTZVIR_MIGRATE_PARAM_DISKS_URIZVIR_MIGRATE_PARAM_GRAPHICS_URIZ VIR_MIGRATE_PARAM_LISTEN_ADDRESSZVIR_MIGRATE_PARAM_MIGRATE_DISKSZ&VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONSZVIR_MIGRATE_PARAM_PERSIST_XMLZ!VIR_MIGRATE_PARAM_TLS_DESTINATIONZVIR_MIGRATE_PARAM_URIZ%VIR_NETWORK_PORT_BANDWIDTH_IN_AVERAGEZ#VIR_NETWORK_PORT_BANDWIDTH_IN_BURSTZ#VIR_NETWORK_PORT_BANDWIDTH_IN_FLOORZ"VIR_NETWORK_PORT_BANDWIDTH_IN_PEAKZ&VIR_NETWORK_PORT_BANDWIDTH_OUT_AVERAGEZ$VIR_NETWORK_PORT_BANDWIDTH_OUT_BURSTZ#VIR_NETWORK_PORT_BANDWIDTH_OUT_PEAKZVIR_NODE_CPU_STATS_IDLEZVIR_NODE_CPU_STATS_INTRZVIR_NODE_CPU_STATS_IOWAITZVIR_NODE_CPU_STATS_KERNELZVIR_NODE_CPU_STATS_USERZVIR_NODE_CPU_STATS_UTILIZATIONZ!VIR_NODE_MEMORY_SHARED_FULL_SCANSZ)VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODESZ#VIR_NODE_MEMORY_SHARED_PAGES_SHAREDZ$VIR_NODE_MEMORY_SHARED_PAGES_SHARINGZ$VIR_NODE_MEMORY_SHARED_PAGES_TO_SCANZ%VIR_NODE_MEMORY_SHARED_PAGES_UNSHAREDZ%VIR_NODE_MEMORY_SHARED_PAGES_VOLATILEZ&VIR_NODE_MEMORY_SHARED_SLEEP_MILLISECSZVIR_NODE_MEMORY_STATS_BUFFERSZVIR_NODE_MEMORY_STATS_CACHEDZVIR_NODE_MEMORY_STATS_FREEZVIR_NODE_MEMORY_STATS_TOTALZVIR_NODE_SEV_CBITPOSZVIR_NODE_SEV_CERT_CHAINZVIR_NODE_SEV_MAX_ES_GUESTSZVIR_NODE_SEV_MAX_GUESTSZVIR_NODE_SEV_PDHZVIR_NODE_SEV_REDUCED_PHYS_BITSZVIR_PERF_PARAM_ALIGNMENT_FAULTSZ"VIR_PERF_PARAM_BRANCH_INSTRUCTIONSZVIR_PERF_PARAM_BRANCH_MISSESZVIR_PERF_PARAM_BUS_CYCLESZVIR_PERF_PARAM_CACHE_MISSESZVIR_PERF_PARAM_CACHE_REFERENCESZVIR_PERF_PARAM_CMTZVIR_PERF_PARAM_CONTEXT_SWITCHESZVIR_PERF_PARAM_CPU_CLOCKZVIR_PERF_PARAM_CPU_CYCLESZVIR_PERF_PARAM_CPU_MIGRATIONSZVIR_PERF_PARAM_EMULATION_FAULTSZVIR_PERF_PARAM_INSTRUCTIONSZVIR_PERF_PARAM_MBMLZVIR_PERF_PARAM_MBMTZVIR_PERF_PARAM_PAGE_FAULTSZVIR_PERF_PARAM_PAGE_FAULTS_MAJZVIR_PERF_PARAM_PAGE_FAULTS_MINZVIR_PERF_PARAM_REF_CPU_CYCLESZ%VIR_PERF_PARAM_STALLED_CYCLES_BACKENDZ&VIR_PERF_PARAM_STALLED_CYCLES_FRONTENDZVIR_PERF_PARAM_TASK_CLOCKrrrr�<module>s
(0@&&0,		4ARgxh,Ig?6_q

Youez - 2016 - github.com/yon3zu
LinuXploit