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.
| Name | Key | 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).
| :------------------------ | :-------------------- |
| A10 | `a10` | 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.
| Accedian | `accedian` |
| Alcatel AOS | `alcatel_aos` | | Name | Key | Default Driver |
| Alcatel SROS | `alcatel_sros` | | :--------------------------------- | :-------------------- | :------------- |
| Apresia Systems AEOS | `apresia_aeos` | | A10 | `a10` | Netmiko |
| Arista vEOS | `arista_eos` | | Accedian | `accedian` | Netmiko |
| Aruba | `aruba_os` | | Alcatel AOS | `alcatel_aos` | Netmiko |
| Avaya ERS | `avaya_ers` | | Alcatel SROS | `alcatel_sros` | Netmiko |
| Avaya VSP | `avaya_vsp` | | Apresia Systems AEOS | `apresia_aeos` | Netmiko |
| BIRD | `bird_ssh` | | <Native>Arista vEOS</Native> | `arista_eos` | Netmiko |
| Calix B6 | `calix_b6` | | Aruba | `aruba_os` | Netmiko |
| Check Point GAiA | `checkpoint_gaia` | | Avaya ERS | `avaya_ers` | Netmiko |
| Ciena SAOS | `ciena_saos` | | Avaya VSP | `avaya_vsp` | Netmiko |
| Cisco ASA | `cisco_asa` | | <Native>BIRD</Native> | `bird` | Scrapli |
| Cisco IOS | `cisco_ios` | | Calix B6 | `calix_b6` | Netmiko |
| Cisco NX-OS | `cisco_nxos` | | Check Point GAiA | `checkpoint_gaia` | Netmiko |
| Cisco SG-300 | `cisco_s300` | | Ciena SAOS | `ciena_saos` | Netmiko |
| Cisco IOS-XE | `cisco_xe` | | Cisco ASA | `cisco_asa` | Netmiko |
| Cisco IOS-XR | `cisco_xr` | | <Native>Cisco IOS</Native> | `cisco_ios` | Scrapli |
| Citrix Netscaler | `netscaler` | | <Native>Cisco NX-OS</Native> | `cisco_nxos` | Scrapli |
| CloudGenix ION | `cloudgenix_ion` | | Cisco SG-300 | `cisco_s300` | Netmiko |
| Coriant | `coriant` | | <Native>Cisco IOS-XE</Native> | `cisco_xe` | Scrapli |
| Dell OS6 | `dell_os6` | | <Native>Cisco IOS-XR</Native> | `cisco_xr` | Scrapli |
| Dell OS9 | `dell_os9` | | Citrix Netscaler | `netscaler` | Netmiko |
| Dell OS10 | `dell_os10` | | CloudGenix ION | `cloudgenix_ion` | Netmiko |
| Dell PowerConnect | `dell_powerconnect` | | Coriant | `coriant` | Netmiko |
| Endace | `endace` | | Dell OS6 | `dell_os6` | Netmiko |
| Eltex | `eltex` | | Dell OS9 | `dell_os9` | Netmiko |
| Eltex ESR | `eltex_esr` | | Dell OS10 | `dell_os10` | Netmiko |
| Enterasys | `enterasys` | | Dell PowerConnect | `dell_powerconnect` | Netmiko |
| Extreme | `extreme` | | Endace | `endace` | Netmiko |
| Extreme ERS | `extreme_ers` | | Eltex | `eltex` | Netmiko |
| Extreme EXOS | `extreme_exos` | | Eltex ESR | `eltex_esr` | Netmiko |
| Extreme/Brocade NetIron | `extreme_netiron` | | Enterasys | `enterasys` | Netmiko |
| Extreme NOS | `extreme_nos` | | Extreme | `extreme` | Netmiko |
| Extreme/Brocade SLX | `extreme_slx` | | Extreme ERS | `extreme_ers` | Netmiko |
| Extreme/Brocade VDX | `extreme_vdx` | | Extreme EXOS | `extreme_exos` | Netmiko |
| Extreme VSP | `extreme_vsp` | | Extreme/Brocade NetIron | `extreme_netiron` | Netmiko |
| Extreme Wing | `extreme_wing` | | Extreme NOS | `extreme_nos` | Netmiko |
| F5 LTM | `f5_ltm` | | Extreme/Brocade SLX | `extreme_slx` | Netmiko |
| F5 TMSH | `f5_tmsh` | | Extreme/Brocade VDX | `extreme_vdx` | Netmiko |
| F5 Linux | `f5_linux` | | Extreme VSP | `extreme_vsp` | Netmiko |
| Flex VNF | `flexvnf` | | Extreme Wing | `extreme_wing` | Netmiko |
| Fortinet | `fortinet` | | F5 LTM | `f5_ltm` | Netmiko |
| FRRouting | `frr_ssh` | | F5 TMSH | `f5_tmsh` | Netmiko |
| Generic Terminal Server | `generic_termserver` | | F5 Linux | `f5_linux` | Netmiko |
| HPE/3COM Comware | `hp_comware` | | Flex VNF | `flexvnf` | Netmiko |
| HPE ProCurve | `hp_procurve` | | Fortinet | `fortinet` | Netmiko |
| Huawei | `huawei` | | <Native>FRRouting</Native> | `frr` | Scrapli |
| Huawei VRPv8 | `huawei_vrpv8` | | Generic Terminal Server | `generic_termserver` | Netmiko |
| IPInfusion OcNOS | `ipinfusion_ocnos` | | HPE/3COM Comware | `hp_comware` | Netmiko |
| Juniper | `juniper` | | HPE ProCurve | `hp_procurve` | Netmiko |
| Juniper JunOS | `juniper_junos` | | <Native>Huawei</Native> | `huawei` | Netmiko |
| Juniper ScreenOS | `juniper_screenos` | | Huawei VRPv8 | `huawei_vrpv8` | Netmiko |
| Keymile | `keymile` | | IPInfusion OcNOS | `ipinfusion_ocnos` | Netmiko |
| Keymile NOS | `keymile_nos` | | <Native>Juniper</Native> | `juniper` | Scrapli |
| Linux | `linux` | | <Native>Juniper JunOS</Native> | `juniper_junos` | Scrapli |
| Mikrotik RouterOS | `mikrotik_routeros` | | Juniper ScreenOS | `juniper_screenos` | Netmiko |
| Mikrotik SwitchOS | `mikrotik_switchos` | | Keymile | `keymile` | Netmiko |
| Mellanox | `mellanox` | | Keymile NOS | `keymile_nos` | Netmiko |
| Mellanox MLNX-OS | `mellanox_mlnxos` | | Linux | `linux` | Netmiko |
| MRV LX | `mrv_lx` | | <Native>Mikrotik RouterOS</Native> | `mikrotik_routeros` | Netmiko |
| MRV Optiswitch | `mrv_optiswitch` | | <Native>Mikrotik SwitchOS</Native> | `mikrotik_switchos` | Netmiko |
| Nokia SROS | `nokia_sros` | | Mellanox | `mellanox` | Netmiko |
| OneAccess OneOS | `oneaccess_oneos` | | Mellanox MLNX-OS | `mellanox_mlnxos` | Netmiko |
| OVS Linux | `ovs_linux` | | MRV LX | `mrv_lx` | Netmiko |
| Palo Alto Networks PAN-OS | `paloalto_panos` | | MRV Optiswitch | `mrv_optiswitch` | Netmiko |
| Pluribus | `pluribus` | | <Native>Nokia SROS</Native> | `nokia_sros` | Netmiko |
| Quanta Mesh | `quanta_mesh` | | OneAccess OneOS | `oneaccess_oneos` | Netmiko |
| RAD ETX | `rad_etx` | | OVS Linux | `ovs_linux` | Netmiko |
| Ruckus/Brocade FastIron | `ruckus_fastiron` | | Palo Alto Networks PAN-OS | `paloalto_panos` | Netmiko |
| Ruijie OS | `ruijie_os` | | Pluribus | `pluribus` | Netmiko |
| TNSR | `tnsr` | | Quanta Mesh | `quanta_mesh` | Netmiko |
| Ubuiquiti EdgeRouter | `ubiquiti_edge` | | RAD ETX | `rad_etx` | Netmiko |
| Ubuiquiti EdgeSwitch | `ubiquiti_edgeswitch` | | Ruckus/Brocade FastIron | `ruckus_fastiron` | Netmiko |
| Vyatta VyOS | `vyatta_vyos` | | Ruijie OS | `ruijie_os` | Netmiko |
| VyOS | `vyos` | | <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 |
| :-------- | :------------ |
| BIRD | `bird_legacy` |
| FRRouting | `frr_legacy` |
## 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()