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    
idna / lib / python2.7 / site-packages / nova / virt / libvirt / volume / glusterfs.pyc
Size: Mime:
ó
±EYc@s¶ddlmZddlmZddlZddlZddlm	Z	m
Z
ddlmZddlmZ
ddlmZejjZejeƒZdejfd„ƒYZdS(	iÿÿÿÿ(tprocessutils(tlogN(t_LEt_LW(tutils(tfstLibvirtGlusterfsVolumeDrivercBsJeZdZd„Zd„Zd„Zd„Zd„Zde	d„Z
RS(s=Class implements libvirt part of volume driver for GlusterFS.cCs
tjjS(N(tCONFtlibvirttglusterfs_mount_point_base(tself((sW/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/volume/glusterfs.pyt_get_mount_point_base scCsätt|ƒj||ƒ}|d}dtjjkr­|djdƒd}|djdƒdd }dg|_d	|_d|_	|g|_
d
||df|_nd|_|dd
|_|dj
ddƒ|_|S(sReturns xml for libvirt.tdatatglustertexportt/iiiÿÿÿÿt24007tnetworks%s/%stnametfiletdevice_pathtformattraw(tsuperRt
get_configRRtqemu_allowed_storage_driverstsplittsource_portstsource_typetsource_protocoltsource_hoststsource_nametsource_pathtgett
driver_format(R
tconnection_infot	disk_infotconfRtvol_nametsource_host((sW/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/volume/glusterfs.pyR#s
			cCs=dtjjkr9|j|ƒ|j|ƒ|dd<ndS(NR
RR(RRRt_ensure_mountedt_get_device_path(R
R#tmount_device((sW/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/volume/glusterfs.pytconnect_volume;s
cCs¨dtjjkrdS|j|ƒ}ytjd|dtƒWnbtjk
r£}|dd}dt	j
|ƒkrŠtjd|ƒq¤tj
td	ƒ|ƒnXdS(
sDisconnect the volume.R
Ntumounttrun_as_rootRRstarget is busys'The GlusterFS share %s is still in use.s'Couldn't unmount the GlusterFS share %s(RRRt_get_mount_pathRtexecutetTrueRtProcessExecutionErrortsixt	text_typetLOGtdebugt	exceptionR(R
R#tdisk_devt
mount_pathtexcR((sW/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/volume/glusterfs.pytdisconnect_volumeAscCsb|dd}|j|ƒ}tj||ƒs^|djdƒ}|j|||dtƒn|S(s$@type connection_info: dict
        RRtoptionstensure(R.t
libvirt_utilst
is_mountedR!t_mount_glusterfsR0(R
R#tglusterfs_exportR8R;((sW/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/volume/glusterfs.pyR(SscCsÅtjdd|ƒdddg}|d
k	rG|j|jdƒƒn|j||gƒytjdt|ŒWnMtjk
rÀ}|rºdtj	|ƒkrºt
jtd	ƒ|ƒqÁ‚nXd
S(s%Mount glusterfs export to mount path.tmkdirs-ptmounts-tt	glusterfst R-salready mounteds%s is already mountedN(
RR/tNonetextendRR0RR1R2R3R4twarningR(R
R8tglusterfs_shareR;R<tgluster_cmdR9((sW/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/volume/glusterfs.pyR?^sN(t__name__t
__module__t__doc__RRR+R:R(REtFalseR?(((sW/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/volume/glusterfs.pyRs					(toslo_concurrencyRtoslo_logRtloggingR2t	nova.conftnovat	nova.i18nRRRtnova.virt.libvirtR=tnova.virt.libvirt.volumeRR%Rt	getLoggerRJR4t!LibvirtBaseFileSystemVolumeDriverR(((sW/home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/volume/glusterfs.pyt<module>s