ADD: Support for LANCOM LCOS SX 5#3670
Conversation
netmiko/lancom/lancom_lcossx5.py
Outdated
| super().disable_paging() | ||
| self.clear_buffer() | ||
|
|
||
| def set_terminal_width(self, *args: Any, **kwargs: Any) -> str: |
There was a problem hiding this comment.
There is no need to override the set_terminal_width. It's only ever called from session_preparation which you already override. If you do really want to keep it, you should have it raise NotImplementedError
There was a problem hiding this comment.
i have removed the redundant function
|
Looking at https://www.lancom-systems.de/fileadmin/download/documentation/CLI-Reference/MA_LCOS-SX-5.20-CLI-Reference_EN.pdf, it says to enter config mode its I also see that you check for |
netmiko/lancom/lancom_lcossx5.py
Outdated
| offers inconsistent command options | ||
| """ | ||
| self._test_channel_read() | ||
| super().send_command_timing( |
There was a problem hiding this comment.
any reason you are calling send_command for this instead of just using self.enable()?
There was a problem hiding this comment.
i tested multiple versions with self.enable(), and i wasn't able to get it working. I think it has to do with LANCOM not prompting for enable passwords at all.
Therefore i chose to use this workaround.
There was a problem hiding this comment.
*EDIT: i had the following Error:
ValueError: Failed to enter enable mode. Please ensure you pass the 'secret' argument to ConnectHandler.
However i was able to resolve this by passing the enable_pattern which results in self.enable(enable_pattern=r"#").
Now its working as you suggested :)
|
Sorry for not answering... had a lot going on :-/
The (official) Documentation is not explicit enough here. While The capital |
Title
ADD: Support for LANCOM LCOS SX 5
Description
This PR introduces a new driver for LANCOM devices running LCOS SX 5, which is the OS for the Enterprise models.
Peculiarity
LANCOM does not allow
Execcommands to be run inConfigMode, therefore aconfig-mode-checkis added tosave_configandcleanup.SSH Connection to LCOS SX 5 devices normally start in the
EXECMode. This Mode however offers only inconsistent command usage. Therefore the driver will elevate the Session toprivileged EXECMode by default duringsession_preparationThe
terminal widthcommands dont work on LCOS SX 5Testing
Tested on:
A File with full
showandconfigtest result is attached.2025-05-02_netmiko-lancom-driver-LCOSSX5-test.txt