mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 07:33:01 +02:00
cli: integrate (use) new show command in cli
This commit is contained in:
+2
-4
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user