ktbyers / netmiko

Multi-vendor library to simplify Paramiko SSH connections to network devices
MIT License
3.62k stars 1.31k forks source link

add prompt stripping to nokia srl #3529

Closed jeffkala closed 2 weeks ago

jeffkala commented 2 weeks ago

fixes #3522 Uses prompt stripping logic similar to what was done in Juniper.

previous output from a show command had first line of prompt included

{
  "basic system info": {
    "Hostname": "srl1",
    "Chassis Type": "7220 IXR-D2L",
    "Part Number": "Sim Part No.",
    "Serial Number": "Sim Serial No.",
    "System HW MAC Address": "1A:66:00:FF:00:00",
    "OS": "SR Linux",
    "Software Version": "v24.7.2",
    "Build Number": "319-g64b71941f7",
    "Architecture": "<Unknown>",
    "Last Booted": "2024-11-08T16:06:30.680Z",
    "Total Memory": "<Unknown>",
    "Free Memory": "<Unknown>"
  }
}
--{ running }--[  ]--

This change strips the trailing prompt lines.

{
  "basic system info": {
    "Hostname": "srl1",
    "Chassis Type": "7220 IXR-D2L",
    "Part Number": "Sim Part No.",
    "Serial Number": "Sim Serial No.",
    "System HW MAC Address": "1A:66:00:FF:00:00",
    "OS": "SR Linux",
    "Software Version": "v24.7.2",
    "Build Number": "319-g64b71941f7",
    "Architecture": "<Unknown>",
    "Last Booted": "2024-11-08T16:06:30.680Z",
    "Total Memory": "<Unknown>",
    "Free Memory": "<Unknown>"
  }
}
ktbyers commented 2 weeks ago

Superseded by https://github.com/ktbyers/netmiko/pull/3531