File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/netbox.cpython-310.pyc
Back
o ;j݀ � @ s� d Z ddlZddlZddlmZ zddlZdZW n ey# dZY nw e�e �Z dZddd �Zd d� Z dd � ZdVdd�Zdd� Zdd� Zdd� Zdd� ZdWdd�Zdd� Zdd� ZdXdd�Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*d+� Zd,d-� Z . . .dYd/d0�Zd1d2� Z d3d4� Z!dXd5d6�Z"dXd7d8�Z#dXd9d:�Z$ dZd;d<�Z%d=d>� Z&d?d@� Z'dAdB� Z(dCdD� Z)dXdEdF�Z*d[dGdH�Z+dIdJ� Z,dXdKdL�Z-dXdMdN�Z.dOdP� Z/dXdQdR�Z0 Sd\dTdU�Z1dS )]a� NetBox ====== Module to query NetBox :codeauthor: Zach Moody <zmoody@do.co> :maturity: new :depends: pynetbox The following config should be in the minion config file. In order to work with ``secrets`` you should provide a token and path to your private key file: .. code-block:: yaml netbox: url: <NETBOX_URL> token: <NETBOX_USERNAME_API_TOKEN (OPTIONAL)> keyfile: </PATH/TO/NETBOX/KEY (OPTIONAL)> .. versionadded:: 2018.3.0 � N)�CommandExecutionErrorTF)Zsecrets�filter�get)�filter_�get_c C s t sdS dS )z% pynetbox must be installed. )FzPThe netbox execution module cannot be loaded: pynetbox library is not installed.T)�HAS_PYNETBOX� r r �G/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/netbox.py�__virtual__, s r c C s t d d�} | std��| S )Nz config.getZnetboxz8NetBox execution module configuration could not be found)Z__salt__r )�configr r r �_config: s �r c C sB i }t � �d�|d<