%PDF- %PDF-
Direktori : /usr/lib/python2.7/site-packages/salt/utils/ |
Current File : //usr/lib/python2.7/site-packages/salt/utils/namecheap.pyo |
� ���^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 m Z y d d l Z e Z Wn e k r� e Z n Xe j e � Z d a d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d S( uM Namecheap Management library of common functions used by all the namecheap execution modules Installation Prerequisites -------------------------- - This module uses the following python libraries to communicate to the namecheap API: * ``requests`` .. code-block:: bash pip install requests i ( t absolute_importt unicode_literalst print_functionN( t sixc C@ s/ t s t d f St s+ t j j t � a n t S( NuM Missing dependency: 'requests'. The namecheap utils module cannot be loaded. ( t HAS_REQUESTSt Falset __salt__t saltt loadert minion_modst __opts__t True( ( ( s8 /usr/lib/python2.7/site-packages/salt/utils/namecheap.pyt __virtual__* s c C@ s/ t d d � } t t j | d | d d �� S( Nu config.optionu namecheap.urlt datat timeouti- ( R t _handle_requestt requestst post( t optst namecheap_url( ( s8 /usr/lib/python2.7/site-packages/salt/utils/namecheap.pyt post_request4 s c C@ s/ t d d � } t t j | d | d d �� S( Nu config.optionu namecheap.urlt paramsR i- ( R R R t get( R R ( ( s8 /usr/lib/python2.7/site-packages/salt/utils/namecheap.pyt get_request9 s c C@ s | j � | j d k rG t j t j | � � t t j | � � � n t j j j | j � } | j d � d } | j d � d k rg } | j d � d } x* | j d � D] } | j | j j � q� Wd j | � } t j | � t j | � t | � � n | S( Ni+ u ApiResponsei u Statusu ERRORu Errorsu Erroru ( t closet status_codet logt errorR t text_typet Exceptiont xmlt domt minidomt parseStringt textt getElementsByTagNamet getAttributet appendt firstChildR t joint info( t rt response_xmlt apiresponseR t errorst eR ( ( s8 /usr/lib/python2.7/site-packages/salt/utils/namecheap.pyR >