1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

#143: Begin hyperglass-agent deprecation

This commit is contained in:
checktheroads
2021-05-30 15:46:30 -07:00
parent 4a37fba1a0
commit 6c5839be70
8 changed files with 134 additions and 108 deletions

View File

@@ -9,8 +9,8 @@ description: Install hyperglass-agent on your system
import Tabs from "@theme/Tabs"; import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem"; import TabItem from "@theme/TabItem";
:::important In Progress :::caution Deprecation Warning
Documentation for [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is in progress! [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/checktheroads/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
::: :::
## Installation ## Installation
@@ -76,6 +76,6 @@ Now that Python 3.6+ is installed, you can install the hyperglass agent:
$ pip3 install hyperglass-agent $ pip3 install hyperglass-agent
``` ```
:::important More coming soon :::caution Deprecation Warning
Documentation for [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is in progress! [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/checktheroads/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
::: :::

View File

@@ -9,6 +9,10 @@ description: hyperglass-agent configuration parameters.
import M from "../../src/components/MiniNote"; import M from "../../src/components/MiniNote";
import PL from "../../src/components/PageLink"; import PL from "../../src/components/PageLink";
:::caution Deprecation Warning
[hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/checktheroads/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
:::
<div class="table--full-width" /> <div class="table--full-width" />
## Configuration File ## Configuration File
@@ -62,3 +66,7 @@ By default, hyperglass-agent writes all log messages to a log file located at `/
| `directory` | FilePath | `/tmp/` | Directory at which to write the log file `hyperglass-agent.log`. Use `false` to disable file logging. | | `directory` | FilePath | `/tmp/` | Directory at which to write the log file `hyperglass-agent.log`. Use `false` to disable file logging. |
| `format` | String | `'text'` | `'text'` for plain text non-structured logging, `'json'` for JSON structured logging. If JSON is enabled, the log file name will be `hyperglass-agent.log.json` | | `format` | String | `'text'` | `'text'` for plain text non-structured logging, `'json'` for JSON structured logging. If JSON is enabled, the log file name will be `hyperglass-agent.log.json` |
| `max_size` | String | `'50MB'` | Maximum log file size before old logs are overwritten. | | `max_size` | String | `'50MB'` | Maximum log file size before old logs are overwritten. |
:::caution Deprecation Warning
[hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/checktheroads/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
:::

View File

@@ -8,7 +8,11 @@ description: Configure hyperglass-agent
import M from "../../src/components/MiniNote"; import M from "../../src/components/MiniNote";
:::caution Time & NTP :::caution Deprecation Warning
[hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/checktheroads/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
:::
:::important Time & NTP
Before you get too far, check to make sure your hyperglass server and hyperglass-agent system are both properly synchronized with an NTP server. During the setup process and on every interaction, hyperglass and hyperglass-agent exchange [JWT](https://jwt.io/) tokens with a relatively short window (**60 seconds, by default**) in which to validate the payload. If the system clock on either system is askew by too much, this exchange can fail. Before you get too far, check to make sure your hyperglass server and hyperglass-agent system are both properly synchronized with an NTP server. During the setup process and on every interaction, hyperglass and hyperglass-agent exchange [JWT](https://jwt.io/) tokens with a relatively short window (**60 seconds, by default**) in which to validate the payload. If the system clock on either system is askew by too much, this exchange can fail.
::: :::

View File

@@ -5,104 +5,110 @@ sidebar_label: Supported Platforms
description: Platforms supported by hyperglass description: Platforms supported by hyperglass
--- ---
## HTTP import Native from "../src/components/Native";
<div class="table--full-width" /> <div class="table--full-width" />
The following platforms use [hyperglass-agent](agent/installation.mdx) for connection handling. When configuring the `nos` property of a device, use the value in the **Key** column.
:::caution hyperglass agent is being deprecated
While hyperglass-agent was a cool idea, maintaining the two codebases and protocol sets has proven cumbersome, with very little benefit. As of **v1.0.0-beta.76**, `frr_ssh` and `bird_ssh` are available for use as replacements.
:::
| Name | Key |
| :-------- | :----- |
| BIRD | `bird` |
| FRRouting | `frr` |
## SSH ## SSH
The following platforms use [Netmiko](https://github.com/ktbyers/netmiko) or [Scrapli](https://github.com/carlmontanari/scrapli) for connection handling. When configuring the `nos` property of a device, use the value in the **Key** column. The following platforms use [Netmiko](https://github.com/ktbyers/netmiko) or [Scrapli](https://github.com/carlmontanari/scrapli) for connection handling. When configuring the `nos` property of a device, use the value in the **Key** column.
Platforms in <Native>green</Native> are natively supported, which means hyperglass has predefined commands built in. Other platforms should also work, you'll just need to [add a custom command profile](commands.mdx).
If needed, for troubleshooting purposes or otherwise, the driver for a given device [can be overridden](adding-devices#all-device-paramters) with the `driver` parameter. Generally, Netmiko is more stable, supports more platforms, but is slower; while Scrapli can be less reliable, supports fewer platforms, but is significantly faster.
| Name | Key | Default Driver |
| :--------------------------------- | :-------------------- | :------------- |
| A10 | `a10` | Netmiko |
| Accedian | `accedian` | Netmiko |
| Alcatel AOS | `alcatel_aos` | Netmiko |
| Alcatel SROS | `alcatel_sros` | Netmiko |
| Apresia Systems AEOS | `apresia_aeos` | Netmiko |
| <Native>Arista vEOS</Native> | `arista_eos` | Netmiko |
| Aruba | `aruba_os` | Netmiko |
| Avaya ERS | `avaya_ers` | Netmiko |
| Avaya VSP | `avaya_vsp` | Netmiko |
| <Native>BIRD</Native> | `bird` | Scrapli |
| Calix B6 | `calix_b6` | Netmiko |
| Check Point GAiA | `checkpoint_gaia` | Netmiko |
| Ciena SAOS | `ciena_saos` | Netmiko |
| Cisco ASA | `cisco_asa` | Netmiko |
| <Native>Cisco IOS</Native> | `cisco_ios` | Scrapli |
| <Native>Cisco NX-OS</Native> | `cisco_nxos` | Scrapli |
| Cisco SG-300 | `cisco_s300` | Netmiko |
| <Native>Cisco IOS-XE</Native> | `cisco_xe` | Scrapli |
| <Native>Cisco IOS-XR</Native> | `cisco_xr` | Scrapli |
| Citrix Netscaler | `netscaler` | Netmiko |
| CloudGenix ION | `cloudgenix_ion` | Netmiko |
| Coriant | `coriant` | Netmiko |
| Dell OS6 | `dell_os6` | Netmiko |
| Dell OS9 | `dell_os9` | Netmiko |
| Dell OS10 | `dell_os10` | Netmiko |
| Dell PowerConnect | `dell_powerconnect` | Netmiko |
| Endace | `endace` | Netmiko |
| Eltex | `eltex` | Netmiko |
| Eltex ESR | `eltex_esr` | Netmiko |
| Enterasys | `enterasys` | Netmiko |
| Extreme | `extreme` | Netmiko |
| Extreme ERS | `extreme_ers` | Netmiko |
| Extreme EXOS | `extreme_exos` | Netmiko |
| Extreme/Brocade NetIron | `extreme_netiron` | Netmiko |
| Extreme NOS | `extreme_nos` | Netmiko |
| Extreme/Brocade SLX | `extreme_slx` | Netmiko |
| Extreme/Brocade VDX | `extreme_vdx` | Netmiko |
| Extreme VSP | `extreme_vsp` | Netmiko |
| Extreme Wing | `extreme_wing` | Netmiko |
| F5 LTM | `f5_ltm` | Netmiko |
| F5 TMSH | `f5_tmsh` | Netmiko |
| F5 Linux | `f5_linux` | Netmiko |
| Flex VNF | `flexvnf` | Netmiko |
| Fortinet | `fortinet` | Netmiko |
| <Native>FRRouting</Native> | `frr` | Scrapli |
| Generic Terminal Server | `generic_termserver` | Netmiko |
| HPE/3COM Comware | `hp_comware` | Netmiko |
| HPE ProCurve | `hp_procurve` | Netmiko |
| <Native>Huawei</Native> | `huawei` | Netmiko |
| Huawei VRPv8 | `huawei_vrpv8` | Netmiko |
| IPInfusion OcNOS | `ipinfusion_ocnos` | Netmiko |
| <Native>Juniper</Native> | `juniper` | Scrapli |
| <Native>Juniper JunOS</Native> | `juniper_junos` | Scrapli |
| Juniper ScreenOS | `juniper_screenos` | Netmiko |
| Keymile | `keymile` | Netmiko |
| Keymile NOS | `keymile_nos` | Netmiko |
| Linux | `linux` | Netmiko |
| <Native>Mikrotik RouterOS</Native> | `mikrotik_routeros` | Netmiko |
| <Native>Mikrotik SwitchOS</Native> | `mikrotik_switchos` | Netmiko |
| Mellanox | `mellanox` | Netmiko |
| Mellanox MLNX-OS | `mellanox_mlnxos` | Netmiko |
| MRV LX | `mrv_lx` | Netmiko |
| MRV Optiswitch | `mrv_optiswitch` | Netmiko |
| <Native>Nokia SROS</Native> | `nokia_sros` | Netmiko |
| OneAccess OneOS | `oneaccess_oneos` | Netmiko |
| OVS Linux | `ovs_linux` | Netmiko |
| Palo Alto Networks PAN-OS | `paloalto_panos` | Netmiko |
| Pluribus | `pluribus` | Netmiko |
| Quanta Mesh | `quanta_mesh` | Netmiko |
| RAD ETX | `rad_etx` | Netmiko |
| Ruckus/Brocade FastIron | `ruckus_fastiron` | Netmiko |
| Ruijie OS | `ruijie_os` | Netmiko |
| <Native>TNSR</Native> | `tnsr` | Scrapli |
| Ubuiquiti EdgeRouter | `ubiquiti_edge` | Netmiko |
| Ubuiquiti EdgeSwitch | `ubiquiti_edgeswitch` | Netmiko |
| Vyatta VyOS | `vyatta_vyos` | Netmiko |
| <Native>VyOS</Native> | `vyos` | Netmiko |
## HTTP
The following platforms use [hyperglass-agent](agent/installation.mdx) for connection handling. When configuring the `nos` property of a device, use the value in the **Key** column.
:::caution hyperglass agent is being deprecated
While hyperglass-agent was a cool idea, maintaining the two codebases and protocol sets has proven cumbersome, with very little benefit. As of **v1.0.0**, `frr_legacy` and `bird_legacy` are temporarily available to mimic previous behavior with hyperglass-agent.
:::
| Name | Key | | Name | Key |
| :------------------------ | :-------------------- | | :-------- | :------------ |
| A10 | `a10` | | BIRD | `bird_legacy` |
| Accedian | `accedian` | | FRRouting | `frr_legacy` |
| Alcatel AOS | `alcatel_aos` |
| Alcatel SROS | `alcatel_sros` |
| Apresia Systems AEOS | `apresia_aeos` |
| Arista vEOS | `arista_eos` |
| Aruba | `aruba_os` |
| Avaya ERS | `avaya_ers` |
| Avaya VSP | `avaya_vsp` |
| BIRD | `bird_ssh` |
| Calix B6 | `calix_b6` |
| Check Point GAiA | `checkpoint_gaia` |
| Ciena SAOS | `ciena_saos` |
| Cisco ASA | `cisco_asa` |
| Cisco IOS | `cisco_ios` |
| Cisco NX-OS | `cisco_nxos` |
| Cisco SG-300 | `cisco_s300` |
| Cisco IOS-XE | `cisco_xe` |
| Cisco IOS-XR | `cisco_xr` |
| Citrix Netscaler | `netscaler` |
| CloudGenix ION | `cloudgenix_ion` |
| Coriant | `coriant` |
| Dell OS6 | `dell_os6` |
| Dell OS9 | `dell_os9` |
| Dell OS10 | `dell_os10` |
| Dell PowerConnect | `dell_powerconnect` |
| Endace | `endace` |
| Eltex | `eltex` |
| Eltex ESR | `eltex_esr` |
| Enterasys | `enterasys` |
| Extreme | `extreme` |
| Extreme ERS | `extreme_ers` |
| Extreme EXOS | `extreme_exos` |
| Extreme/Brocade NetIron | `extreme_netiron` |
| Extreme NOS | `extreme_nos` |
| Extreme/Brocade SLX | `extreme_slx` |
| Extreme/Brocade VDX | `extreme_vdx` |
| Extreme VSP | `extreme_vsp` |
| Extreme Wing | `extreme_wing` |
| F5 LTM | `f5_ltm` |
| F5 TMSH | `f5_tmsh` |
| F5 Linux | `f5_linux` |
| Flex VNF | `flexvnf` |
| Fortinet | `fortinet` |
| FRRouting | `frr_ssh` |
| Generic Terminal Server | `generic_termserver` |
| HPE/3COM Comware | `hp_comware` |
| HPE ProCurve | `hp_procurve` |
| Huawei | `huawei` |
| Huawei VRPv8 | `huawei_vrpv8` |
| IPInfusion OcNOS | `ipinfusion_ocnos` |
| Juniper | `juniper` |
| Juniper JunOS | `juniper_junos` |
| Juniper ScreenOS | `juniper_screenos` |
| Keymile | `keymile` |
| Keymile NOS | `keymile_nos` |
| Linux | `linux` |
| Mikrotik RouterOS | `mikrotik_routeros` |
| Mikrotik SwitchOS | `mikrotik_switchos` |
| Mellanox | `mellanox` |
| Mellanox MLNX-OS | `mellanox_mlnxos` |
| MRV LX | `mrv_lx` |
| MRV Optiswitch | `mrv_optiswitch` |
| Nokia SROS | `nokia_sros` |
| OneAccess OneOS | `oneaccess_oneos` |
| OVS Linux | `ovs_linux` |
| Palo Alto Networks PAN-OS | `paloalto_panos` |
| Pluribus | `pluribus` |
| Quanta Mesh | `quanta_mesh` |
| RAD ETX | `rad_etx` |
| Ruckus/Brocade FastIron | `ruckus_fastiron` |
| Ruijie OS | `ruijie_os` |
| TNSR | `tnsr` |
| Ubuiquiti EdgeRouter | `ubiquiti_edge` |
| Ubuiquiti EdgeSwitch | `ubiquiti_edgeswitch` |
| Vyatta VyOS | `vyatta_vyos` |
| VyOS | `vyos` |
## Caveats ## Caveats

View File

@@ -24,6 +24,13 @@
--ifm-color-primary-light: #ff807e; --ifm-color-primary-light: #ff807e;
--ifm-color-primary-lighter: #ff918f; --ifm-color-primary-lighter: #ff918f;
--ifm-color-primary-lightest: #ffc4c3; --ifm-color-primary-lightest: #ffc4c3;
--ifm-color-success: #35b246;
--ifm-color-success-dark: #30a03f;
--ifm-color-success-darker: #2d973b;
--ifm-color-success-darkest: #257d31;
--ifm-color-success-light: #3ac44d;
--ifm-color-success-lighter: #43c755;
--ifm-color-success-lightest: #5dcf6d;
--ifm-code-font-size: 95%; --ifm-code-font-size: 95%;
--ifm-font-family-base: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, --ifm-font-family-base: "Nunito", system-ui, -apple-system, Segoe UI, Roboto,
Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, "Segoe UI", Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, "Segoe UI",

View File

@@ -62,7 +62,7 @@ FUNC_COLOR_MAP = {
"danger": "red", "danger": "red",
} }
TRANSPORT_REST = ("frr", "bird") TRANSPORT_REST = ("frr_legacy", "bird_legacy")
SCRAPE_HELPERS = { SCRAPE_HELPERS = {
"arista": "arista_eos", "arista": "arista_eos",
@@ -76,14 +76,14 @@ SCRAPE_HELPERS = {
DRIVER_MAP = { DRIVER_MAP = {
# TODO: Troubleshoot Arista with Scrapli, broken after upgrading to 2021.1.30. # TODO: Troubleshoot Arista with Scrapli, broken after upgrading to 2021.1.30.
# "arista_eos": "scrapli", # noqa: E800 # "arista_eos": "scrapli", # noqa: E800
"bird_ssh": "scrapli", "bird": "scrapli",
"cisco_ios": "scrapli", "cisco_ios": "scrapli",
"cisco_xe": "scrapli", "cisco_xe": "scrapli",
"cisco_xr": "scrapli", "cisco_xr": "scrapli",
"cisco_nxos": "scrapli", "cisco_nxos": "scrapli",
"juniper": "scrapli", "juniper": "scrapli",
"tnsr": "scrapli", "tnsr": "scrapli",
"frr_ssh": "scrapli", "frr": "scrapli",
"frr": "hyperglass_agent", "frr_legacy": "hyperglass_agent",
"bird": "hyperglass_agent", "bird_legacy": "hyperglass_agent",
} }

View File

@@ -37,11 +37,11 @@ from .ssh import SSHConnection
SCRAPLI_DRIVER_MAP = { SCRAPLI_DRIVER_MAP = {
"arista_eos": AsyncEOSDriver, "arista_eos": AsyncEOSDriver,
"bird_ssh": AsyncGenericDriver, "bird": AsyncGenericDriver,
"cisco_ios": AsyncIOSXEDriver, "cisco_ios": AsyncIOSXEDriver,
"cisco_nxos": AsyncNXOSDriver, "cisco_nxos": AsyncNXOSDriver,
"cisco_xr": AsyncIOSXRDriver, "cisco_xr": AsyncIOSXRDriver,
"frr_ssh": AsyncGenericDriver, "frr": AsyncGenericDriver,
"juniper": AsyncJunosDriver, "juniper": AsyncJunosDriver,
"tnsr": AsyncGenericDriver, "tnsr": AsyncGenericDriver,
} }
@@ -49,6 +49,8 @@ SCRAPLI_DRIVER_MAP = {
driver_global_args = { driver_global_args = {
# Per-NOS driver keyword arguments # Per-NOS driver keyword arguments
"tnsr": {"comms_prompt_pattern": r"\S+\s\S+[\#\>]"}, "tnsr": {"comms_prompt_pattern": r"\S+\s\S+[\#\>]"},
"frr": {"comms_ansi": True},
"bird": {"comms_ansi": True},
} }
@@ -112,7 +114,6 @@ class ScrapliConnection(SSHConnection):
driver.logger = log.bind( driver.logger = log.bind(
logger_name=f"scrapli.{driver.host}:{driver.port}-driver" logger_name=f"scrapli.{driver.host}:{driver.port}-driver"
) )
try: try:
responses = () responses = ()
async with driver as connection: async with driver as connection:

View File

@@ -19,11 +19,11 @@ from .mikrotik_switchos import MikrotikSwitchOS
_NOS_MAP = { _NOS_MAP = {
"arista_eos": AristaEOSCommands, "arista_eos": AristaEOSCommands,
"bird_ssh": BIRDCommands, "bird": BIRDCommands,
"cisco_ios": CiscoIOSCommands, "cisco_ios": CiscoIOSCommands,
"cisco_nxos": CiscoNXOSCommands, "cisco_nxos": CiscoNXOSCommands,
"cisco_xr": CiscoXRCommands, "cisco_xr": CiscoXRCommands,
"frr_ssh": FRRCommands, "frr": FRRCommands,
"huawei": HuaweiCommands, "huawei": HuaweiCommands,
"juniper": JuniperCommands, "juniper": JuniperCommands,
"mikrotik_routeros": MikrotikRouterOS, "mikrotik_routeros": MikrotikRouterOS,
@@ -38,11 +38,11 @@ class Commands(HyperglassModelExtra):
"""Base class for command definitions.""" """Base class for command definitions."""
arista_eos: CommandGroup = AristaEOSCommands() arista_eos: CommandGroup = AristaEOSCommands()
bird_ssh: CommandGroup = BIRDCommands() bird: CommandGroup = BIRDCommands()
cisco_ios: CommandGroup = CiscoIOSCommands() cisco_ios: CommandGroup = CiscoIOSCommands()
cisco_nxos: CommandGroup = CiscoNXOSCommands() cisco_nxos: CommandGroup = CiscoNXOSCommands()
cisco_xr: CommandGroup = CiscoXRCommands() cisco_xr: CommandGroup = CiscoXRCommands()
frr_ssh: CommandGroup = FRRCommands() frr: CommandGroup = FRRCommands()
huawei: CommandGroup = HuaweiCommands() huawei: CommandGroup = HuaweiCommands()
juniper: CommandGroup = JuniperCommands() juniper: CommandGroup = JuniperCommands()
mikrotik_routeros: CommandGroup = MikrotikRouterOS() mikrotik_routeros: CommandGroup = MikrotikRouterOS()