Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pluribus does not recognize "terminal" command #3566

Open
kdfw404 opened this issue Feb 3, 2025 · 5 comments
Open

Pluribus does not recognize "terminal" command #3566

kdfw404 opened this issue Feb 3, 2025 · 5 comments

Comments

@kdfw404
Copy link

kdfw404 commented Feb 3, 2025

I'm in the process of converting my code base from Netmiko 3.4 to Netmiko 4.5 and moving from CentOS7 to Rocky Linux 9.5. As part of testing Netmiko v4.5 on Rocky 9 with one of our Pluribus devices to determine if it could simply connect and find the prompt, I encountered terminal: Unrecognized command "terminal" reported in the session log. Furthermore, when I subsequently attempt to dump the config with running-config-show, I get a timeout with traceback. The session log indicates more at the bottom of the file, which corroborates the timeout.

I researched the Netmiko code, and found that in pluribus_ssh.py, method session_preparation(), I could override the default command terminal length 0 to replace it with pager off. Doing so eliminates the unrecognized command error, and it permits a complete screen dump of the config, as evidenced by the finished command in the session log.

From pluribus_ssh.py:
`
import time
from typing import Any

from netmiko.no_config import NoConfig
from netmiko.base_connection import BaseConnection

class PluribusSSH(NoConfig, BaseConnection):
"""Common methods for Pluribus."""

def __init__(self, *args: Any, **kwargs: Any) -> None:
    super().__init__(*args, **kwargs)
    self._config_mode = False

def session_preparation(self) -> None:
    """Prepare the netmiko session."""
    self._test_channel_read()
    self.set_base_prompt()
    # kdfw commented 2025-02-03
    # self.disable_paging()
    self.disable_paging(command="pager off")
    # Clear the read buffer
    time.sleep(0.3 * self.global_delay_factor)
    self.clear_buffer()

`
Does this seem like a reasonable solution?

@ktbyers
Copy link
Owner

ktbyers commented Feb 3, 2025

So is "pager off" the standard way to disable output paging on the Pluribus devices?

If so, that change sounds reasonable.

Kirk

@kdfw404
Copy link
Author

kdfw404 commented Feb 3, 2025

Hey Kirk,

Yes, that is how it worked in Netmiko v3.4. Session log from the v3.4 running instance indicates it used "pager off"... which is how I knew to try it.

FYI, in case it is of use to know, Pluribus Networks is the brand; the switches are running NetVisor OS version 6.1.1.

Thanks,
Kimberly

@ktbyers
Copy link
Owner

ktbyers commented Feb 3, 2025

@kdfw404 Okay, that just looks like an error that occurred going from V3.4.0 to V4.0.0. Do you want to do a PR on this?

@kdfw404
Copy link
Author

kdfw404 commented Feb 4, 2025

Hey Kirk,
I'm not sure what is involved in doing a pull request?
Thanks,
Kimberly

@ktbyers
Copy link
Owner

ktbyers commented Feb 5, 2025

I will see if I can do it (hopefully, Friday).

Kirk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants