41 lines
686 B
Go
Raw Permalink Normal View History

package common
2017-06-30 01:08:49 +03:00
import (
"github.com/hashicorp/packer/builder/vsphere/driver"
2017-06-30 01:08:49 +03:00
)
2017-06-27 10:55:49 +03:00
const BuilderId = "jetbrains.vsphere"
type Artifact struct {
2017-07-02 23:29:50 +03:00
Name string
2017-08-24 03:06:50 +03:00
VM *driver.VirtualMachine
// StateData should store data such as GeneratedData
// to be shared with post-processors
StateData map[string]interface{}
}
func (a *Artifact) BuilderId() string {
return BuilderId
}
func (a *Artifact) Files() []string {
return []string{}
}
func (a *Artifact) Id() string {
2017-07-02 23:29:50 +03:00
return a.Name
}
func (a *Artifact) String() string {
2017-07-02 23:29:50 +03:00
return a.Name
}
func (a *Artifact) State(name string) interface{} {
return a.StateData[name]
}
func (a *Artifact) Destroy() error {
2018-05-07 00:26:04 +03:00
return a.VM.Destroy()
}