Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/netmiko/flexvnf/__pycache__/flexvnf_ssh.cpython-39.pyc
Ðазад
a v�h< � @ s0 d dl Z d dlZd dlmZ G dd� de�ZdS )� N)�BaseConnectionc s| e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zd� fdd � Zd� fdd� Z d dd�Z d!dd�Z� fdd�Zdd� Z � ZS )"� FlexvnfSSHc C sN | � � | �� | �� | jddd� | jdd� t�d| j � | �� dS )z� Prepare the session after the connection has been established. Disable paging (the '--more--' prompts). Set the base prompt for interaction ('>'). zset screen width 511�set)�command�patternzset screen length 0)r �333333�?N) Z_test_channel_read�enter_cli_modeZset_base_promptZset_terminal_widthZdisable_paging�time�sleepZglobal_delay_factor�clear_buffer)�self� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/netmiko/flexvnf/flexvnf_ssh.py�session_preparation s zFlexvnfSSH.session_preparationc C s� | j dd�}d}d}|dk r�| �| j� t�d| � | �� }t�d|�sZt�d|�� �r�| �d| j � t�d | � | � � q�nd |v s�d|v r�q�|d7 }qd S )z/Check if at shell prompt root@ and go into CLI.r )�delay_factor� �2 g�������?zadmin@z^\$$�clir �>�%� N) �select_delay_factorZ write_channelZRETURNr r Zread_channel�re�search�stripr )r r �countZ cur_promptr r r r s"