File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/grains/__pycache__/napalm.cpython-310.pyc
Back
o ;j�, � @ s� d Z ddlZddlZddlZe�e�ZdZdgZ i a i addgZdd� Z d(dd �Zd(d d�Zd(dd �Zd(dd�Zd(dd�Zd(dd�Zd(dd�Zd(dd�Zd(dd�Zd(dd�Zd(dd�Zd(dd�Zd(d d!�Zd(d"d#�Zd(d$d%�Zd(d&d'�ZdS ))z� NAPALM Grains ============= :codeauthor: Mircea Ulinic <ping@mirceaulinic.net> :maturity: new :depends: napalm :platform: unix Dependencies ------------ - :mod:`NAPALM proxy module <salt.proxies.napalm>` .. versionadded:: 2016.11.0 � N�napalmZsecretZenable_passwordc C s t jj�ttt�S )z_ NAPALM library must be installed for this module to work and run in a (proxy) minion. )�salt�utilsr Zvirtual�__opts__�__virtualname__�__file__� r r �F/opt/saltstack/salt/lib/python3.10/site-packages/salt/grains/napalm.py�__virtual__2 s r c C sR t s'| rtjj�t�r| d � a t S | s'tjj�t�r'tjjjtdfi i ��a t S )zM Retrieves the grains from the network device if not cached already. znapalm.get_grainsZ get_facts) �GRAINS_CACHEr r r �is_proxyr � is_minion�call�DEVICE_CACHE��proxyr r r �_retrieve_grains_cache>