Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/vars/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/vars/fact_cache.pyc

�
�Udac@`s�ddlmZmZmZeZddlmZddl	m
Z
ddlmZddl
mZddlmZe�Zdefd��YZd	S(
i(tabsolute_importtdivisiontprint_function(t	constants(tAnsibleError(tMutableMapping(tcache_loader(tDisplayt	FactCachecB`steZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
RS(cO`sQtjtj�|_|js4tdtj��ntt|�j||�dS(Ns+Unable to load the facts cache plugin (%s).(	RtgettCtCACHE_PLUGINt_pluginRtsuperRt__init__(tselftargstkwargs((s;/usr/lib/python2.7/site-packages/ansible/vars/fact_cache.pyRs	cC`s+|jj|�st�n|jj|�S(N(RtcontainstKeyErrorR	(Rtkey((s;/usr/lib/python2.7/site-packages/ansible/vars/fact_cache.pyt__getitem__s	cC`s|jj||�dS(N(Rtset(RRtvalue((s;/usr/lib/python2.7/site-packages/ansible/vars/fact_cache.pyt__setitem__#scC`s|jj|�dS(N(Rtdelete(RR((s;/usr/lib/python2.7/site-packages/ansible/vars/fact_cache.pyt__delitem__&scC`s|jj|�S(N(RR(RR((s;/usr/lib/python2.7/site-packages/ansible/vars/fact_cache.pyt__contains__)scC`st|jj��S(N(titerRtkeys(R((s;/usr/lib/python2.7/site-packages/ansible/vars/fact_cache.pyt__iter__,scC`st|jj��S(N(tlenRR(R((s;/usr/lib/python2.7/site-packages/ansible/vars/fact_cache.pyt__len__/scC`s
t|�S(s@ Return a primitive copy of the keys and values from the cache. (tdict(R((s;/usr/lib/python2.7/site-packages/ansible/vars/fact_cache.pytcopy2scC`s
|jj�S(N(RR(R((s;/usr/lib/python2.7/site-packages/ansible/vars/fact_cache.pyR6scC`s|jj�dS(s# Flush the fact cache of all keys. N(Rtflush(R((s;/usr/lib/python2.7/site-packages/ansible/vars/fact_cache.pyR#9scC`sqi||6}y6|jj|�}|rB|j|�|||<nWntk
rVnXtt|�j|�dS(N(RR	tupdateRR
R(RRRt
host_factst
host_cache((s;/usr/lib/python2.7/site-packages/ansible/vars/fact_cache.pytfirst_order_merge=s


cG`s�t|�dkr2tjddd�|j|�St|�dkrQ|d}ntdjt|����tt|�j|�dS(	sq
        Backwards compat shim

        We thought we needed this to ensure we always called the plugin's set() method but
        MutableMapping.update() will call our __setitem__() just fine.  It's the calls to update
        that we need to be careful of.  This contains a bug::

            fact_cache[host.name].update(facts)

        It retrieves a *copy* of the facts for host.name and then updates the copy.  So the changes
        aren't persisted.

        Instead we need to do::

            fact_cache.update({host.name, facts})

        Which will use FactCache's update() method.

        We currently need this shim for backwards compat because the update() method that we had
        implemented took key and value as arguments instead of taking a dict.  We can remove the
        shim in 2.12 as MutableMapping.update() should do everything that we need.
        is�Calling FactCache().update(key, value) is deprecated.  Use FactCache().first_order_merge(key, value) if you want the old behaviour or use FactCache().update({key: value}) if you want dict-like behaviour.tversions2.12iis+update expected at most 1 argument, got {0}N(	Rtdisplayt
deprecatedR't	TypeErrortformatR
RR$(RRR%((s;/usr/lib/python2.7/site-packages/ansible/vars/fact_cache.pyR$Js

(t__name__t
__module__RRRRRRR R"RR#R'R$(((s;/usr/lib/python2.7/site-packages/ansible/vars/fact_cache.pyRs											
N(t
__future__RRRttypet
__metaclass__tansibleRR
tansible.errorsRt/ansible.module_utils.common._collections_compatRtansible.plugins.loaderRtansible.utils.displayRR)R(((s;/usr/lib/python2.7/site-packages/ansible/vars/fact_cache.pyt<module>s	

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