summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorl0crian1 <143656816+l0crian1@users.noreply.github.com>2025-04-29 09:27:04 -0400
committerGitHub <noreply@github.com>2025-04-29 09:27:04 -0400
commit69154cb0cd4b651c9817dda9c88481feea3c76c4 (patch)
tree2648c485686de1f761ac1b7e83efad69118c7806 /src
parentf4c85539882ddb8410cca57255685b31c5be5812 (diff)
downloadvyos-1x-69154cb0cd4b651c9817dda9c88481feea3c76c4.tar.gz
vyos-1x-69154cb0cd4b651c9817dda9c88481feea3c76c4.zip
interfaces: T7268: Add op-mode command for show all interfaces on system
Commiting suggestions from dmbaturin Co-authored-by: Daniil Baturin <daniil@baturin.org>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/op_mode/interfaces.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/op_mode/interfaces.py b/src/op_mode/interfaces.py
index 23ec27d5b..c97f3b129 100755
--- a/src/op_mode/interfaces.py
+++ b/src/op_mode/interfaces.py
@@ -309,12 +309,12 @@ def _get_kernel_data(raw, ifname = None, detail = False):
if ifname:
# Check if the interface exists
if not interface_exists(ifname):
- raise vyos.opmode.Error(f"{ifname} does not exist!")
- int_name = f' dev {ifname}'
+ raise vyos.opmode.IncorrectValue(f"{ifname} does not exist!")
+ int_name = f'dev {ifname}'
else:
int_name = ''
- kernel_interface = json.loads(cmd(f'ip -j -d -s address show{int_name}'))
+ kernel_interface = json.loads(cmd(f'ip -j -d -s address show {int_name}'))
# Return early if raw
if raw: