aboutsummaryrefslogtreecommitdiff
path: root/pkg/machine/e2e/config_info.go
diff options
context:
space:
mode:
authorAshley Cui <acui@redhat.com>2022-06-17 14:47:26 -0400
committerAshley Cui <acui@redhat.com>2022-07-05 15:18:41 -0400
commit9d6efb34428811cc2b55b306733911cf20bd0b44 (patch)
tree887aaf6a2703035c893451740f393da0186aade7 /pkg/machine/e2e/config_info.go
parentb00e65aa9c071428579a55f91a92f3702765ed85 (diff)
downloadpodman-9d6efb34428811cc2b55b306733911cf20bd0b44.tar.gz
podman-9d6efb34428811cc2b55b306733911cf20bd0b44.tar.bz2
podman-9d6efb34428811cc2b55b306733911cf20bd0b44.zip
Podman machine info
Add podman machine info command, which displays infor about the machine host as well as version info. Signed-off-by: Ashley Cui <acui@redhat.com>
Diffstat (limited to 'pkg/machine/e2e/config_info.go')
-rw-r--r--pkg/machine/e2e/config_info.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkg/machine/e2e/config_info.go b/pkg/machine/e2e/config_info.go
new file mode 100644
index 000000000..410c7e518
--- /dev/null
+++ b/pkg/machine/e2e/config_info.go
@@ -0,0 +1,20 @@
+package e2e
+
+type infoMachine struct {
+ format string
+ cmd []string
+}
+
+func (i *infoMachine) buildCmd(m *machineTestBuilder) []string {
+ cmd := []string{"machine", "info"}
+ if len(i.format) > 0 {
+ cmd = append(cmd, "--format", i.format)
+ }
+ i.cmd = cmd
+ return cmd
+}
+
+func (i *infoMachine) withFormat(format string) *infoMachine {
+ i.format = format
+ return i
+}