cli: integrate (use) new show command in cli

This commit is contained in:
Richard Alpe
2025-04-07 09:06:28 +02:00
parent 42af6eec30
commit 740ecbcc43
3 changed files with 9 additions and 30 deletions
+2 -4
View File
@@ -99,7 +99,7 @@ def interface(args: List[str]) -> None:
print(json.dumps(data, indent=2))
return
if len(args) == 0:
if len(args) == 0 or not args[0]: # Treat "" as no arg.
cli_pretty(data, "show-interfaces")
elif len(args) == 1:
iface = args[0]
@@ -130,10 +130,8 @@ def software(args: List[str]) -> None:
if RAW_OUTPUT:
print(json.dumps(data, indent=2))
return
if len(args) == 0:
if len(args) == 0 or not args[0]: # Treat "" as no arg.
cli_pretty(data, "show-software")
print(".....")
elif len(args) == 1:
name = args[0]
if name not in ("primary", "secondary"):