packer-cn/builder/vmware/artifact.go
Mitchell Hashimoto b787d6fb1d builder/vmware: ESX artifacts have a different builder ID
This is so that things like vagrant post-processors and vsphere
post processors don't work.
2013-11-18 16:10:55 -08:00

35 lines
570 B
Go

package vmware
import (
"fmt"
"os"
)
// 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 string
f []string
}
func (a *Artifact) BuilderId() string {
return a.builderId
}
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 os.RemoveAll(a.dir)
}