Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/netmiko/__pycache__/cisco_base_connection.cpython-39.pyc
Ðазад
a v�h�% � @ sl d Z ddlmZ ddlmZ ddlmZ ddlZddlZG dd� de�Z G dd � d e �Z G d d� de�ZdS )zLCiscoBaseConnection is netmiko SSH class for Cisco and Cisco-like platforms.� )�BaseConnection)�BaseFileTransfer)�NetmikoAuthenticationExceptionNc s� e Zd ZdZd/� fdd� Zdddejf� fdd � Zd0� fdd� Zd1� fdd� Z d2� fdd� Z d3� fdd� Zd4dd �Zd5d"d#�Z d6d%d&�Zd7d)d*�Zd8d-d.�Z� ZS )9�CiscoBaseConnectionz#Base Class for cisco-like behavior.�#c s t � j|d�S )z(Check if in enable mode. Return boolean.)�check_string)�super�check_enable_mode)�selfr �� __class__� ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/netmiko/cisco_base_connection.pyr s z%CiscoBaseConnection.check_enable_mode�enableZsswordNc s t � j||||d�S )zEnter enable mode.)�cmd�pattern�enable_pattern�re_flags)r r )r r r r r r r r r s �zCiscoBaseConnection.enable�disablec s t � j|d�S )z$Exits enable (privileged exec) mode.)�exit_command)r �exit_enable_mode)r r r r r r s z$CiscoBaseConnection.exit_enable_mode�)#� c s t � j||d�S )z� Checks if the device is in configuration mode or not. Cisco IOS devices abbreviate the prompt at 20 chars in config mode )r r )r �check_config_mode)r r r r r r r s z%CiscoBaseConnection.check_config_mode�configure terminalr c s* |st �| jdd� �}t� j|||d�S )z� Enter into configuration mode on remote device. Cisco IOS devices abbreviate the prompt at 20 chars in config mode N� )�config_commandr r )�re�escapeZbase_promptr �config_mode)r r r r r r r r ( s �zCiscoBaseConnection.config_mode�end�\#c s t � j||d�S )zExit from configuration mode.)�exit_configr )r �exit_config_mode)r r"