Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update extreme_ers_ssh.py #3258

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should remove this (i.e. this change shouldn't be included in the PR).

8 changes: 8 additions & 0 deletions netmiko/extreme/extreme_ers_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import re
from netmiko.cisco_base_connection import CiscoSSHConnection
from netmiko.exceptions import NetmikoAuthenticationException
import time

# Extreme ERS presents Enter Ctrl-Y to begin.
CTRL_Y = "\x19"
Expand All @@ -27,6 +28,10 @@ def special_login_handler(self, delay_factor: float = 1.0) -> None:

Older devices the Ctrl-Y is before SSH-login (not 100% sure of this).

Few devices after SSH-login the Ctrl-Y turns to blank screen-no pattern \

prompt appears after Enter/Return ( tested ).

Newer devices this is after SSH-login.
"""

Expand All @@ -46,6 +51,9 @@ def special_login_handler(self, delay_factor: float = 1.0) -> None:

if cntl_y in new_data:
self.write_channel(CTRL_Y)
time.sleep(1 * delay_factor)
# no pattern, blank for few devices till Return keypress
self.write_channel(self.RETURN)
elif "Press ENTER" in new_data:
self.write_channel(self.RETURN)
elif uname in new_data:
Expand Down
Loading