%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/modules/http.pyo

�
���^c@@sedZddlmZmZmZddlZddlZd�Zdd�Z	dddd�ZdS(u�
Module for making various web calls. Primarily designed for webhooks and the
like, but also useful for basic http testing.

.. versionadded:: 2015.5.0
i(tabsolute_importtprint_functiontunicode_literalsNcK@sRtj�}d|kr3|j|d�|d=ntjjjd|d||�S(u
    Query a resource, and decode the return data

    Passes through all the parameters described in the
    :py:func:`utils.http.query function <salt.utils.http.query>`:

    .. autofunction:: salt.utils.http.query

    CLI Example:

    .. code-block:: bash

        salt '*' http.query http://somelink.com/
        salt '*' http.query http://somelink.com/ method=POST             params='key1=val1&key2=val2'
        salt '*' http.query http://somelink.com/ method=POST             data='<xml>somecontent</xml>'
    uoptsturltopts(t__opts__tcopytupdatetsalttutilsthttptquery(RtkwargsR((s5/usr/lib/python2.7/site-packages/salt/modules/http.pyRs

i,cK@s�tj�}x�tr�d}d}y:td||�}|jd�rZ|jd�rZ|SWntk
rv}|}nXtj�||kr|r�|r�|�n|SqWdS(u�
    Query a resource until a successful response, and decode the return data

    CLI Example:

    .. code-block:: bash

        salt '*' http.wait_for_successful_query http://somelink.com/ wait_for=160
    RuErroruerrorN(ttimetTruetNoneRtgett	Exception(Rtwait_forRt	starttimetcaught_exceptiontresulttexc((s5/usr/lib/python2.7/site-packages/salt/modules/http.pytwait_for_successful_query,s	 

	cC@s`|dkr"tddd�}n|dkrDtddd�}ntjjj||t|�S(ub
    Update the local CA bundle file from a URL

    .. versionadded:: 2015.5.0

    CLI Example:

    .. code-block:: bash

        salt '*' http.update_ca_bundle
        salt '*' http.update_ca_bundle target=/path/to/cacerts.pem
        salt '*' http.update_ca_bundle source=https://example.com/cacerts.pem

    If the ``target`` is not specified, it will be pulled from the ``ca_cert``
    configuration variable available to the minion. If it cannot be found there,
    it will be placed at ``<<FILE_ROOTS>>/cacerts.pem``.

    If the ``source`` is not specified, it will be pulled from the
    ``ca_cert_url`` configuration variable available to the minion. If it cannot
    be found, it will be downloaded from the cURL website, using an http (not
    https) URL. USING THE DEFAULT URL SHOULD BE AVOIDED!

    ``merge_files`` may also be specified, which includes a string or list of
    strings representing a file or files to be appended to the end of the CA
    bundle, once it is downloaded.

    CLI Example:

    .. code-block:: bash

        salt '*' http.update_ca_bundle merge_files=/path/to/mycert.pem
    u
config.getu	ca_bundleu
ca_bundle_urlN(Rt__salt__RR	R
tupdate_ca_bundleR(ttargettsourcetmerge_files((s5/usr/lib/python2.7/site-packages/salt/modules/http.pyRKs!(t__doc__t
__future__RRRR
tsalt.utils.httpRRRRR(((s5/usr/lib/python2.7/site-packages/salt/modules/http.pyt<module>s	

Zerion Mini Shell 1.0