File tree Expand file tree Collapse file tree
test/case/statd/containers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,13 @@ module infix-containers {
2222 prefix infix-sys;
2323 }
2424
25+ revision 2026 -04 -20 {
26+ description "Add cmdline operational leaf showing the full process command line
27+ (entrypoint + args) from 'podman inspect'. Allow environment variable
28+ references (dollar sign, braces) in the command override." ;
29+ reference "internal" ;
30+ }
31+
2532 revision 2026 -02 -23 {
2633 description "Input validation improvements" ;
2734 reference "internal" ;
@@ -257,10 +264,19 @@ module infix-containers {
257264 leaf command {
258265 description "Override ENTRYPOINT from image and run command + args." ;
259266 type string {
260- pattern '[a-zA-Z0-9_./ :=@%^,+-]+' ;
267+ pattern '[a-zA-Z0-9_./ :=@%^,${}() +-]+' ;
261268 }
262269 }
263270
271+ leaf cmdline {
272+ description "Full process command line currently executing in the container,
273+ combining the entrypoint and its arguments as reported by
274+ 'podman inspect'. May differ from the configured 'command'
275+ override when the image provides its own entrypoint wrapper." ;
276+ config false ;
277+ type string ;
278+ }
279+
264280 leaf hostname {
265281 description "Sets the container host name, available inside the container.
266282
File renamed without changes.
Original file line number Diff line number Diff line change 11# -*- sh -*-
22MODULES=(
33 " infix-interfaces -e containers"
4- " infix-containers@2026-02-23 .yang"
4+ " infix-containers@2026-04-20 .yang"
55)
Original file line number Diff line number Diff line change @@ -223,16 +223,21 @@ def container(ps):
223223 "status" : ps ["Status" ]
224224 }
225225
226- # Bonus information, may not be available
227- if ps ["Command" ]:
228- out ["command" ] = " " .join (ps ["Command" ])
229-
230226 inspect = podman_inspect (out ["name" ])
231227 if inspect and isinstance (inspect , list ) and len (inspect ) > 0 :
232228 inspect = inspect [0 ]
233229 else :
234230 inspect = {}
235231
232+ path = inspect .get ("Path" , "" )
233+ args = inspect .get ("Args" , [])
234+ if path :
235+ out ["cmdline" ] = " " .join ([path ] + args )
236+
237+ cmd = inspect .get ("Config" , {}).get ("Cmd" , [])
238+ if cmd :
239+ out ["command" ] = " " .join (cmd )
240+
236241 net = network (ps , inspect )
237242 if net :
238243 out ["network" ] = net
Original file line number Diff line number Diff line change 88 "image-id" : " d6930d60a73be9980f8e19b4b4f63586a6d3492178e20bea962e4e9b8c654033" ,
99 "running" : true ,
1010 "status" : " Up About a minute" ,
11+ "cmdline" : " /usr/bin/tini -- /usr/sbin/httpd -f -v" ,
1112 "command" : " /usr/sbin/httpd -f -v" ,
1213 "network" : {
1314 "interface" : [
2829 "image-id" : " d6930d60a73be9980f8e19b4b4f63586a6d3492178e20bea962e4e9b8c654033" ,
2930 "running" : true ,
3031 "status" : " Up About a minute" ,
32+ "cmdline" : " /usr/bin/tini -- /usr/sbin/httpd -f -v -p 91" ,
3133 "command" : " /usr/sbin/httpd -f -v -p 91" ,
3234 "network" : {
3335 "interface" : [
5052 "image-id" : " 7a3cc502436250357a6664100a600f306334b4d7203890b85b7ea9b8da6b5665" ,
5153 "running" : true ,
5254 "status" : " Up About a minute" ,
55+ "cmdline" : " /usr/bin/tini -- /usr/sbin/nft-helper /etc/nftables.conf" ,
5356 "command" : " /usr/sbin/nft-helper /etc/nftables.conf" ,
5457 "network" : {
5558 "host" : true
Original file line number Diff line number Diff line change 11871187 "infix-containers:containers" : {
11881188 "container" : [
11891189 {
1190+ "cmdline" : " /usr/bin/tini -- /usr/sbin/httpd -f -v" ,
11901191 "command" : " /usr/sbin/httpd -f -v" ,
11911192 "id" : " 78d28082c2e5d494c82aa181c95118ce498e25930ad9e288ba010257ca336378" ,
11921193 "image" : " localhost/curios-httpd-oci-amd64-v24.11.0:latest" ,
12071208 "status" : " Up About a minute"
12081209 },
12091210 {
1211+ "cmdline" : " /usr/bin/tini -- /usr/sbin/httpd -f -v -p 91" ,
12101212 "command" : " /usr/sbin/httpd -f -v -p 91" ,
12111213 "id" : " 3451cfceca4eee1091c1dfedece2faee99bc8a729e781799d9c0b4368a31d86d" ,
12121214 "image" : " localhost/curios-httpd-oci-amd64-v24.11.0:latest" ,
12291231 "status" : " Up About a minute"
12301232 },
12311233 {
1234+ "cmdline" : " /usr/bin/tini -- /usr/sbin/nft-helper /etc/nftables.conf" ,
12321235 "command" : " /usr/sbin/nft-helper /etc/nftables.conf" ,
12331236 "id" : " 4e7c3daeba15546e7640014b9ee46e389737ed36583e5cb2f8b75a07a82e8523" ,
12341237 "image" : " localhost/curios-nftables-oci-amd64-v24.11.0:latest" ,
You can’t perform that action at this time.
0 commit comments