Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
±EYc@sdZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlmZddlZdd	l
mZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZeaejeƒZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(iej)e!6ej*e"6ej*e#6ej+e$6ej,e%6ej,e&6ej-e'6ej.e(6Z/de0fd„ƒYZ1de0fd„ƒYZ2de0fd„ƒYZ3d e0fd!„ƒYZ4d"e0fd#„ƒYZ5dS($sÏ
Manages information about the guest.

This class encapsulates libvirt domain provides certain
higher level APIs around the raw libvirt API. These APIs are
then used by all the other libvirt related classes
iÿÿÿÿ(tetree(tlog(tloopingcall(tencodeutils(texcutils(timportutilsN(tpower_state(t	exception(t_(t_LE(t_LW(tutils(thardware(tcompat(tconfigiiiiiiiitGuestcBsßeZd„Zd„Zed„ƒZed„ƒZed„ƒZed„ƒZe	d„ƒZ
ed„Zd„Z
d	„Zd
„Zd„Zd„Zd
„Zd„Zd„Zd„Zd„Zeed„Zd„Zd„Zd.d„Zdddd„Zeed„Zeeed„Zd„Zd„Z d„Z!d„Z"d „Z#d!„Z$d"„Z%d#„Z&d$„Z'eeeed%„Z(d&„Z)d'„Z*d.d.d(d.d(d)„Z+d*„Z,d+„Z-d,„Z.d-„Z/RS(/cCs+tdkrtjdƒan||_dS(Ntlibvirt(RtNoneRt
import_modulet_domain(tselftdomain((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyt__init__RscCs&di|jd6|jd6|jd6S(Ns <Guest %(id)d %(name)s %(uuid)s>tidtnametuuid(RRR(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyt__repr__Zs

cCs
|jjƒS(N(RtID(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRascCs
|jjƒS(N(Rt
UUIDString(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRescCs
|jjƒS(N(RR(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRiscCstj|jjdƒƒS(Ni(Rtsafe_decodeRtXMLDesc(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyt_encoded_xmlmscCscy|j|ƒ}WnCtk
rXtjƒ$tjtdƒtj|ƒƒWdQXnX||ƒS(sÒCreate a new Guest

        :param xml: XML definition of the domain to create
        :param host: host.Host connection to define the guest on

        :returns guest.Guest: Guest ready to be launched
        s$Error defining a domain with XML: %sN(	twrite_instance_configt	ExceptionRtsave_and_reraise_exceptiontLOGterrorR	RR(tclstxmlthostR((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytcreateqs	

cCss|rtjpd}y|jj|ƒSWnCtk
rntjƒ$tjt	dƒ|j
ddƒWdQXnXdS(sfStarts a created guest.

        :param pause: Indicates whether to start and pause the guest
        is-Error launching a defined domain with XML: %sterrorstignoreN(RtVIR_DOMAIN_START_PAUSEDRtcreateWithFlagsR!RR"R#R$R	R(Rtpausetflags((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytlaunch„s

cCs|jjƒdS(sStops a running guest.N(Rtdestroy(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytpoweroff’scCsftjƒ}t|ƒ}t||dƒ}y%|jjdi|d6|d6ƒWnòtjk
r}|jƒ}|tjkrštj	dd|j
ƒqb|tjkrÂtj	dd|j
ƒqb|tjkrêtj	d	d|j
ƒqbtj
td
ƒi|d6d|j
ƒnOtk
rE}tj	d
i|d6d|j
ƒnXtj	d||d|j
ƒd
S(sØTry to set VM time to the current value.  This is typically useful
        when clock wasn't running on the VM for some time (e.g. during
        suspension or migration), especially if the time delay exceeds NTP
        tolerance.

        It is not guaranteed that the time is actually set (it depends on guest
        environment, especially QEMU agent presence) or that the set time is
        very precise (NTP in the guest should take care of it if needed).
        i
i	ttimetsecondstnsecondss+Failed to set time: QEMU agent unresponsivet
instance_uuids!Failed to set time: not supporteds(Failed to set time: agent not configuredsFailed to set time: %(reason)streasonsTime updated to: %d.%09dNiʚ;(R2tintRtsetTimeRtlibvirtErrortget_error_codetVIR_ERR_AGENT_UNRESPONSIVER#tdebugRtVIR_ERR_NO_SUPPORTtVIR_ERR_ARGUMENT_UNSUPPORTEDtwarningR
R!(RttR3R4tetcodetex((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytsync_guest_time–s0



	cCs|jjƒdS(sInjects an NMI to a guest.N(Rt	injectNMI(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyt
inject_nmi¾scCs|jjƒdS(sResumes a paused guest.N(Rtresume(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRGÂscCs—|jƒ}yAx:|D]2}tjdd|dddtdddgƒqWWnCtk
r’tjƒ$tjt	d	ƒ|j
d
dƒWdQXnXdS(
s$Enables hairpin mode for this guest.ttees%/sys/class/net/%s/brport/hairpin_modet
process_inputt1trun_as_roottcheck_exit_codeiis(Error enabling hairpin mode with XML: %sR)R*N(tget_interfacesRtexecutetTrueR!RR"R#R$R	R(Rt
interfacest	interface((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytenable_hairpinÆs



cCsqd}ytj|jƒ}Wntk
r0gSXg}|jdƒ}x$|D]}|j|jdƒƒqMW|S(s9Returns a list of all network interfaces for this domain.s./devices/interface/targettdevN(RRt
fromstringRR!tfindalltappendtget(RtdocRPtnodesttarget((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRMÖs

cCsC|r?|jtjƒ}x$|D]}|j|kr|SqWndS(sLookup a LibvirtConfigGuestInterface by the MAC address.

        :param mac: MAC address of the guest interface.
        :type mac: str
        :returns: nova.virt.libvirt.config.LibvirtConfigGuestInterface instance
            if found, else None
        N(tget_all_devicestvconfigtLibvirtConfigGuestInterfacetmac_addr(RtmacRPRQ((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytget_interface_by_macçs	
ccsg|jjƒ}|d	k	rcxE|dD]6}td|dd|dd|dd|dƒVq&Wnd	S(
sUReturns virtual cpus information of guest.

        :returns: guest.VCPUInfo
        iRtcpuitstateiR2iN(RtvcpusRtVCPUInfo(RRctvcpu((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytget_vcpus_info÷s
cCs¬y|jjtjƒWnŽtjk
rMtjd|jƒ|jjƒn[t	k
r§y)|jj
dƒr‚|jjdƒnWnt	k
r–nX|jjƒnXdS(s#Undefines a domain from hypervisor.sAError from libvirt during undefineFlags. %dRetrying with undefineiN(Rt
undefineFlagsRt VIR_DOMAIN_UNDEFINE_MANAGED_SAVER9R#R<RtundefinetAttributeErrorthasManagedSaveImagetmanagedSaveRemove(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytdelete_configurations		


cCs
|jjƒS(s9Whether domain config is persistently stored on the host.(RtisPersistent(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pythas_persistent_configurationscCsd|rtjpd}||r'tjp*dO}|jƒ}tjd|ƒ|jj|d|ƒdS(sEAttaches device to the guest.

        :param conf: A LibvirtConfigObject of the device to attach
        :param persistent: A bool to indicate whether the change is
                           persistent or not
        :param live: A bool to indicate whether it affect the guest
                     in running state
        isattach device xml: %sR.N(RtVIR_DOMAIN_AFFECT_CONFIGtVIR_DOMAIN_AFFECT_LIVEtto_xmlR#R<RtattachDeviceFlags(Rtconft
persistenttliveR.t
device_xml((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyt
attach_devices
	cCstytj|jjdƒƒ}Wntk
r3dSX|jd|ƒ}|dk	rptjƒ}|j	|ƒ|SdS(snReturns the disk mounted at device

        :returns LivirtConfigGuestDisk: mounted at device or None
        is"./devices/disk/target[@dev='%s']..N(
RRTRRR!RtfindR\tLibvirtConfigGuestDiskt	parse_dom(RtdeviceRXtnodeRt((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytget_disk(s

cCs|jtjƒS(shReturns all the disks for a guest

        :returns: a list of LibvirtConfigGuestDisk instances
        (R[R\Rz(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyt
get_all_disks7scCs‡y)tjƒ}|j|jjdƒƒWntk
r=gSXg}x<|jD]1}|dksot||ƒrN|j	|ƒqNqNW|S(s«Returns all devices for a guest

        :param devtype: a LibvirtConfigGuestDevice subclass class

        :returns: a list of LibvirtConfigGuestDevice instances
        iN(
R\tLibvirtConfigGuestt	parse_strRRR!tdevicesRt
isinstanceRV(RtdevtypeRtdevsRS((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyR[?s
iiic
	sƒˆˆƒ}|dkr-tjdˆƒ‚nˆj||ˆƒtjd|d|d|dtjƒ‡‡‡‡fd†ƒ}	|	S(sÈDetaches a device from the guest. After the initial detach request,
        a function is returned which can be used to ensure the device is
        successfully removed from the guest domain (retrying the removal as
        necessary).

        :param get_device_conf_func: function which takes device as a parameter
                                     and returns the configuration for device
        :param device: device to detach
        :param persistent: bool to indicate whether the change is
                           persistent or not
        :param live: bool to indicate whether it affects the guest in running
                     state
        :param max_retry_count: number of times the returned function will
                                retry a detach before failing
        :param inc_sleep_time: incremental time to sleep in seconds between
                               detach retries
        :param max_sleep_time: max sleep time in seconds beyond which the sleep
                               time will not be incremented using param
                               inc_sleep_time. On reaching this threshold,
                               max_sleep_time will be used as the sleep time.
        R|tmax_retry_counttinc_sleep_timetmax_sleep_timet
exceptionscs׈ˆƒ}|dk	rÓyˆj|dtdˆƒWnttjk
r«}tjƒP|jƒ}|tjkr¢|j	ƒ}d|kr¢t
jdˆƒ‚q¢nWdQXnXtdƒ}t
j
dˆd|ƒ‚ndS(NRuRvs	not foundR|s-Unable to detach from guest transient domain.R6(Rt
detach_devicetFalseRR9RR"R:tVIR_ERR_OPERATION_FAILEDtget_error_messageRtDeviceNotFoundRtDeviceDetachFailed(RRCterrcodeterrmsgR6(R|tget_device_conf_funcRvR(sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyt_do_wait_and_retry_detachus
"N(RRRŽRŠRtRetryDecoratorR(
RR’R|RuRvR†R‡RˆRtR“((R|R’RvRsL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytdetach_device_with_retryUs$cCsd|rtjpd}||r'tjp*dO}|jƒ}tjd|ƒ|jj|d|ƒdS(sEDetaches device to the guest.

        :param conf: A LibvirtConfigObject of the device to detach
        :param persistent: A bool to indicate whether the change is
                           persistent or not
        :param live: A bool to indicate whether it affect the guest
                     in running state
        isdetach device xml: %sR.N(RRpRqRrR#R<RtdetachDeviceFlags(RRtRuRvR.Rw((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRŠŽs
	c	CsZ|rtjpd}||r'tjp*dO}||r@tjpCdO}|jjd|ƒS(s$Returns xml description of guest.

        :param dump_inactive: Dump inactive domain information
        :param dump_sensitive: Dump security sensitive information
        :param dump_migratable: Dump XML suitable for migration

        :returns string: XML description of the guest
        iR.(RtVIR_DOMAIN_XML_INACTIVEtVIR_DOMAIN_XML_SECUREtVIR_DOMAIN_XML_MIGRATABLERR(Rt
dump_inactivetdump_sensitivetdump_migratableR.((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytget_xml_descs
cCs|jjdƒdS(spSaves the domain's memory state. Requires running domain.

        raises: raises libvirtError on error
        iN(RtmanagedSave(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytsave_memory_state¬scCs
t||ƒS(s(Returns a block device wrapper for disk.(tBlockDevice(Rtdisk((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytget_block_device³scCs|jj||dƒdS(sConfigures a new user password.iN(RtsetUserPassword(Rtusertnew_pass((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytset_user_password·scCstjt||jƒS(s%Returns information on Guest

        :param host: a host.Host object with current
                     connection. Unfortunately we need to pass it
                     because of a workaround with < version 1.2..11

        :returns list: [state, maxMem, memory, nrVirtCpu, cpuTime]
        (R
tget_domain_infoRR(RR'((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyt_get_domain_info»s	c
Csßy|j|ƒ}Wn€tjk
r•}|jƒ}|tjkr[tjd|jƒ‚ntdƒi|j	d6|d6|d6}tj
|ƒ‚nXtjdt
|dd|d	d
|dd|d
d|dd|jƒS(s Retrieve information from libvirt for a specific instance name.

        If a libvirt error is encountered during lookup, we might raise a
        NotFound exception or Error exception depending on how severe the
        libvirt error is.

        :returns hardware.InstanceInfo:
        tinstance_idsfError from libvirt while getting domain info for %(instance_name)s: [Error Code %(error_code)s] %(ex)st
instance_namet
error_codeRCRbit
max_mem_kbitmem_kbitnum_cpuitcpu_time_nsiR(R¨RR9R:tVIR_ERR_NO_DOMAINRtInstanceNotFoundRRRt
NovaExceptionRtInstanceInfotLIBVIRT_POWER_STATER(RR'tdom_infoRCR«tmsg((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytget_infoÆs$		
	



cCs|j|ƒjS(N(R·Rb(RR'((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytget_power_stateåscCs
|jjƒS(s.Determines whether guest is currently running.(RtisActive(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyt	is_activeèscCs|jjƒdS(s Freeze filesystems within guest.N(RtfsFreeze(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytfreeze_filesystemsìscCs|jjƒdS(sThaw filesystems within guest.N(RtfsThaw(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytthaw_filesystemsðscCs€|otjpd}||o*tjp*dO}||oCtjpCdO}||rYtjp\dO}|jj|jƒd|ƒdS(s]Creates a guest snapshot.

        :param conf: libvirt.LibvirtConfigGuestSnapshotDisk
        :param no_metadata: Make snapshot without remembering it
        :param disk_only: Disk snapshot, no system checkpoint
        :param reuse_ext: Reuse any existing external files
        :param quiesce: Use QGA to quiece all mounted file systems
        iR.N(Rt&VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATAt$VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLYt$VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXTt"VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCERtsnapshotCreateXMLRr(RRttno_metadatat	disk_onlyt	reuse_exttquiesceR.((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytsnapshotôs
cCs|jjƒdS(sShutdown guestN(Rtshutdown(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRÉscCs|jjƒdS(sýSuspends an active guest

        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.

        See method "resume()" to reactive guest.
        N(Rtsuspend(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyR-s	ic
Cs|dkr+|jj|d|d|ƒn`|rc|rD||d<n|jj|d|d|ƒn(|jj|d|d|d|d|ƒdS(s¦Migrate guest object from its current host to the destination

        :param destination: URI of host destination where guest will be migrate
        :param migrate_uri: URI for invoking the migration
        :param flags: May be one of more of the following:
           VIR_MIGRATE_LIVE Do not pause the VM during migration
           VIR_MIGRATE_PEER2PEER Direct connection between source &
                                 destination hosts
           VIR_MIGRATE_TUNNELLED Tunnel migration data over the
                                 libvirt RPC channel
           VIR_MIGRATE_PERSIST_DEST If the migration is successful,
                                    persist the domain on the
                                    destination host.
           VIR_MIGRATE_UNDEFINE_SOURCE If the migration is successful,
                                       undefine the domain on the
                                       source host.
           VIR_MIGRATE_PAUSED Leave the domain suspended on the remote
                              side.
           VIR_MIGRATE_NON_SHARED_DISK Migration with non-shared
                                       storage with full disk copy
           VIR_MIGRATE_NON_SHARED_INC Migration with non-shared
                                      storage with incremental disk
                                      copy
           VIR_MIGRATE_CHANGE_PROTECTION Protect against domain
                                         configuration changes during
                                         the migration process (set
                                         automatically when
                                         supported).
           VIR_MIGRATE_UNSAFE Force migration even if it is considered
                              unsafe.
           VIR_MIGRATE_OFFLINE Migrate offline
        :param domain_xml: Changing guest configuration during migration
        :param bandwidth: The maximun bandwidth in MiB/s
        R.t	bandwidthtmigrate_uritparamstmiguritdxmlN(RRtmigrateToURIt
migrateToURI3t
migrateToURI2(RtdestinationRÌRÍR.t
domain_xmlRË((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytmigrates$	
		cCs|jjƒdS(s(Requests to abort current background jobN(RtabortJob(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyt	abort_jobJscCs|jj|ƒdS(suSets maximum time for which domain is allowed to be paused

        :param mstime: Downtime in milliseconds.
        N(RtmigrateSetMaxDowntime(Rtmstime((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytmigrate_configure_max_downtimeNscCs|jjƒdS(s/Switch running live migration to post-copy modeN(RtmigrateStartPostCopy(R((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytmigrate_start_postcopyUscCstjr	y|jjƒ}t|SWqtjk
rÍ}|jƒtjkrytj	d|ƒt
t_tj|jƒS|jƒtjtj
fkr·tj	d|ƒtdtjƒStj	d|ƒ‚qtk
r}tj	d|ƒt
t_tj|jƒSXntj|jƒSdS(s·Get job info for the domain

        Query the libvirt job info for the domain (ie progress
        of migration, or snapshot operation)

        :returns: a JobInfo of guest
        s'Missing remote virDomainGetJobStats: %ss!Domain has shutdown/gone away: %sttypesFailed to get job stats: %ss&Missing local virDomainGetJobStats: %sN(tJobInfot_have_job_statsRtjobStatsRR9R:R=R#R<R‹t_get_job_stats_compatR°tVIR_ERR_OPERATION_INVALIDtVIR_DOMAIN_JOB_COMPLETEDRj(RtstatsRC((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytget_job_infoYs*				N(0t__name__t
__module__RRtpropertyRRRRtclassmethodR(R‹R/R1RDRFRGRRRMR`RfRmRoRxR~RRR[R•RŠRRŸR¢R¦R¨R·R¸RºR¼R¾RÈRÉR-RÕR×RÚRÜRå(((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRPs^				(										6												3			R cBsteZdZdZdZd„Zeed„Zd„Zeeeed„Z	ed„Z
d„Zeed„ZRS(	sWrapper around block device APIicCs||_||_dS(N(t_guestt_disk(RtguestR¡((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyR„s	cCsN|rtjpd}||r'tjp*dO}|jjj|jd|ƒdS(sèRequest to cancel any job currently running on the block.

        :param async: Request only, do not wait for completion
        :param pivot: Pivot to new file when ending a copy or
                      active commit job
        iR.N(Rt VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNCt VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOTRêRt
blockJobAbortRë(RtasynctpivotR.((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyR׈scCs}|jjj|jddƒ}|dkrytd|jddƒd|jddƒd|jddƒd|jddƒƒSd	S(
sfReturns information about job currently running

        :returns: BlockDeviceJobInfo or None
        R.iiÿÿÿÿtjobRÝRËtcurtendN(RêRtblockJobInfoRëtBlockDeviceJobInfoRW(Rtstatus((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRå“scCs…|rtjpd}||r'tjp*dO}||r@tjpCdO}||rYtjp\dO}|jjj|j||j	d|ƒS(sRebases block to new base

        :param shallow: Limit copy to top of source backing chain
        :param reuse_ext: Reuse existing external file of a copy
        :param copy: Start a copy job
        :param relative: Keep backing chain referenced using relative names
        iR.(
RtVIR_DOMAIN_BLOCK_REBASE_SHALLOWt!VIR_DOMAIN_BLOCK_REBASE_REUSE_EXTtVIR_DOMAIN_BLOCK_REBASE_COPYt VIR_DOMAIN_BLOCK_REBASE_RELATIVERêRtblockRebaseRëtREBASE_DEFAULT_BANDWIDTH(RtbasetshallowRÆtcopytrelativeR.((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytrebase s	c	Cs=|rtjpd}|jjj|j|||jd|ƒS(sÓCommit on block device

        For performance during live snapshot it will reduces the disk chain
        to a single disk.

        :param relative: Keep backing chain referenced using relative names
        iR.(Rt VIR_DOMAIN_BLOCK_COMMIT_RELATIVERêRtblockCommitRëtCOMMIT_DEFAULT_BANDWIDTH(RRþttopRR.((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytcommit°scCs|jjj|j|ƒdS(s!Resizes block device to Kib size.N(RêRtblockResizeRë(Rtsize_kb((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytresize¼scCsx|jƒ}|s:|r6tdƒ}tj|ƒ‚ntS|rR|jdk}n!|jdkop|j|jk}|S(sªWait for libvirt block job to complete.

        Libvirt may return either cur==end or an empty dict when
        the job is complete, depending on whether the job has been
        cleaned up by libvirt yet, or not.
        It can also return end=0 if qemu has not yet started the block
        operation.

        :param abort_on_error: Whether to stop process and raise NovaException
                               on error (default: False)
        :param wait_for_job_clean: Whether to force wait to ensure job is
                                   finished (see bug: RH Bugzilla#1119173)

        :returns: True if still in progress
                  False if completed
        s-libvirt error while requesting blockjob info.i(RåRRR²R‹RòRôRó(Rtabort_on_errortwait_for_job_cleanR÷R¶t	job_ended((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pytwait_for_jobÀs!(
RæRçt__doc__RýRRR‹R×RåRRR
R(((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyR ~s		
	RdcBseZd„ZRS(cCs(||_||_||_||_dS(sDStructure for information about guest vcpus.

        :param id: The virtual cpu number
        :param cpu: The host cpu currently associated
        :param state: The running state of the vcpu (0 offline, 1 running, 2
                      blocked on resource)
        :param time: The cpu time used in nanoseconds
        N(RRaRbR2(RRRaRbR2((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRäs				(RæRçR(((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRdãsRöcBseZd„ZRS(cCs(||_||_||_||_dS(sPStructure for information about running job.

        :param job: The running job (0 placeholder, 1 pull,
                      2 copy, 3 commit, 4 active commit)
        :param bandwidth: Used in MiB/s
        :param cur: Indicates the position between 0 and 'end'
        :param end: Indicates the position for this operation
        N(RòRËRóRô(RRòRËRóRô((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRôs				(RæRçR(((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRöósRÞcBs,eZdZeZd„Zed„ƒZRS(s>Information about libvirt background jobs

    This class encapsulates information about libvirt
    background jobs. It provides a mapping from either
    the old virDomainGetJobInfo API which returned a
    fixed list of fields, or the modern virDomainGetJobStats
    which returns an extendable dict of fields.
    cKs|jdtjƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jddƒ|_	|jd	dƒ|_
|jd
dƒ|_|jddƒ|_|jddƒ|_
|jd
dƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jddƒ|_dS(NRÝttime_elapsedittime_remainingtdowntimet
setup_timet
data_totaltdata_processedtdata_remainingtmemory_totaltmemory_processedtmemory_remainingtmemory_iterationtmemory_constantt
memory_normaltmemory_normal_bytest
memory_bpst
disk_totaltdisk_processedtdisk_remainingtdisk_bpstcompression_cachetcompression_bytestcompression_pagestcompression_cache_missestcompression_overflow(RWRtVIR_DOMAIN_JOB_NONERÝRRRRRRRRRRRRRRRRR R!R"t
comp_cachet
comp_bytest
comp_pagestcomp_cache_missest
comp_overflow(Rtkwargs((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRs2cCsùy|jƒ}Wngtjk
ry}|jƒtjtjfkrctjd|ƒ|dtjƒStjd|ƒ‚nX|d|dd|dd|dd	|d
d|dd
|dd|dd|dd|dd|dd|dd|dƒS(Ns!Domain has shutdown/gone away: %sRÝsFailed to get job info: %siRiRiRiRiRiRiRiRiRi	R i
R!i(	tjobInfoRR9R:R°RâR#R<Rã(R%tdomtinfoRC((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRá+s,	










(RæRçRRORßRRéRá(((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyRÞs	(6RtlxmlRtoslo_logRtloggingtoslo_serviceRt
oslo_utilsRRRR2tnova.computeRtnovaRt	nova.i18nRR	R
Rt	nova.virtRtnova.virt.libvirtR
RR\RRt	getLoggerRæR#tVIR_DOMAIN_NOSTATEtVIR_DOMAIN_RUNNINGtVIR_DOMAIN_BLOCKEDtVIR_DOMAIN_PAUSEDtVIR_DOMAIN_SHUTDOWNtVIR_DOMAIN_SHUTOFFtVIR_DOMAIN_CRASHEDtVIR_DOMAIN_PMSUSPENDEDtNOSTATEtRUNNINGtPAUSEDtSHUTDOWNtCRASHEDt	SUSPENDEDR´tobjectRR RdRöRÞ(((sL/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/guest.pyt<module>sT







ÿÿ0e