Skip to content

Commit

Permalink
Remove Scrapli
Browse files Browse the repository at this point in the history
  • Loading branch information
thatmattlove committed Oct 6, 2021
1 parent fe7abdd commit 60786d1
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 157 deletions.
11 changes: 0 additions & 11 deletions hyperglass/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,6 @@
}

DRIVER_MAP = {
# TODO: Troubleshoot Arista with Scrapli, broken after upgrading to 2021.1.30.
# "arista_eos": "scrapli", # noqa: E800
"bird": "scrapli",
"cisco_ios": "scrapli",
"cisco_xe": "scrapli",
"cisco_xr": "scrapli",
"cisco_nxos": "scrapli",
# TODO: Troubleshoot Juniper with Scrapli, broken after upgrading to 2021.7.30.
# "juniper": "scrapli", # noqa: E800
"tnsr": "scrapli",
"frr": "scrapli",
"frr_legacy": "hyperglass_agent",
"bird_legacy": "hyperglass_agent",
}
2 changes: 0 additions & 2 deletions hyperglass/execution/drivers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
from .agent import AgentConnection
from ._common import Connection
from .ssh_netmiko import NetmikoConnection
from .ssh_scrapli import ScrapliConnection

__all__ = (
"AgentConnection",
"Connection",
"NetmikoConnection",
"ScrapliConnection",
)
136 changes: 0 additions & 136 deletions hyperglass/execution/drivers/ssh_scrapli.py

This file was deleted.

7 changes: 2 additions & 5 deletions hyperglass/execution/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,13 @@
from hyperglass.models.data import OutputDataModel

# Local
from .drivers import AgentConnection, NetmikoConnection, ScrapliConnection
from .drivers import AgentConnection, NetmikoConnection


def map_driver(driver_name: str) -> "Connection":
"""Get the correct driver class based on the driver name."""

if driver_name == "scrapli":
return ScrapliConnection

elif driver_name == "hyperglass_agent":
if driver_name == "hyperglass_agent":
return AgentConnection

return NetmikoConnection
Expand Down
1 change: 0 additions & 1 deletion hyperglass/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def setup_lib_logging(log_level: str) -> None:
"uvicorn.asgi",
"netmiko",
"paramiko",
"scrapli",
"httpx",
]:
if name not in seen:
Expand Down
2 changes: 1 addition & 1 deletion hyperglass/models/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

IntFloat = t.TypeVar("IntFloat", StrictInt, StrictFloat)

SupportedDriver = t.Literal["scrapli", "netmiko", "hyperglass_agent"]
SupportedDriver = t.Literal["netmiko", "hyperglass_agent"]
HttpAuthMode = t.Literal["basic", "api_key"]
HttpProvider = t.Literal["msteams", "slack", "generic"]
LogFormat = t.Literal["text", "json"]
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ pydantic = {extras = ["dotenv"], version = "^1.8.2"}
python = ">=3.8.1,<4.0"
redis = "^3.5.3"
rich = "^10.11.0"
scrapli = {version = "2021.07.30", extras = ["asyncssh"]}
typer = "^0.4.0"
typing-extensions = "^3.7.4"
uvicorn = {extras = ["standard"], version = "^0.13.4"}
Expand Down

0 comments on commit 60786d1

Please sign in to comment.