%PDF- %PDF-
| Direktori : /proc/self/root/proc/self/root/usr/lib/python2.7/site-packages/salt/modules/ |
| Current File : //proc/self/root/proc/self/root/usr/lib/python2.7/site-packages/salt/modules/moosefs.pyo |
�
���^c @@ se d Z d d l m Z m Z m Z d d l Z d � Z d d � Z d � Z
d � Z d d � Z d S( u=
Module for gathering and managing information about MooseFS
i ( t absolute_importt print_functiont unicode_literalsNc C@ s# t j j j d � r d St d f S( u5
Only load if the mfs commands are installed
u
mfsgetgoalu moosefsuX The moosefs execution module cannot be loaded: the mfsgetgoal binary is not in the path.( t saltt utilst patht whicht False( ( ( s8 /usr/lib/python2.7/site-packages/salt/modules/moosefs.pyt __virtual__ s c C@ s� d } i } | r# | d | 7} n | d | 7} t d | d t �} | d j � } xG | D]? } | sp q^ n | j d � } | d j � | | d j � <q^ W| S(
u�
Return information on a directory located on the Moose
CLI Example:
.. code-block:: bash
salt '*' moosefs.dirinfo /path/to/dir/ [-[n][h|H]]
u
mfsdirinfou -u u cmd.run_allt python_shellu stdoutu :i i ( t __salt__R t
splitlinest splitt strip( R t optst cmdt rett outt outputt linet comps( ( s8 /usr/lib/python2.7/site-packages/salt/modules/moosefs.pyt dirinfo s
"c C@ s� d | } i } d } t d | d t �} | d j � } x_| D]W} | sU qC n d | k r-| j d � } | d j � j d � } | d j � j d
� } | d j d d � } | d j � }
| d j d d � } | d j d
d � j d d � } i | d 6|
d 6| d 6| d 6| | d <n d | k rC | j � j d � }
i |
d j d d � d 6|
d j � d 6|
d d 6| | d |
d <qC qC W| S( u�
Return information on a file located on the Moose
CLI Example:
.. code-block:: bash
salt '*' moosefs.fileinfo /path/to/dir/
u mfsfileinfo u u cmd.run_allR u stdoutu /i u :i u u chunk u (id:u )u ver:u chunku locu idu veru copyu copy u ipi u port( R
R R R R
t replace( R R R t chunknumR R R R t metat chunkt loct id_t vert copyinfo( ( s8 /usr/lib/python2.7/site-packages/salt/modules/moosefs.pyt fileinfo. s8
"%c C@ s d } i } t d | � } | d j � } x� | D]� } | sE q3 n d | k r3 | j d � } | d j d � } | d j d � } i i | d d
6| d d 6d | d d 6d
6| d d 6| d j d d � j d d � j d � d 6| | d <q3 q3 W| S( u~
Return a list of current MooseFS mounts
CLI Example:
.. code-block:: bash
salt '*' moosefs.mounts
u mountu cmd.run_allu stdoutu fuse.mfsu i u :i u /u masteru portu subfolderu remotei u locali u (u u )u ,u options( R
R R R ( R R R R R R t info1t info2( ( s8 /usr/lib/python2.7/site-packages/salt/modules/moosefs.pyt mounts\ s(
"c
C@ s d } i } | r# | d | 7} n d } | d | 7} t d | d t �} | d j � } d | k r� | d j d
� } i | d d 6} nx xu | D]m } | s� q� n | | k r� q� n | j � } | d d
} | | k r� i | | <n | d | | | d <q� W| S( u�
Return goal(s) for a file or directory
CLI Example:
.. code-block:: bash
salt '*' moosefs.getgoal /path/to/file [-[n][h|H]]
salt '*' moosefs.getgoal /path/to/dir/ [-[n][h|H][r]]
u
mfsgetgoalu -u u u cmd.run_allR u stdoutu ri u : i u goalu
with goali i ( R
R R R (
R R R R R R t goalR R t keytext( ( s8 /usr/lib/python2.7/site-packages/salt/modules/moosefs.pyt getgoal s.
(
t __doc__t
__future__R R R t salt.utils.pathR R t NoneR R R! R$ ( ( ( s8 /usr/lib/python2.7/site-packages/salt/modules/moosefs.pyt <module> s . #