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    
contego / home / tvault / .virtenv / lib / python2.7 / site-packages / nova / virt / libvirt / instancejobtracker.pyc
Size: Mime:
ó
±EYc@s‰ddlZddlZddlZddlZddlmZddlmZddlm	Z	ej
eƒZde
fd„ƒYZdS(iÿÿÿÿN(tlog(t_LE(t_LWtInstanceJobTrackercBs,eZd„Zd„Zd„Zd„ZRS(cCstjtƒ|_dS(N(tcollectionstdefaultdicttlisttjobs(tself((sY/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/instancejobtracker.pyt__init__scCs|j|jj|ƒdS(s‹Appends process_id of instance to cache.

        This method will store the pid of a process in cache as
        a key: value pair which will be used to kill the process if it
        is running while deleting the instance. Instance uuid is used as
        a key in the cache and pid will be the value.

        :param instance: Object of instance
        :param pid: Id of the process
        N(Rtuuidtappend(Rtinstancetpid((sY/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/instancejobtracker.pytadd_job"scCsi|j}||jkrB||j|krB|j|j|ƒn|j|se|jj|dƒndS(sÄRemoves pid of process from cache.

        This method will remove the pid of a process from the cache.

        :param instance: Object of instance
        :param pid: Id of the process
        N(R
RtremovetpoptNone(RRR
R
((sY/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/instancejobtracker.pyt
remove_job/s
	"
cCs4t|jj|jgƒƒ}x|D]}ytj|tjƒWnRtk
r–}|j	t	j
kr—tjt
dƒi|d6|d6d|ƒq—nXytj|dƒWnKtk
rø}|j	t	j
krtjt
dƒi|d6d|ƒqn$Xtjtdƒi|d6d|ƒ|j||ƒq%WdS(	sÕKills the running processes for given instance.

        This method is used to kill all running processes of the instance if
        it is deleted in between.

        :param instance: Object of instance
        sNFailed to kill process %(pid)s due to %(reason)s, while deleting the instance.R
treasonRis0Unexpected error while checking process %(pid)s.sWFailed to kill a long running process %(pid)s related to the instance when deleting it.N(RRtgetR
tostkilltsignaltSIGKILLtOSErrorterrnotESRCHtLOGterrorRtwarningRR(RRtpids_to_removeR
texc((sY/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/instancejobtracker.pytterminate_jobs?s(


(t__name__t
__module__R	RRR!(((sY/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/instancejobtracker.pyRs		
	(RRRRtoslo_logRtloggingt	nova.i18nRRt	getLoggerR"RtobjectR(((sY/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/instancejobtracker.pyt<module>s