File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,18 @@ def software(args: List[str]) -> None:
142142 else :
143143 print ("Too many arguments provided. Only one name is expected." )
144144
145+ def services (args : List [str ]) -> None :
146+ data = run_sysrepocfg ("/ietf-system:system-state/infix-system:services" )
147+ if not data :
148+ print ("No service data retrieved." )
149+ return
150+
151+ if RAW_OUTPUT :
152+ print (json .dumps (data , indent = 2 ))
153+ return
154+
155+ cli_pretty (data , f"show-services" )
156+
145157def routes (args : List [str ]):
146158 ip_version = args [0 ] if args and args [0 ] in ["ipv4" , "ipv6" ] else "ipv4"
147159
@@ -186,6 +198,7 @@ def execute_command(command: str, args: List[str]):
186198 'ntp' : ntp ,
187199 'routes' : routes ,
188200 'lldp' : lldp ,
201+ 'services' : services ,
189202 'software' : software ,
190203 'stp' : stp ,
191204 'wifi' : wifi
You can’t perform that action at this time.
0 commit comments