mirror of
https://github.com/thatmattlove/hyperglass.git
synced 2026-01-17 08:48:05 +00:00
Allow customization of driver (Netmiko) configuration on a per-device basis
This commit is contained in:
parent
6dea685eeb
commit
b49b6ea58e
3 changed files with 2 additions and 2 deletions
|
|
@ -76,8 +76,6 @@ SCRAPE_HELPERS = {
|
|||
}
|
||||
|
||||
DRIVER_MAP = {
|
||||
"frr_legacy": "hyperglass_agent",
|
||||
"bird_legacy": "hyperglass_agent",
|
||||
"bird": "netmiko",
|
||||
"frr": "netmiko",
|
||||
"http": "hyperglass_http_client",
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ class NetmikoConnection(SSHConnection):
|
|||
"timeout": math.floor(params.request_timeout * 1.25),
|
||||
"session_timeout": math.ceil(params.request_timeout - 1),
|
||||
**global_args,
|
||||
**self.device.driver_config,
|
||||
}
|
||||
|
||||
if "_telnet" in self.device.platform:
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ class Device(HyperglassModelWithId, extra="allow"):
|
|||
structured_output: Optional[StrictBool]
|
||||
directives: Directives = Directives()
|
||||
driver: Optional[SupportedDriver]
|
||||
driver_config: Dict[str, Any] = {}
|
||||
attrs: Dict[str, str] = {}
|
||||
|
||||
def __init__(self, **kw) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue