File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/proxy/__pycache__/junos.cpython-310.pyc
Back
o ;jz � @ s d Z ddlZz4dZddlZddlZddlZddlZddlm Z m Z mZmZm Z mZmZmZ ddlmZ ddlmZ W n eyE dZY nw dgZi Ze�e�ZG d d � d �ZdZdd� Zd d� Zdd� Zdd� Z dd� Z!dd� Z"dd� Z#dd� Z$dd� Z%dd� Z&dd � Z'd!d"� Z(d#d$� Z)dS )%a� Interface with a Junos device via proxy-minion. To connect to a junos device via junos proxy, specify the host information in the pillar in '/srv/pillar/details.sls' .. code-block:: yaml proxy: proxytype: junos host: <ip or dns name of host> username: <username> port: 830 password: <secret> In '/srv/pillar/top.sls' map the device details with the proxy name. .. code-block:: yaml base: 'vmx': - details After storing the device information in the pillar, configure the proxy in '/etc/salt/proxy' .. code-block:: yaml master: <ip or hostname of salt-master> Run the salt proxy via the following command: .. code-block:: bash salt-proxy --proxyid=vmx � NT)�ConnectAuthError�ConnectClosedError�ConnectError�ConnectRefusedError�ConnectTimeoutError� ProbeError�RpcError�RpcTimeoutError)�TimeoutExpiredError)�IOProcF�junosc @ s e Zd ZdZdZdd� ZdS )�RebootActivez� Class to get static variable, to indicate when a reboot/shutdown is being processed and the keep_alive should not probe the connection since it interferes with the shutdown process. Fc K s d S �N� )�self�kwargsr r �D/opt/saltstack/salt/lib/python3.10/site-packages/salt/proxy/junos.py�__init__N s zRebootActive.__init__N)�__name__� __module__�__qualname__�__doc__�reboot_shutdownr r r r r r E s r c C s t sdS tS )z6 Only return if all the modules are available )FzMMissing dependency: The junos proxy minion requires the 'jnpr' Python module.)� HAS_JUNOS�__virtualname__r r r r �__virtual__V s r c C s d| d<