Mentions légales du service

Skip to content
Snippets Groups Projects
Commit d2db9e10 authored by JONGLEZ Baptiste's avatar JONGLEZ Baptiste
Browse files

Improve performance for Dell force10 and OS10 devices

Defining a pattern is necessary to get good performance, otherwise Netmiko
falls back to a sleep-based mechanism (read_channel_timing) for many
common operations.
parent 69f89380
Branches
No related tags found
No related merge requests found
......@@ -5,6 +5,24 @@ from netmiko.cisco_base_connection import CiscoSSHConnection
class DellForce10SSH(CiscoSSHConnection):
"""Dell Force10 Driver - supports DNOS9."""
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
self._test_channel_read(pattern=r"[>#]")
self.set_base_prompt()
self.set_terminal_width()
self.disable_paging()
def check_config_mode(
self,
check_string: str = ")#",
pattern: str = r"[>#]",
force_regex: bool = False,
) -> bool:
"""
Checks if the device is in configuration mode or not.
"""
return super().check_config_mode(check_string=check_string, pattern=pattern)
def save_config(
self,
cmd: str = "copy running-configuration startup-configuration",
......
......@@ -10,6 +10,24 @@ import re
class DellOS10SSH(CiscoSSHConnection):
"""Dell EMC Networking OS10 Driver - supports dellos10."""
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
self._test_channel_read(pattern=r"[>#]")
self.set_base_prompt()
self.set_terminal_width()
self.disable_paging()
def check_config_mode(
self,
check_string: str = ")#",
pattern: str = r"[>#]",
force_regex: bool = False,
) -> bool:
"""
Checks if the device is in configuration mode or not.
"""
return super().check_config_mode(check_string=check_string, pattern=pattern)
def save_config(
self,
cmd: str = "copy running-configuration startup-configuration",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment