mirror of https://github.com/hashicorp/packer
consolidate artifacts entirely remove local artifact object and get artifacts in the vmx builder the same way we do in the vmware iso builderpull/6927/head
parent
2ae235a28a
commit
fa12113eaf
@ -1,39 +0,0 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// Artifact is the result of running the VMware builder, namely a set
|
||||
// of files associated with the resulting machine.
|
||||
type RemoteArtifact struct {
|
||||
builderId string
|
||||
id string
|
||||
dir OutputDir
|
||||
f []string
|
||||
config map[string]string
|
||||
}
|
||||
|
||||
func (a *RemoteArtifact) BuilderId() string {
|
||||
return a.builderId
|
||||
}
|
||||
|
||||
func (a *RemoteArtifact) Files() []string {
|
||||
return a.f
|
||||
}
|
||||
|
||||
func (a *RemoteArtifact) Id() string {
|
||||
return a.id
|
||||
}
|
||||
|
||||
func (a *RemoteArtifact) String() string {
|
||||
return fmt.Sprintf("VM files in directory: %s", a.dir)
|
||||
}
|
||||
|
||||
func (a *RemoteArtifact) State(name string) interface{} {
|
||||
return a.config[name]
|
||||
}
|
||||
|
||||
func (a *RemoteArtifact) Destroy() error {
|
||||
return a.dir.RemoveAll()
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/packer/packer"
|
||||
)
|
||||
|
||||
func TestArtifact_Impl(t *testing.T) {
|
||||
var raw interface{}
|
||||
raw = &RemoteArtifact{}
|
||||
if _, ok := raw.(packer.Artifact); !ok {
|
||||
t.Fatal("Artifact must be a proper artifact")
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue