diff --git a/coverage.txt b/coverage.txt index 159093a7..3bc7ee9e 100644 --- a/coverage.txt +++ b/coverage.txt @@ -548,88 +548,98 @@ github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:525.3,525.44 1 github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:529.73,531.16 2 0 github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:531.16,533.3 1 0 github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:535.2,535.16 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:535.16,537.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:539.2,539.43 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:542.72,544.16 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:544.16,546.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:548.2,548.16 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:548.16,550.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:552.2,553.115 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:553.115,554.68 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:554.68,555.37 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:555.37,557.5 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:559.4,559.14 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:564.75,566.16 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:566.16,568.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:570.2,570.16 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:570.16,571.70 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:571.70,572.45 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:572.45,574.5 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:575.4,575.14 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:579.2,580.69 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:580.69,581.39 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:581.39,583.4 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:585.3,585.13 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:589.74,591.16 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:591.16,593.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:595.2,595.16 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:595.16,597.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:599.2,601.16 3 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:601.16,603.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:605.2,605.76 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:608.47,609.124 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:609.124,610.67 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:610.67,612.18 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:612.18,614.5 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:615.4,615.14 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:620.76,622.16 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:622.16,624.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:626.2,626.16 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:626.16,629.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:631.2,633.12 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:636.78,638.16 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:638.16,640.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:642.2,642.16 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:642.16,644.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:646.2,646.47 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:649.73,659.2 4 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:661.82,663.16 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:663.16,665.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:667.2,667.16 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:667.16,669.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:671.2,677.67 3 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:680.46,681.123 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:681.123,682.68 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:682.68,683.66 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:683.66,684.45 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:684.45,685.50 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:685.50,687.7 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:691.4,691.14 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:696.48,697.125 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:697.125,698.68 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:698.68,699.66 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:699.66,700.45 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:700.45,701.63 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:701.63,703.7 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:707.4,707.14 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:712.80,732.2 4 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:735.89,737.16 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:737.16,739.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:741.2,741.16 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:741.16,743.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:745.2,745.51 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:748.71,750.33 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:750.33,752.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:754.2,755.19 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:755.19,757.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:758.2,759.21 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:759.21,761.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:762.2,763.37 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:766.77,768.16 2 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:768.16,770.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:772.2,772.17 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:772.17,774.3 1 0 -github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:776.2,779.45 3 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:535.16,536.67 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:536.67,538.36 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:538.36,539.46 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:539.46,541.6 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:542.10,543.44 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:543.44,545.6 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:547.4,547.45 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:551.2,551.43 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:554.72,556.16 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:556.16,558.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:560.2,560.16 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:560.16,561.116 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:561.116,562.69 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:562.69,563.43 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:563.43,565.6 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:566.5,566.46 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:571.2,572.115 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:572.115,573.68 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:573.68,574.37 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:574.37,576.5 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:578.4,578.14 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:583.75,585.16 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:585.16,587.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:589.2,589.16 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:589.16,590.70 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:590.70,591.45 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:591.45,593.5 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:594.4,594.14 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:598.2,599.69 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:599.69,600.39 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:600.39,602.4 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:604.3,604.13 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:608.74,610.16 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:610.16,612.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:614.2,614.16 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:614.16,616.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:618.2,620.16 3 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:620.16,622.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:624.2,624.76 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:627.47,628.124 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:628.124,629.67 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:629.67,631.18 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:631.18,633.5 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:634.4,634.14 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:639.76,641.16 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:641.16,643.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:645.2,645.16 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:645.16,648.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:650.2,652.12 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:655.78,657.16 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:657.16,659.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:661.2,661.16 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:661.16,663.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:665.2,665.47 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:668.73,678.2 4 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:680.82,682.16 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:682.16,684.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:686.2,686.16 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:686.16,688.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:690.2,696.67 3 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:699.46,700.123 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:700.123,701.68 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:701.68,702.66 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:702.66,703.45 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:703.45,704.50 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:704.50,706.7 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:710.4,710.14 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:715.48,716.125 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:716.125,717.68 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:717.68,718.66 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:718.66,719.45 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:719.45,720.63 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:720.63,722.7 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:726.4,726.14 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:731.80,751.2 4 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:754.89,756.16 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:756.16,758.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:760.2,760.16 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:760.16,762.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:764.2,764.51 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:767.71,769.33 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:769.33,771.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:773.2,774.19 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:774.19,776.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:777.2,778.21 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:778.21,780.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:781.2,782.37 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:785.77,787.16 2 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:787.16,789.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:791.2,791.17 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:791.17,793.3 1 0 +github.com/christophe-duc/lazypodman/pkg/gui/containers_panel.go:795.2,798.45 3 0 github.com/christophe-duc/lazypodman/pkg/gui/custom_commands.go:12.154,13.96 1 0 github.com/christophe-duc/lazypodman/pkg/gui/custom_commands.go:13.96,16.27 2 0 github.com/christophe-duc/lazypodman/pkg/gui/custom_commands.go:16.27,17.39 1 0 @@ -1928,21 +1938,25 @@ github.com/christophe-duc/lazypodman/pkg/commands/os.go:373.55,375.2 1 0 github.com/christophe-duc/lazypodman/pkg/commands/os_default_platform.go:10.30,18.2 1 31 github.com/christophe-duc/lazypodman/pkg/commands/pod.go:33.30,35.2 1 0 github.com/christophe-duc/lazypodman/pkg/commands/pod.go:38.31,42.2 3 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:45.36,47.2 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:50.46,52.33 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:52.33,53.35 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:53.35,55.4 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:57.2,57.14 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:61.79,67.2 4 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:70.58,71.22 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:71.22,73.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:75.2,75.37 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:75.37,76.48 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:76.48,79.4 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:83.2,83.21 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:87.56,91.23 4 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:91.23,93.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/pod.go:94.2,94.38 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:45.29,49.2 3 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:52.28,56.2 3 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:59.29,63.2 3 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:66.31,70.2 3 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:73.36,75.2 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:78.46,80.33 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:80.33,81.35 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:81.35,83.4 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:85.2,85.14 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:89.79,95.2 4 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:98.58,99.22 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:99.22,101.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:103.2,103.37 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:103.37,104.48 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:104.48,107.4 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:111.2,111.21 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:115.56,119.23 4 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:119.23,121.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/pod.go:122.2,122.38 1 0 github.com/christophe-duc/lazypodman/pkg/commands/podman.go:62.75,66.2 3 2 github.com/christophe-duc/lazypodman/pkg/commands/podman.go:70.161,79.45 5 0 github.com/christophe-duc/lazypodman/pkg/commands/podman.go:79.45,82.23 3 0 @@ -2138,7 +2152,11 @@ github.com/christophe-duc/lazypodman/pkg/commands/runtime_libpod_stub.go:129.66, github.com/christophe-duc/lazypodman/pkg/commands/runtime_libpod_stub.go:135.77,137.2 1 0 github.com/christophe-duc/lazypodman/pkg/commands/runtime_libpod_stub.go:139.116,146.2 6 0 github.com/christophe-duc/lazypodman/pkg/commands/runtime_libpod_stub.go:148.88,150.2 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_libpod_stub.go:153.82,160.2 6 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_libpod_stub.go:152.72,154.2 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_libpod_stub.go:156.85,158.2 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_libpod_stub.go:160.72,162.2 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_libpod_stub.go:164.74,166.2 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_libpod_stub.go:169.82,176.2 6 0 github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:68.70,70.2 1 80 github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:74.87,76.33 2 10 github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:76.33,78.3 1 8 @@ -2215,21 +2233,25 @@ github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:276.2,281.23 6 github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:284.86,286.29 2 0 github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:286.29,288.3 1 0 github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:289.2,289.30 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:294.80,296.25 2 3 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:296.25,298.3 1 1 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:299.2,304.24 6 2 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:309.37,311.24 2 5 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:311.24,313.3 1 2 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:314.2,314.12 1 3 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:317.37,319.23 2 4 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:319.23,321.3 1 1 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:322.2,322.15 1 3 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:328.52,330.31 2 39 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:330.31,331.28 1 666 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:331.28,333.4 1 40 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:335.2,335.14 1 39 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:339.53,341.2 1 35 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:344.31,346.2 1 4 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:292.70,295.2 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:297.83,300.2 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:302.70,305.2 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:307.72,310.2 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:314.80,316.25 2 3 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:316.25,318.3 1 1 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:319.2,324.24 6 2 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:329.37,331.24 2 5 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:331.24,333.3 1 2 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:334.2,334.12 1 3 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:337.37,339.23 2 4 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:339.23,341.3 1 1 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:342.2,342.15 1 3 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:348.52,350.31 2 39 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:350.31,351.28 1 666 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:351.28,353.4 1 40 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:355.2,355.14 1 39 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:359.53,361.2 1 35 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_mock.go:364.31,366.2 1 4 github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:32.66,34.16 2 0 github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:34.16,36.3 1 0 github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:37.2,37.40 1 0 @@ -2312,83 +2334,89 @@ github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:333.20,333.2 github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:334.22,335.11 1 0 github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:340.2,340.27 1 0 github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:344.88,347.2 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:350.71,351.23 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:351.23,353.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:355.2,362.28 7 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:362.28,391.24 16 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:391.24,394.4 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:397.2,407.14 10 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:411.40,416.2 4 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:419.50,421.21 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:421.21,423.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:424.2,426.21 3 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:430.46,432.21 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:432.21,434.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:435.2,437.22 3 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:441.38,443.26 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:443.26,445.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:448.2,453.12 5 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:453.12,455.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:457.2,458.14 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:459.15,460.21 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:461.19,462.28 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:463.19,464.35 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:465.19,466.42 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:467.19,468.49 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:469.10,470.21 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:475.33,480.2 4 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:483.82,487.12 3 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:487.12,495.13 6 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:495.13,498.4 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:500.3,500.13 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:500.13,502.18 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:502.18,504.5 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:507.3,507.44 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:507.44,517.11 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:518.28,518.28 0 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:519.22,520.11 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:525.2,525.27 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:530.95,532.37 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:532.37,534.20 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:534.20,537.4 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:538.3,554.4 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:556.2,556.15 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:559.43,560.19 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:560.19,562.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:564.2,565.21 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:568.69,570.26 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:570.26,577.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:578.2,578.15 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:581.89,582.17 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:582.17,584.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:586.2,604.23 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:604.23,619.31 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:619.31,624.4 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:627.2,627.24 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:627.24,629.33 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:629.33,631.4 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:632.3,650.4 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:653.2,653.16 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:656.82,678.2 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:680.83,682.35 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:682.35,695.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:696.2,696.15 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:699.81,700.17 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:700.17,702.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:704.2,718.24 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:718.24,720.44 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:720.44,722.4 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:723.3,726.4 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:729.2,729.16 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:732.93,734.32 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:734.32,743.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:744.2,744.15 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:747.90,749.36 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:749.36,759.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:760.2,760.15 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:763.83,765.36 2 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:765.36,773.3 1 0 -github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:774.2,774.15 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:350.72,353.2 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:356.85,358.20 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:358.20,360.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:361.2,362.12 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:366.72,369.2 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:372.74,375.2 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:378.71,379.23 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:379.23,381.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:383.2,390.28 7 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:390.28,419.24 16 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:419.24,422.4 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:425.2,435.14 10 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:439.40,444.2 4 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:447.50,449.21 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:449.21,451.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:452.2,454.21 3 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:458.46,460.21 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:460.21,462.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:463.2,465.22 3 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:469.38,471.26 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:471.26,473.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:476.2,481.12 5 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:481.12,483.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:485.2,486.14 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:487.15,488.21 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:489.19,490.28 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:491.19,492.35 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:493.19,494.42 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:495.19,496.49 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:497.10,498.21 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:503.33,508.2 4 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:511.82,515.12 3 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:515.12,523.13 6 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:523.13,526.4 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:528.3,528.13 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:528.13,530.18 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:530.18,532.5 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:535.3,535.44 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:535.44,545.11 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:546.28,546.28 0 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:547.22,548.11 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:553.2,553.27 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:558.95,560.37 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:560.37,562.20 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:562.20,565.4 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:566.3,582.4 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:584.2,584.15 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:587.43,588.19 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:588.19,590.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:592.2,593.21 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:596.69,598.26 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:598.26,605.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:606.2,606.15 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:609.89,610.17 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:610.17,612.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:614.2,632.23 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:632.23,647.31 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:647.31,652.4 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:655.2,655.24 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:655.24,657.33 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:657.33,659.4 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:660.3,678.4 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:681.2,681.16 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:684.82,706.2 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:708.83,710.35 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:710.35,723.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:724.2,724.15 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:727.81,728.17 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:728.17,730.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:732.2,746.24 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:746.24,748.44 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:748.44,750.4 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:751.3,754.4 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:757.2,757.16 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:760.93,762.32 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:762.32,771.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:772.2,772.15 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:775.90,777.36 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:777.36,787.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:788.2,788.15 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:791.83,793.36 2 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:793.36,801.3 1 0 +github.com/christophe-duc/lazypodman/pkg/commands/runtime_socket.go:802.2,802.15 1 0 github.com/christophe-duc/lazypodman/pkg/commands/service.go:22.64,24.2 1 0 github.com/christophe-duc/lazypodman/pkg/commands/service.go:27.32,29.2 1 0 github.com/christophe-duc/lazypodman/pkg/commands/service.go:32.30,34.2 1 0 diff --git a/pkg/commands/pod.go b/pkg/commands/pod.go index d5c4a87c..f10c822d 100644 --- a/pkg/commands/pod.go +++ b/pkg/commands/pod.go @@ -41,6 +41,34 @@ func (p *Pod) Restart() error { return p.Runtime.RestartPod(ctx, p.ID, nil) } +// Start starts the pod +func (p *Pod) Start() error { + p.Log.Warn(fmt.Sprintf("starting pod %s", p.Name)) + ctx := context.Background() + return p.Runtime.StartPod(ctx, p.ID) +} + +// Stop stops the pod +func (p *Pod) Stop() error { + p.Log.Warn(fmt.Sprintf("stopping pod %s", p.Name)) + ctx := context.Background() + return p.Runtime.StopPod(ctx, p.ID, nil) +} + +// Pause pauses the pod +func (p *Pod) Pause() error { + p.Log.Warn(fmt.Sprintf("pausing pod %s", p.Name)) + ctx := context.Background() + return p.Runtime.PausePod(ctx, p.ID) +} + +// Unpause unpauses the pod +func (p *Pod) Unpause() error { + p.Log.Warn(fmt.Sprintf("unpausing pod %s", p.Name)) + ctx := context.Background() + return p.Runtime.UnpausePod(ctx, p.ID) +} + // HasContainers returns true if the pod has non-infra containers. func (p *Pod) HasContainers() bool { return len(p.Containers) > 0 diff --git a/pkg/commands/runtime.go b/pkg/commands/runtime.go index 8ed40c8c..dddbe4d8 100644 --- a/pkg/commands/runtime.go +++ b/pkg/commands/runtime.go @@ -41,6 +41,10 @@ type ContainerRuntime interface { ListPods(ctx context.Context) ([]PodSummary, error) PodStats(ctx context.Context, id string, stream bool) (<-chan PodStatsEntry, <-chan error) RestartPod(ctx context.Context, id string, timeout *int) error + StartPod(ctx context.Context, id string) error + StopPod(ctx context.Context, id string, timeout *int) error + PausePod(ctx context.Context, id string) error + UnpausePod(ctx context.Context, id string) error // Events streams container/image/volume/network events Events(ctx context.Context) (<-chan Event, <-chan error) diff --git a/pkg/commands/runtime_libpod.go b/pkg/commands/runtime_libpod.go index 25c9c1d8..86db74fe 100644 --- a/pkg/commands/runtime_libpod.go +++ b/pkg/commands/runtime_libpod.go @@ -448,6 +448,51 @@ func (r *LibpodRuntime) RestartPod(ctx context.Context, id string, timeout *int) return err } +// StartPod starts a stopped pod. +func (r *LibpodRuntime) StartPod(ctx context.Context, id string) error { + pod, err := r.runtime.LookupPod(id) + if err != nil { + return err + } + _, err = pod.Start(ctx) + return err +} + +// StopPod stops a running pod. +func (r *LibpodRuntime) StopPod(ctx context.Context, id string, timeout *int) error { + pod, err := r.runtime.LookupPod(id) + if err != nil { + return err + } + cleanup := false + if timeout != nil { + _, err = pod.StopWithTimeout(ctx, cleanup, *timeout) + } else { + _, err = pod.Stop(ctx, cleanup) + } + return err +} + +// PausePod pauses all running containers in a pod. +func (r *LibpodRuntime) PausePod(ctx context.Context, id string) error { + pod, err := r.runtime.LookupPod(id) + if err != nil { + return err + } + _, err = pod.Pause(ctx) + return err +} + +// UnpausePod unpauses all paused containers in a pod. +func (r *LibpodRuntime) UnpausePod(ctx context.Context, id string) error { + pod, err := r.runtime.LookupPod(id) + if err != nil { + return err + } + _, err = pod.Unpause(ctx) + return err +} + // Events streams container runtime events. // For libpod, we use a polling approach since direct event streaming requires more setup. func (r *LibpodRuntime) Events(ctx context.Context) (<-chan Event, <-chan error) { diff --git a/pkg/commands/runtime_libpod_stub.go b/pkg/commands/runtime_libpod_stub.go index 0af8c630..0896c2be 100644 --- a/pkg/commands/runtime_libpod_stub.go +++ b/pkg/commands/runtime_libpod_stub.go @@ -149,6 +149,22 @@ func (r *LibpodRuntime) RestartPod(ctx context.Context, id string, timeout *int) return ErrLibpodNotAvailable } +func (r *LibpodRuntime) StartPod(ctx context.Context, id string) error { + return ErrLibpodNotAvailable +} + +func (r *LibpodRuntime) StopPod(ctx context.Context, id string, timeout *int) error { + return ErrLibpodNotAvailable +} + +func (r *LibpodRuntime) PausePod(ctx context.Context, id string) error { + return ErrLibpodNotAvailable +} + +func (r *LibpodRuntime) UnpausePod(ctx context.Context, id string) error { + return ErrLibpodNotAvailable +} + // Events returns an error channel on non-Linux platforms. func (r *LibpodRuntime) Events(ctx context.Context) (<-chan Event, <-chan error) { eventsChan := make(chan Event) diff --git a/pkg/commands/runtime_mock.go b/pkg/commands/runtime_mock.go index 75eff16c..dc96613a 100644 --- a/pkg/commands/runtime_mock.go +++ b/pkg/commands/runtime_mock.go @@ -289,6 +289,26 @@ func (m *MockRuntime) RestartPod(ctx context.Context, id string, timeout *int) e return ErrMockNotImplemented } +func (m *MockRuntime) StartPod(ctx context.Context, id string) error { + m.recordCall("StartPod", id) + return ErrMockNotImplemented +} + +func (m *MockRuntime) StopPod(ctx context.Context, id string, timeout *int) error { + m.recordCall("StopPod", id, timeout) + return ErrMockNotImplemented +} + +func (m *MockRuntime) PausePod(ctx context.Context, id string) error { + m.recordCall("PausePod", id) + return ErrMockNotImplemented +} + +func (m *MockRuntime) UnpausePod(ctx context.Context, id string) error { + m.recordCall("UnpausePod", id) + return ErrMockNotImplemented +} + // Events func (m *MockRuntime) Events(ctx context.Context) (<-chan Event, <-chan error) { diff --git a/pkg/commands/runtime_socket.go b/pkg/commands/runtime_socket.go index d0c87693..33018109 100644 --- a/pkg/commands/runtime_socket.go +++ b/pkg/commands/runtime_socket.go @@ -346,6 +346,34 @@ func (r *SocketRuntime) RestartPod(ctx context.Context, id string, timeout *int) return err } +// StartPod starts a stopped pod. +func (r *SocketRuntime) StartPod(ctx context.Context, id string) error { + _, err := pods.Start(r.conn, id, nil) + return err +} + +// StopPod stops a running pod. +func (r *SocketRuntime) StopPod(ctx context.Context, id string, timeout *int) error { + opts := &pods.StopOptions{} + if timeout != nil { + opts.Timeout = timeout + } + _, err := pods.Stop(r.conn, id, opts) + return err +} + +// PausePod pauses all running containers in a pod. +func (r *SocketRuntime) PausePod(ctx context.Context, id string) error { + _, err := pods.Pause(r.conn, id, nil) + return err +} + +// UnpausePod unpauses all paused containers in a pod. +func (r *SocketRuntime) UnpausePod(ctx context.Context, id string) error { + _, err := pods.Unpause(r.conn, id, nil) + return err +} + // aggregatePodStats combines stats from all containers in a pod into a single entry. func aggregatePodStats(reports []*types.PodStatsReport) PodStatsEntry { if len(reports) == 0 { diff --git a/pkg/gui/containers_panel.go b/pkg/gui/containers_panel.go index 7f873151..8e470384 100644 --- a/pkg/gui/containers_panel.go +++ b/pkg/gui/containers_panel.go @@ -533,7 +533,19 @@ func (gui *Gui) handleContainerPause(g *gocui.Gui, v *gocui.View) error { } if item.IsPod { - return gui.createErrorPanel("Pause not yet supported for pods") + return gui.WithWaitingStatus(gui.Tr.PausingStatus, func() error { + // Toggle between pause/unpause based on pod state + if item.Pod.State() == "Paused" { + if err := item.Pod.Unpause(); err != nil { + return gui.createErrorPanel(err.Error()) + } + } else { + if err := item.Pod.Pause(); err != nil { + return gui.createErrorPanel(err.Error()) + } + } + return gui.refreshContainersAndServices() + }) } return gui.PauseContainer(item.Container) @@ -546,7 +558,14 @@ func (gui *Gui) handleContainerStop(g *gocui.Gui, v *gocui.View) error { } if item.IsPod { - return gui.createErrorPanel("Stop not yet supported for pods") + return gui.createConfirmationPanel(gui.Tr.Confirm, gui.Tr.StopContainer, func(g *gocui.Gui, v *gocui.View) error { + return gui.WithWaitingStatus(gui.Tr.StoppingStatus, func() error { + if err := item.Pod.Stop(); err != nil { + return gui.createErrorPanel(err.Error()) + } + return gui.refreshContainersAndServices() + }) + }, nil) } ctr := item.Container