summaryrefslogtreecommitdiff
path: root/cmd/podman/machine
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/machine')
-rw-r--r--cmd/podman/machine/inspect.go10
-rw-r--r--cmd/podman/machine/list.go2
2 files changed, 4 insertions, 8 deletions
diff --git a/cmd/podman/machine/inspect.go b/cmd/podman/machine/inspect.go
index 1884cf94d..21e5074b7 100644
--- a/cmd/podman/machine/inspect.go
+++ b/cmd/podman/machine/inspect.go
@@ -41,7 +41,7 @@ func init() {
flags := inspectCmd.Flags()
formatFlagName := "format"
flags.StringVar(&inspectFlag.format, formatFlagName, "", "Format volume output using JSON or a Go template")
- _ = inspectCmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(machine.InspectInfo{}))
+ _ = inspectCmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(&machine.InspectInfo{}))
}
func inspect(cmd *cobra.Command, args []string) error {
@@ -59,16 +59,12 @@ func inspect(cmd *cobra.Command, args []string) error {
errs = append(errs, err)
continue
}
- state, err := vm.State(false)
+ ii, err := vm.Inspect()
if err != nil {
errs = append(errs, err)
continue
}
- ii := machine.InspectInfo{
- State: state,
- VM: vm,
- }
- vms = append(vms, ii)
+ vms = append(vms, *ii)
}
if len(inspectFlag.format) > 0 {
// need jhonce to work his template magic
diff --git a/cmd/podman/machine/list.go b/cmd/podman/machine/list.go
index 587e521a3..c987bf71a 100644
--- a/cmd/podman/machine/list.go
+++ b/cmd/podman/machine/list.go
@@ -69,7 +69,7 @@ func init() {
flags := lsCmd.Flags()
formatFlagName := "format"
flags.StringVar(&listFlag.format, formatFlagName, "{{.Name}}\t{{.VMType}}\t{{.Created}}\t{{.LastUp}}\t{{.CPUs}}\t{{.Memory}}\t{{.DiskSize}}\n", "Format volume output using JSON or a Go template")
- _ = lsCmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(machineReporter{}))
+ _ = lsCmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(&machineReporter{}))
flags.BoolVar(&listFlag.noHeading, "noheading", false, "Do not print headers")
flags.BoolVarP(&listFlag.quiet, "quiet", "q", false, "Show only machine names")
}