summaryrefslogtreecommitdiff
path: root/pkg/machine/e2e/config_inspect.go
blob: 74c9a5d9c0fceae36ae330b1244a959edec4dffe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package e2e

type inspectMachine struct {
	/*
		--format string   Format volume output using JSON or a Go template
	*/
	cmd    []string
	format string
}

func (i *inspectMachine) buildCmd(m *machineTestBuilder) []string {
	cmd := []string{"machine", "inspect"}
	if len(i.format) > 0 {
		cmd = append(cmd, "--format", i.format)
	}
	cmd = append(cmd, m.names...)
	i.cmd = cmd
	return cmd
}

func (i *inspectMachine) withFormat(format string) *inspectMachine {
	i.format = format
	return i
}