Skip to content

Commit f59bc5c

Browse files
committed
Update noconfig pattern
1 parent 625a01c commit f59bc5c

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

netmiko/perle/perle_ssh.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@
22
from typing import Any, Dict, List, Optional, Union
33

44
from netmiko.cisco_base_connection import CiscoBaseConnection
5+
from netmiko.no_config import NoConfig
56
from netmiko.utilities import structured_data_converter
67

78

8-
class PerleIolanSSH(CiscoBaseConnection):
9+
class PerleIolanSSH(NoConfig, CiscoBaseConnection):
910
def __init__(self, *args: Any, **kwargs: Any) -> None:
1011
super().__init__(*args, **kwargs)
1112
self.default_enter = kwargs.get("default_enter", "\r")
1213

14+
def session_preparation(self) -> None:
15+
self._test_channel_read()
16+
self.set_base_prompt(pri_prompt_terminator="$")
17+
1318
def enable(
1419
self,
1520
cmd: str = "admin",
@@ -24,23 +29,11 @@ def exit_enable_mode(self, *args: Any, **kwargs: Any) -> str:
2429
# Perle does not have this concept
2530
return ""
2631

27-
def config_mode(self, *args: Any, **kwargs: Any) -> str:
28-
# Perle has no config mode
29-
return ""
30-
31-
def exit_config_mode(self, *args: Any, **kwargs: Any) -> str:
32-
# Perle has no config mode
33-
return ""
34-
3532
def save_config(
3633
self, cmd: str = "save", confirm: bool = True, confirm_response: str = "y"
3734
) -> str:
3835
return super().save_config(cmd, confirm, confirm_response)
3936

40-
def session_preparation(self) -> None:
41-
self._test_channel_read()
42-
self.set_base_prompt(pri_prompt_terminator="$")
43-
4437
def send_command_timing(
4538
self,
4639
*args: Any,

0 commit comments

Comments
 (0)