From 085486052c7389fff22c764e5ce6ba24d0d711aa Mon Sep 17 00:00:00 2001 From: shivaraj-arch Date: Tue, 25 Jul 2023 17:45:59 +0530 Subject: [PATCH 1/6] Update extreme_ers_ssh.py Few Avaya ERS devices after SSH-login the Ctrl-Y turns to blank screen giving no pattern to search; prompt appears after Enter/Return key press ( tested ). With others this is just a Return key press and is safe. --- netmiko/extreme/extreme_ers_ssh.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/netmiko/extreme/extreme_ers_ssh.py b/netmiko/extreme/extreme_ers_ssh.py index b57448d3f..e862021d9 100644 --- a/netmiko/extreme/extreme_ers_ssh.py +++ b/netmiko/extreme/extreme_ers_ssh.py @@ -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" @@ -27,6 +28,8 @@ 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. """ @@ -46,6 +49,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: From b8675888b167f21b0ddbfb47a7965cb806eb400f Mon Sep 17 00:00:00 2001 From: shivaraj-arch Date: Fri, 20 Oct 2023 10:29:52 +0530 Subject: [PATCH 2/6] Create python-app.yml --- .github/workflows/python-app.yml | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 000000000..1f2c74b21 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -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 From 20083d761cfa51535237f3e4dc2ec4c77d1d0c4f Mon Sep 17 00:00:00 2001 From: shivaraj-arch Date: Fri, 20 Oct 2023 10:40:47 +0530 Subject: [PATCH 3/6] Update extreme_ers_ssh.py pycodestyle fixes --- netmiko/extreme/extreme_ers_ssh.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netmiko/extreme/extreme_ers_ssh.py b/netmiko/extreme/extreme_ers_ssh.py index e862021d9..d5f31c81f 100644 --- a/netmiko/extreme/extreme_ers_ssh.py +++ b/netmiko/extreme/extreme_ers_ssh.py @@ -28,7 +28,8 @@ 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 ). + 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. """ @@ -50,7 +51,7 @@ 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 + """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) From c19b8e62b3abf7cb78b89e20117d840f1a048823 Mon Sep 17 00:00:00 2001 From: shivaraj-arch Date: Fri, 20 Oct 2023 10:52:01 +0530 Subject: [PATCH 4/6] Update extreme_ers_ssh.py pycodestyle PEP8 fixes --- netmiko/extreme/extreme_ers_ssh.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netmiko/extreme/extreme_ers_ssh.py b/netmiko/extreme/extreme_ers_ssh.py index d5f31c81f..d17bef73b 100644 --- a/netmiko/extreme/extreme_ers_ssh.py +++ b/netmiko/extreme/extreme_ers_ssh.py @@ -28,7 +28,8 @@ 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; + 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. @@ -51,7 +52,7 @@ 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""" + # 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) From d437c504cfd8e15e198293cb0ca16906a8cd61bb Mon Sep 17 00:00:00 2001 From: shivaraj-arch Date: Fri, 20 Oct 2023 11:01:52 +0530 Subject: [PATCH 5/6] Update extreme_ers_ssh.py PEP8 pycodestyle fix --- netmiko/extreme/extreme_ers_ssh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netmiko/extreme/extreme_ers_ssh.py b/netmiko/extreme/extreme_ers_ssh.py index d17bef73b..514295631 100644 --- a/netmiko/extreme/extreme_ers_ssh.py +++ b/netmiko/extreme/extreme_ers_ssh.py @@ -29,7 +29,7 @@ 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. From e85d1c4f04be0ba7372be0cb23fdd7afd5326664 Mon Sep 17 00:00:00 2001 From: tdsgit Date: Sat, 21 Oct 2023 08:20:51 +0530 Subject: [PATCH 6/6] removed actions file --- .github/workflows/python-app.yml | 39 -------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml deleted file mode 100644 index 1f2c74b21..000000000 --- a/.github/workflows/python-app.yml +++ /dev/null @@ -1,39 +0,0 @@ -# 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