packer-cn/builder/lxc/artifact.go

36 lines
479 B
Go
Raw Normal View History

2015-12-22 09:56:33 -05:00
package lxc
import (
"fmt"
"os"
)
type Artifact struct {
dir string
f []string
}
func (*Artifact) BuilderId() string {
return 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) State(name string) interface{} {
2016-05-25 15:34:51 -04:00
return nil
2015-12-22 09:56:33 -05:00
}
func (a *Artifact) Destroy() error {
return os.RemoveAll(a.dir)
}