diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2022-01-11 16:42:54 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2022-01-11 16:42:56 -0500 |
commit | 6e208c2226f856ed67d6ab807f3baf5bf9611135 (patch) | |
tree | 8d74da71869337114cc2fa915412809d904952a4 /cmd | |
parent | 3404ad042def1c02872f66836feae19c814901a4 (diff) | |
download | podman-6e208c2226f856ed67d6ab807f3baf5bf9611135.tar.gz podman-6e208c2226f856ed67d6ab807f3baf5bf9611135.tar.bz2 podman-6e208c2226f856ed67d6ab807f3baf5bf9611135.zip |
add additional fields to podman machine ls --json
[NO NEW TESTS NEEDED]
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/machine/list.go | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/cmd/podman/machine/list.go b/cmd/podman/machine/list.go index ed43b42df..3d8def0db 100644 --- a/cmd/podman/machine/list.go +++ b/cmd/podman/machine/list.go @@ -44,16 +44,19 @@ type listFlagType struct { } type machineReporter struct { - Name string - Default bool - Created string - Running bool - LastUp string - Stream string - VMType string - CPUs uint64 - Memory string - DiskSize string + Name string + Default bool + Created string + Running bool + LastUp string + Stream string + VMType string + CPUs uint64 + Memory string + DiskSize string + Port int + RemoteUsername string + IdentityPath string } func init() { @@ -190,6 +193,9 @@ func toMachineFormat(vms []*machine.ListResponse) ([]*machineReporter, error) { response.CPUs = vm.CPUs response.Memory = strUint(vm.Memory) response.DiskSize = strUint(vm.DiskSize) + response.Port = vm.Port + response.RemoteUsername = vm.RemoteUsername + response.IdentityPath = vm.IdentityPath machineResponses = append(machineResponses, response) } |