summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorAnders F Björklund <anders.f.bjorklund@gmail.com>2021-10-25 19:43:01 +0200
committerAnders F Björklund <anders.f.bjorklund@gmail.com>2021-10-26 21:58:39 +0200
commit864748df5be076a1456dfad07ecf62183e2f155e (patch)
tree4024a9f1f76adcccd95b08b3844df427f8aba872 /cmd/podman
parent22e5dc19b01e813ff73f4a5be2df9c4adf795fd2 (diff)
downloadpodman-864748df5be076a1456dfad07ecf62183e2f155e.tar.gz
podman-864748df5be076a1456dfad07ecf62183e2f155e.tar.bz2
podman-864748df5be076a1456dfad07ecf62183e2f155e.zip
Record the image stream along with the path
[NO TESTS NEEDED] Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/machine/list.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/podman/machine/list.go b/cmd/podman/machine/list.go
index 7e5459e08..d569f4db0 100644
--- a/cmd/podman/machine/list.go
+++ b/cmd/podman/machine/list.go
@@ -48,6 +48,7 @@ type machineReporter struct {
Created string
Running bool
LastUp string
+ Stream string
VMType string
CPUs uint64
Memory string
@@ -153,6 +154,13 @@ func strUint(u uint64) string {
return strconv.FormatUint(u, 10)
}
+func streamName(imageStream string) string {
+ if imageStream == "" {
+ return "default"
+ }
+ return imageStream
+}
+
func toMachineFormat(vms []*machine.ListResponse) ([]*machineReporter, error) {
cfg, err := config.ReadCustomConfig()
if err != nil {
@@ -167,6 +175,7 @@ func toMachineFormat(vms []*machine.ListResponse) ([]*machineReporter, error) {
response.Running = vm.Running
response.LastUp = strTime(vm.LastUp)
response.Created = strTime(vm.CreatedAt)
+ response.Stream = streamName(vm.Stream)
response.VMType = vm.VMType
response.CPUs = vm.CPUs
response.Memory = strUint(vm.Memory * units.MiB)