File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/napalm_network.cpython-310.pyc
Back
o ;jv � @ s@ d Z ddlZddlZddlZddlZddlZddlZddlZe� e �ZzddlZdZ W n ey6 dZ Y nw dZdgZdZdd � Zd d� Zdd � Zdd� Zdd� Zdd� Z dSdd�Zejjjdd� �Zejjjdd� �Zejjjdd� �Zejjjdd�dd��Zejjj dTdd ��Z ejjj dUd!d"��Z!ejjj #dVd$d%��Z"ejjjd&d'� �Z#ejjjd(d)� �Z$ejjjdWd*d+��Z%ejjjdXd,d-��Z&ejjjdYd.d/��Z'ejjjd0d1� �Z(ejjj 2dZd3d4��Z)ejjj 5 2 d[d6d7��Z*ejjjdYd8d9��Z+ejjj dYd:d;��Z,ejjj dYd<d=��Z-ejjjdYd>d?��Z.ejjj dYd@dA��Z/ejjj dYdBdC��Z0dDdE� Z1dFdG� Z2d\dHdI�Z3 J K d]dLdM�Z4 # N d^dOdP�Z5 # 2 N d_dQdR�Z6dS )`a� NAPALM Network ============== Basic methods for interaction with the network device through the virtual proxy 'napalm'. :codeauthor: Mircea Ulinic <ping@mirceaulinic.net> & Jerome Fleury <jf@cloudflare.com> :maturity: new :depends: napalm :platform: unix Dependencies ------------ - :mod:`napalm proxy minion <salt.proxy.napalm>` .. versionadded:: 2016.11.0 .. versionchanged:: 2017.7.0 � NTF�net�*)Z napalm_netc C s t jj�ttt�S )z_ NAPALM library must be installed for this module to work and run in a (proxy) minion. )�salt�utils�napalmZvirtual�__opts__�__virtualname__�__file__� r r �O/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/napalm_network.py�__virtual__6 s r c C s, t � }| D ]}|�|�|kr|�|� q|S )a< Filters a list of dictionary by a set of key-value pair. :param input_list: is a list of dictionaries :param search_key: is the key we are looking for :param search_value: is the value we are looking for the key specified in search_key :return: filered list of dictionaries )�list�get�append)Z input_list� search_key�search_valueZoutput_listZ dictionaryr r r �_filter_listB s �r c C s4 t � }| �� D ]\}}t|||�}|r|||<