mirror of
https://github.com/thatmattlove/hyperglass.git
synced 2026-01-17 08:48:05 +00:00
upgrade scrapli to 2021.1.30
This commit is contained in:
parent
768e3c9749
commit
090bb89cdd
5 changed files with 46 additions and 39 deletions
12
CHANGELOG.md
12
CHANGELOG.md
|
|
@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
# 1.0.0-beta.82 - 2021-04-22
|
||||
|
||||
### BREAKING CHANGE
|
||||
**NodeJS 14.15 or later is required**. See [the docs](https://hyperglass.io/docs/getting-started) for installation instructions.
|
||||
|
||||
### Fixed
|
||||
- [#135](https://github.com/checktheroads/hyperglass/issues/135): Fix an issue where Juniper indirect next-hops were empty.
|
||||
|
||||
### Changed
|
||||
- Upgraded Scrapli to 2021.1.30
|
||||
- Upgraded UI dependencies
|
||||
|
||||
# 1.0.0-beta.81 - 2021-04-10
|
||||
|
||||
### Fixed
|
||||
|
|
|
|||
|
|
@ -74,7 +74,8 @@ SCRAPE_HELPERS = {
|
|||
}
|
||||
|
||||
DRIVER_MAP = {
|
||||
"arista_eos": "scrapli",
|
||||
# TODO: Troubleshoot Arista with Scrapli, broken after upgrading to 2021.1.30.
|
||||
# "arista_eos": "scrapli", # noqa: E800
|
||||
"bird_ssh": "scrapli",
|
||||
"cisco_ios": "scrapli",
|
||||
"cisco_xe": "scrapli",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ from scrapli.driver import AsyncGenericDriver
|
|||
from scrapli.exceptions import (
|
||||
ScrapliTimeout,
|
||||
ScrapliException,
|
||||
KeyVerificationFailed,
|
||||
ScrapliAuthenticationFailed,
|
||||
)
|
||||
from scrapli.driver.core import (
|
||||
|
|
@ -110,11 +109,12 @@ class ScrapliConnection(SSHConnection):
|
|||
] = self.device.credential.password.get_secret_value()
|
||||
|
||||
driver = driver(**driver_kwargs)
|
||||
driver.logger = log.bind(logger_name=f"scrapli.driver-{driver._host}")
|
||||
driver.logger = log.bind(
|
||||
logger_name=f"scrapli.{driver.host}:{driver.port}-driver"
|
||||
)
|
||||
|
||||
try:
|
||||
responses = ()
|
||||
|
||||
async with driver as connection:
|
||||
await connection.get_prompt()
|
||||
for query in self.query:
|
||||
|
|
@ -127,10 +127,9 @@ class ScrapliConnection(SSHConnection):
|
|||
raise DeviceTimeout(
|
||||
params.messages.connection_error,
|
||||
device_name=self.device.name,
|
||||
proxy=None,
|
||||
error=params.messages.request_timeout,
|
||||
)
|
||||
except (ScrapliAuthenticationFailed, KeyVerificationFailed) as err:
|
||||
except ScrapliAuthenticationFailed as err:
|
||||
log.error(
|
||||
"Error authenticating to device {loc}: {e}",
|
||||
loc=self.device.name,
|
||||
|
|
@ -140,7 +139,6 @@ class ScrapliConnection(SSHConnection):
|
|||
raise AuthError(
|
||||
params.messages.connection_error,
|
||||
device_name=self.device.name,
|
||||
proxy=None,
|
||||
error=params.messages.authentication_error,
|
||||
)
|
||||
except ScrapliException as err:
|
||||
|
|
@ -148,7 +146,6 @@ class ScrapliConnection(SSHConnection):
|
|||
raise ScrapeError(
|
||||
params.messages.connection_error,
|
||||
device_name=self.device.name,
|
||||
proxy=None,
|
||||
error=params.messages.no_response,
|
||||
)
|
||||
|
||||
|
|
@ -156,7 +153,6 @@ class ScrapliConnection(SSHConnection):
|
|||
raise ScrapeError(
|
||||
params.messages.connection_error,
|
||||
device_name=self.device.name,
|
||||
proxy=None,
|
||||
error=params.messages.no_response,
|
||||
)
|
||||
|
||||
|
|
|
|||
56
poetry.lock
generated
56
poetry.lock
generated
|
|
@ -55,9 +55,17 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
|||
[package.dependencies]
|
||||
pyyaml = "*"
|
||||
|
||||
[[package]]
|
||||
name = "async-generator"
|
||||
version = "1.10"
|
||||
description = "Async generators and context managers for Python 3.5+"
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
|
||||
[[package]]
|
||||
name = "asyncssh"
|
||||
version = "2.4.2"
|
||||
version = "2.5.0"
|
||||
description = "AsyncSSH: Asynchronous SSHv2 client and server library"
|
||||
category = "main"
|
||||
optional = false
|
||||
|
|
@ -1104,37 +1112,27 @@ paramiko = "*"
|
|||
|
||||
[[package]]
|
||||
name = "scrapli"
|
||||
version = "2020.12.31"
|
||||
version = "2021.1.30"
|
||||
description = "Fast, flexible, sync/async, Python 3.6+ screen scraping client specifically for network devices"
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
|
||||
[package.dependencies]
|
||||
scrapli-asyncssh = {version = ">=2020.10.10", optional = true, markers = "extra == \"asyncssh\""}
|
||||
async-generator = {version = ">=1.10,<2.0", markers = "python_version < \"3.7\""}
|
||||
asyncssh = {version = ">=2.2.1,<3.0.0", optional = true, markers = "extra == \"asyncssh\""}
|
||||
dataclasses = {version = ">=0.7,<1.0", markers = "python_version < \"3.7\""}
|
||||
|
||||
[package.extras]
|
||||
asyncssh = ["scrapli-asyncssh (>=2020.10.10)"]
|
||||
community = ["scrapli-community (>=2020.09.19)"]
|
||||
full = ["textfsm (>=1.1.0,<2.0.0)", "ntc-templates (>=1.1.0,<2.0.0)", "ttp (>=0.5.0,<1.0.0)", "scrapli-paramiko (>=2020.10.10)", "scrapli-ssh2 (>=2020.10.24)", "scrapli-asyncssh (>=2020.10.10)", "scrapli-community (>=2020.09.19)", "genie (>=20.2)", "pyats (>=20.2)"]
|
||||
asyncssh = ["asyncssh (>=2.2.1,<3.0.0)"]
|
||||
community = ["scrapli-community (>=2021.01.30a1)"]
|
||||
full = ["textfsm (>=1.1.0,<2.0.0)", "ntc-templates (>=1.1.0,<2.0.0)", "ttp (>=0.5.0,<1.0.0)", "paramiko (>=2.6.0,<3.0.0)", "ssh2-python (>=0.23.0,<1.0.0)", "asyncssh (>=2.2.1,<3.0.0)", "scrapli-community (>=2021.01.30a1)", "genie (>=20.2)", "pyats (>=20.2)"]
|
||||
genie = ["genie (>=20.2)", "pyats (>=20.2)"]
|
||||
paramiko = ["scrapli-paramiko (>=2020.10.10)"]
|
||||
ssh2 = ["scrapli-ssh2 (>=2020.10.24)"]
|
||||
paramiko = ["paramiko (>=2.6.0,<3.0.0)"]
|
||||
ssh2 = ["ssh2-python (>=0.23.0,<1.0.0)"]
|
||||
textfsm = ["textfsm (>=1.1.0,<2.0.0)", "ntc-templates (>=1.1.0,<2.0.0)"]
|
||||
ttp = ["ttp (>=0.5.0,<1.0.0)"]
|
||||
|
||||
[[package]]
|
||||
name = "scrapli-asyncssh"
|
||||
version = "2020.10.10"
|
||||
description = "asyncssh transport plugin for the scrapli SSH|Telnet screen scraping library"
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
|
||||
[package.dependencies]
|
||||
asyncssh = ">=2.2.1,<3.0.0"
|
||||
scrapli = ">=2020.10.10"
|
||||
|
||||
[[package]]
|
||||
name = "six"
|
||||
version = "1.15.0"
|
||||
|
|
@ -1427,7 +1425,7 @@ testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake
|
|||
[metadata]
|
||||
lock-version = "1.1"
|
||||
python-versions = ">=3.6.1,<4.0"
|
||||
content-hash = "cb0743e8f0e89938e116d9e1c2e64b260b52759ffaeacc521ce5f79d492d0b99"
|
||||
content-hash = "77af9ccdc8c2aec030dd12f7b447cdf2c8ff425f43f071541ff249270b44646f"
|
||||
|
||||
[metadata.files]
|
||||
aiocontextvars = [
|
||||
|
|
@ -1453,9 +1451,13 @@ aredis = [
|
|||
{file = "aspy.yaml-1.3.0-py2.py3-none-any.whl", hash = "sha256:463372c043f70160a9ec950c3f1e4c3a82db5fca01d334b6bc89c7164d744bdc"},
|
||||
{file = "aspy.yaml-1.3.0.tar.gz", hash = "sha256:e7c742382eff2caed61f87a39d13f99109088e5e93f04d76eb8d4b28aa143f45"},
|
||||
]
|
||||
async-generator = [
|
||||
{file = "async_generator-1.10-py3-none-any.whl", hash = "sha256:01c7bf666359b4967d2cda0000cc2e4af16a0ae098cbffcb8472fb9e8ad6585b"},
|
||||
{file = "async_generator-1.10.tar.gz", hash = "sha256:6ebb3d106c12920aaae42ccb6f787ef5eefdcdd166ea3d628fa8476abe712144"},
|
||||
]
|
||||
asyncssh = [
|
||||
{file = "asyncssh-2.4.2-py3-none-any.whl", hash = "sha256:e401af7ee05b52ec7e005ba1bc14eb86708dc6433bc29575d6f191f5a2935376"},
|
||||
{file = "asyncssh-2.4.2.tar.gz", hash = "sha256:1c4a697d05a5e3d8d16ea18526115e84d8f015ba4c8b721a0d84062b6b244ef4"},
|
||||
{file = "asyncssh-2.5.0-py3-none-any.whl", hash = "sha256:5bbb313e1d2f181c1598c4722673670b4ea8840b725b2b261fa5a1da8fa38886"},
|
||||
{file = "asyncssh-2.5.0.tar.gz", hash = "sha256:0b65e2af73a2e39a271bd627abbe4f7e4b0345486ed403e65987d79c72fcb70b"},
|
||||
]
|
||||
attrs = [
|
||||
{file = "attrs-19.3.0-py2.py3-none-any.whl", hash = "sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c"},
|
||||
|
|
@ -2052,12 +2054,8 @@ scp = [
|
|||
{file = "scp-0.13.2.tar.gz", hash = "sha256:ef9d6e67c0331485d3db146bf9ee9baff8a48f3eb0e6c08276a8584b13bf34b3"},
|
||||
]
|
||||
scrapli = [
|
||||
{file = "scrapli-2020.12.31-py3-none-any.whl", hash = "sha256:9edf53a5ccfb9265bd34758565801713ca02d2add7798e1d71f57ba07c74b583"},
|
||||
{file = "scrapli-2020.12.31.tar.gz", hash = "sha256:657a7874775cd4f8ef4ebd87b474292f785e5a1c5652351cfaf645b66105b32e"},
|
||||
]
|
||||
scrapli-asyncssh = [
|
||||
{file = "scrapli_asyncssh-2020.10.10-py3-none-any.whl", hash = "sha256:46713e4d93bf2c784a33c336ae7ddce401969213097f8d03b48e96c1850e4e38"},
|
||||
{file = "scrapli_asyncssh-2020.10.10.tar.gz", hash = "sha256:454fdb177ff8b3c599f69a58cf6046f3f86fd6f54a16bacd8d1024da7f3e6fda"},
|
||||
{file = "scrapli-2021.1.30-py3-none-any.whl", hash = "sha256:31a35daa75212953efb8cf7d7ff582f93aae12d2b957056c9ec185d4f6f5e586"},
|
||||
{file = "scrapli-2021.1.30.tar.gz", hash = "sha256:aac7e8ae764f098a77d8d14fa4bda1cd886318b7293507e56a05f007d3e2e6c4"},
|
||||
]
|
||||
six = [
|
||||
{file = "six-1.15.0-py2.py3-none-any.whl", hash = "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"},
|
||||
|
|
|
|||
|
|
@ -50,10 +50,10 @@ py-cpuinfo = "^7.0.0"
|
|||
pydantic = "^1.7.3"
|
||||
python = ">=3.6.1,<4.0"
|
||||
redis = "^3.5.3"
|
||||
scrapli = {extras = ["asyncssh"], version = "^2020.9.26"}
|
||||
uvicorn = "^0.11"
|
||||
uvloop = "^0.14.0"
|
||||
xmltodict = "^0.12.0"
|
||||
scrapli = {extras = ["asyncssh"], version = "^2021.1.30"}
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
bandit = "^1.6.2"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue