systemd 258 (Ubuntu 26.04) ships /etc/profile.d/80-systemd-osc-context.sh: an interactive bash wraps every command in OSC 3008 sequences from PS0 and PROMPT_COMMAND, each with a fresh UUID. They ended up in every value read through netmiko's shell, and because the prompt never looked the same twice, the prompt line stayed in the output too. On a real Ubuntu 26.04.1 host os_version grew past 255 characters and netOrk could not store the poll.
open() sends unset PS0 PROMPT_COMMAND right after switching the history off, then re-reads the prompt (set_base_prompt()), so netmiko's prompt stripping works again. unset because the script appends to PROMPT_COMMAND as an array.
_send() runs its output through strip_terminal_codes() as a second line of defence.
Fixture: the real os-release output from that host.
Version 0.15.1.
netOrk cannot take 0.15.x before it moves to napalm-device-types 4.22, so the same fix sits on fix/osc-context-41-backport (c00deef, on top of 0ba5081, the commit netOrk pins). netOrk pins that SHA until then; keep the branch.
Fixes #41.
systemd 258 (Ubuntu 26.04) ships `/etc/profile.d/80-systemd-osc-context.sh`: an interactive bash wraps every command in OSC 3008 sequences from `PS0` and `PROMPT_COMMAND`, each with a fresh UUID. They ended up in every value read through netmiko's shell, and because the prompt never looked the same twice, the prompt line stayed in the output too. On a real Ubuntu 26.04.1 host `os_version` grew past 255 characters and netOrk could not store the poll.
- `open()` sends `unset PS0 PROMPT_COMMAND` right after switching the history off, then re-reads the prompt (`set_base_prompt()`), so netmiko's prompt stripping works again. `unset` because the script appends to `PROMPT_COMMAND` as an array.
- `_send()` runs its output through `strip_terminal_codes()` as a second line of defence.
- Fixture: the real `os-release` output from that host.
- Version 0.15.1.
netOrk cannot take 0.15.x before it moves to napalm-device-types 4.22, so the same fix sits on `fix/osc-context-41-backport` (c00deef, on top of 0ba5081, the commit netOrk pins). netOrk pins that SHA until then; keep the branch.
systemd 258 (Ubuntu 26.04) ships /etc/profile.d/80-systemd-osc-context.sh:
an interactive bash wraps every command in OSC 3008 sequences from PS0 and
PROMPT_COMMAND, each with a fresh UUID. They ended up in every value read
through netmiko's shell, and because the prompt never looked the same twice,
the prompt line stayed in the output too. os_version grew past 255
characters and netOrk could not store the poll.
The session now unsets PS0 and PROMPT_COMMAND right after switching the
history off and reads its prompt anew; _send() strips terminal codes from
what it returns.
Version 0.15.1.
The prompt-hook step (#41) pushed linux.py past its line count in the
quality baseline. The three steps that make netmiko's fresh shell fit to
read - history off, prompt hooks off, no line wrap - and the prompt
pattern move to napalm_linux/_shell.py, under strict mypy. linux.py
shrinks below where it was; the baseline follows.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #41.
systemd 258 (Ubuntu 26.04) ships
/etc/profile.d/80-systemd-osc-context.sh: an interactive bash wraps every command in OSC 3008 sequences fromPS0andPROMPT_COMMAND, each with a fresh UUID. They ended up in every value read through netmiko's shell, and because the prompt never looked the same twice, the prompt line stayed in the output too. On a real Ubuntu 26.04.1 hostos_versiongrew past 255 characters and netOrk could not store the poll.open()sendsunset PS0 PROMPT_COMMANDright after switching the history off, then re-reads the prompt (set_base_prompt()), so netmiko's prompt stripping works again.unsetbecause the script appends toPROMPT_COMMANDas an array._send()runs its output throughstrip_terminal_codes()as a second line of defence.os-releaseoutput from that host.netOrk cannot take 0.15.x before it moves to napalm-device-types 4.22, so the same fix sits on
fix/osc-context-41-backport(c00deef, on top of0ba5081, the commit netOrk pins). netOrk pins that SHA until then; keep the branch.