summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-29 20:22:29 +0000
committerGitHub <noreply@github.com>2021-10-29 20:22:29 +0000
commit09efcd48a86fac761fe73fda9e77af668515ddcc (patch)
treed872eb7977c43b0e9a5ef56f620dee1be3f3f8dc /cmd
parente3c45ab9cc0a2dc6f6f497932c1d5beb03903f43 (diff)
parent864748df5be076a1456dfad07ecf62183e2f155e (diff)
downloadpodman-09efcd48a86fac761fe73fda9e77af668515ddcc.tar.gz
podman-09efcd48a86fac761fe73fda9e77af668515ddcc.tar.bz2
podman-09efcd48a86fac761fe73fda9e77af668515ddcc.zip
Merge pull request #12090 from afbjorklund/image-stream
Record the image stream along with the path
Diffstat (limited to 'cmd')
-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)