packer-cn/builder/vmware/iso/artifact.go

34 lines
562 B
Go
Raw Normal View History

2013-12-24 00:58:41 -05:00
package iso
2013-06-06 18:12:54 -04:00
import (
"fmt"
)
2013-06-06 18:12:54 -04:00
// Artifact is the result of running the VMware builder, namely a set
// of files associated with the resulting machine.
type Artifact struct {
builderId string
dir OutputDir
f []string
2013-06-06 18:12:54 -04:00
}
func (a *Artifact) BuilderId() string {
return a.builderId
2013-06-06 18:12:54 -04:00
}
func (a *Artifact) Files() []string {
return a.f
}
func (*Artifact) Id() string {
return "VM"
}
func (a *Artifact) String() string {
return fmt.Sprintf("VM files in directory: %s", a.dir)
}
func (a *Artifact) Destroy() error {
return a.dir.RemoveAll()
}