From d457d437537297ea926ff0df75fe1b159ddbd299 Mon Sep 17 00:00:00 2001 From: Richard Alpe Date: Tue, 28 Oct 2025 15:02:05 +0100 Subject: [PATCH] show: add system services command Add the command show system services. Signed-off-by: Richard Alpe --- src/show/show.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/show/show.py b/src/show/show.py index 573ee160..42ed458c 100755 --- a/src/show/show.py +++ b/src/show/show.py @@ -142,6 +142,18 @@ def software(args: List[str]) -> None: else: print("Too many arguments provided. Only one name is expected.") +def services(args: List[str]) -> None: + data = run_sysrepocfg("/ietf-system:system-state/infix-system:services") + if not data: + print("No service data retrieved.") + return + + if RAW_OUTPUT: + print(json.dumps(data, indent=2)) + return + + cli_pretty(data, f"show-services") + def routes(args: List[str]): ip_version = args[0] if args and args[0] in ["ipv4", "ipv6"] else "ipv4" @@ -186,6 +198,7 @@ def execute_command(command: str, args: List[str]): 'ntp': ntp, 'routes': routes, 'lldp': lldp, + 'services' : services, 'software' : software, 'stp': stp, 'wifi': wifi