From 1359f690af841ea7c28028e907b1d5f15f3d90b8 Mon Sep 17 00:00:00 2001 From: Oleksandr Kuchmystyi Date: Wed, 4 Feb 2026 11:32:47 +0300 Subject: tech-support: T8215: Extend tech-support archive and report generation - Exclude .iso files from `/config` and `/home/*` to avoid large images - Exclude previous debug-archived from new archives - Include `/run` directory contents - Add kernel modules information (`lsmod`) - Add PCI details (`lspci -knnv`) - Include full `/config` directory - Add FRR memory usage (`vtysh "show memory"`) - Add VPP info (`vppctl`) - Add NUMA details (`numactl --hardware`, `numastat -cm`) Full list of commands here: https://vyos.dev/T8215 --- python/vyos/utils/file.py | 15 +++++++++++++++ python/vyos/utils/process.py | 6 ++++++ 2 files changed, 21 insertions(+) (limited to 'python') diff --git a/python/vyos/utils/file.py b/python/vyos/utils/file.py index 6708ade2d..f230977a7 100644 --- a/python/vyos/utils/file.py +++ b/python/vyos/utils/file.py @@ -339,3 +339,18 @@ def file_compare(file1: str, file2: str) -> bool: return False return True + + +def get_name_from_path(path) -> str: + """ + Extracts the base name (without extension) from a file path. + + Args: + path (str | pathlib.Path): The file path to extract the name from. + + Returns: + str: The base name without file extension. + """ + base = os.path.basename(path) + name, _ = base.split('.', maxsplit=1) + return name diff --git a/python/vyos/utils/process.py b/python/vyos/utils/process.py index 158371024..74546a172 100644 --- a/python/vyos/utils/process.py +++ b/python/vyos/utils/process.py @@ -321,3 +321,9 @@ def ip_cmd(args, json=True): else: res = cmd(f"ip {args}") return res + + +def wrap_op(cmd: str) -> str: + """Returns a command with the VyOS operational mode wrapper.""" + + return f'/opt/vyatta/bin/vyatta-op-cmd-wrapper {cmd}' -- cgit v1.2.3