%PDF- %PDF-
| Direktori : /proc/self/root/proc/self/root/proc/self/root/lib/python2.7/site-packages/salt/modules/ |
| Current File : //proc/self/root/proc/self/root/proc/self/root/lib/python2.7/site-packages/salt/modules/guestfs.pyc |
�
���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l Z d d l Z
e j e � Z
d � Z d d d � Z d S( uO
Interact with virtual machine images via libguestfs
:depends: - libguestfs
i ( t absolute_importt unicode_literalst print_functionNc C@ s# t j j j d � r d St d f S( u?
Only load if libguestfs python bindings are installed
u
guestmountu guestfsuM The guestfs execution module cannot be loaded: guestmount binary not in path.( t saltt utilst patht whicht False( ( ( s8 /usr/lib/python2.7/site-packages/salt/modules/guestfs.pyt __virtual__ s u rwc C@ s\ | d k rU t j j t j � d | j t j � j d d � � } t j
d | � n t j j | � s� y t j | � Wq� t
k
r� q� Xn x� t r.t j | � r*t t t j d d � � } | t j d � � j � } t j j t j � d | j t j � j d d � | � } t j
d | � q� Pq� Wd j | | | � } t d
| d t �| S(
uz
Mount an image
CLI Example:
.. code-block:: bash
salt '*' guest.mount /srv/images/fedora.qcow
u guestu /u .u
Using root %su hash_typeu md5i u Establishing new root as %su guestmount -i -a {0} --{1} {2}u cmd.runt python_shellN( t Nonet osR t joint tempfilet
gettempdirt lstript sept replacet logt debugt isdirt makedirst OSErrort Truet listdirt getattrt hashlibt __opts__t gett urandomt hexdigestt formatt __salt__R ( t locationt accesst roott hash_typet randt cmd( ( s8 /usr/lib/python2.7/site-packages/salt/modules/guestfs.pyt mount s0
!
%( t __doc__t
__future__R R R R R
R t loggingt salt.utils.pathR t getLoggert __name__R R R
R'