Skip to content

Commit 8d26488

Browse files
machine: drop no longer used code
1 parent d386900 commit 8d26488

1 file changed

Lines changed: 7 additions & 30 deletions

File tree

mantle/platform/machine/qemu/machine.go

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,19 @@ import (
2626
)
2727

2828
type machine struct {
29-
qc *Cluster
30-
id string
31-
inst *platform.QemuInstance
32-
journal *platform.Journal
33-
consolePath string
34-
console string
35-
ip string
36-
tempdir string
37-
bootStartedErrorChannel chan error
29+
qc *Cluster
30+
id string
31+
inst *platform.QemuInstance
32+
journal *platform.Journal
33+
consolePath string
34+
console string
35+
ip string
3836
}
3937

4038
func (m *machine) ID() string {
4139
return m.id
4240
}
4341

44-
func (m *machine) Instance() *platform.QemuInstance {
45-
return m.inst
46-
}
47-
48-
func (m *machine) BootStartedErrorChannel() chan error {
49-
return m.bootStartedErrorChannel
50-
}
51-
5242
func (m *machine) IP() string {
5343
return m.ip
5444
}
@@ -101,15 +91,6 @@ func (m *machine) WaitForSoftReboot(timeout time.Duration, oldSoftRebootsCount s
10191
return platform.WaitForMachineSoftReboot(m, m.journal, timeout, oldSoftRebootsCount)
10292
}
10393

104-
func (m *machine) DeleteTempdir() error {
105-
var err error = nil
106-
if m.tempdir != "" {
107-
err = os.RemoveAll(m.tempdir)
108-
m.tempdir = ""
109-
}
110-
return err
111-
}
112-
11394
func (m *machine) Destroy() {
11495
if m.inst != nil {
11596
m.inst.Destroy()
@@ -132,10 +113,6 @@ func (m *machine) Destroy() {
132113
if m.qc != nil {
133114
m.qc.DelMach(m)
134115
}
135-
136-
if err := m.DeleteTempdir(); err != nil {
137-
plog.Errorf("Error removing tempdir for instance %v: %v", m.ID(), err)
138-
}
139116
}
140117

141118
func (m *machine) ConsoleOutput() string {

0 commit comments

Comments
 (0)