packer-cn/builder/vsphere/common/artifact.go

37 lines
551 B
Go
Raw Normal View History

package common
2017-06-29 18:08:49 -04:00
import (
2017-08-23 20:06:50 -04:00
"github.com/jetbrains-infra/packer-builder-vsphere/driver"
2017-06-29 18:08:49 -04:00
)
2017-06-27 03:55:49 -04:00
const BuilderId = "jetbrains.vsphere"
type Artifact struct {
2017-07-02 16:29:50 -04:00
Name string
2017-08-23 20:06:50 -04:00
VM *driver.VirtualMachine
}
func (a *Artifact) BuilderId() string {
return BuilderId
}
func (a *Artifact) Files() []string {
return []string{}
}
func (a *Artifact) Id() string {
2017-07-02 16:29:50 -04:00
return a.Name
}
func (a *Artifact) String() string {
2017-07-02 16:29:50 -04:00
return a.Name
}
func (a *Artifact) State(name string) interface{} {
return nil
}
func (a *Artifact) Destroy() error {
2018-05-06 17:26:04 -04:00
return a.VM.Destroy()
}