Anons79 Mini Shell

Directory : /proc/self/root/lib/python2.7/site-packages/ansible/plugins/httpapi/
Upload File :
Current File : //proc/self/root/lib/python2.7/site-packages/ansible/plugins/httpapi/__init__.pyo

�
�Udac@`s\ddlmZmZmZeZddlmZddlm	Z	de	fd��YZ
dS(i(tabsolute_importtdivisiontprint_function(tabstractmethod(t
AnsiblePlugintHttpApiBasecB`sMeZd�Zd�Zd�Zd�Zd�Zd�Zed��Z	RS(cC`s2tt|�j�||_t|_d|_dS(Nt(tsuperRt__init__t
connectiontFalset_becomet_become_pass(tselfR	((sD/usr/lib/python2.7/site-packages/ansible/plugins/httpapi/__init__.pyR
s		cC`s(|j|_t|d�pd|_dS(Ntbecome_passR(tbecomeRtgetattrR(R
tbecome_context((sD/usr/lib/python2.7/site-packages/ansible/plugins/httpapi/__init__.pyt
set_becomescC`sdS(sCall a defined login endpoint to receive an authentication token.

        This should only be implemented if the API has a single endpoint which
        can turn HTTP basic auth into a token which can be reused for the rest
        of the calls for the session.
        N((R
tusernametpassword((sD/usr/lib/python2.7/site-packages/ansible/plugins/httpapi/__init__.pytloginscC`sdS(s� Call to implement session logout.

        Method to clear session gracefully e.g. tokens granted in login
        need to be revoked.
        N((R
((sD/usr/lib/python2.7/site-packages/ansible/plugins/httpapi/__init__.pytlogout!scC`s*|j�jd�}|r&i|d6SdS(s�Return per-request auth token.

        The response should be a dictionary that can be plugged into the
        headers of a request. The default implementation uses cookie data.
        If no authentication data is found, return None
        s
Set-CookietCookieN(tinfotgettNone(R
tresponset
response_texttcookie((sD/usr/lib/python2.7/site-packages/ansible/plugins/httpapi/__init__.pytupdate_auth)scC`sW|jdkrS|jjrSd|j_|j|jjd�|jjd��tS|S(s-Overridable method for dealing with HTTP codes.

        This method will attempt to handle known cases of HTTP status codes.
        If your API uses status codes to convey information in a regular way,
        you can override this method to handle it appropriately.

        :returns:
            * True if the code has been handled in a way that the request
            may be resent without changes.
            * False if the error cannot be handled or recovered from by the
            plugin. This will result in the HTTPError being returned to the
            caller to deal with as appropriate.
            * Any other value returned is taken as a valid response from the
            server without making another request. In many cases, this can just
            be the original exception.
            i�tremote_userRN(tcodeR	t_authRRt
get_optiontTrue(R
texc((sD/usr/lib/python2.7/site-packages/ansible/plugins/httpapi/__init__.pythandle_httperror6s
(cK`sdS(s(Prepares and sends request(s) to device.N((R
tdatatmessage_kwargs((sD/usr/lib/python2.7/site-packages/ansible/plugins/httpapi/__init__.pytsend_requestOs(
t__name__t
__module__RRRRRR%RR((((sD/usr/lib/python2.7/site-packages/ansible/plugins/httpapi/__init__.pyRs						
	N(t
__future__RRRttypet
__metaclass__tabcRtansible.pluginsRR(((sD/usr/lib/python2.7/site-packages/ansible/plugins/httpapi/__init__.pyt<module>s

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]