2013-12-19 16:22:46 -05:00
|
|
|
package vagrant
|
|
|
|
|
|
|
|
import (
|
2020-12-17 16:29:25 -05:00
|
|
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
2013-12-19 16:22:46 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
// Provider is the interface that each provider must implement in order
|
|
|
|
// to package the artifacts into a Vagrant-compatible box.
|
|
|
|
type Provider interface {
|
2014-02-21 23:02:40 -05:00
|
|
|
// KeepInputArtifact should return true/false whether this provider
|
|
|
|
// requires the input artifact to be kept by default.
|
|
|
|
KeepInputArtifact() bool
|
|
|
|
|
2013-12-19 16:22:46 -05:00
|
|
|
// Process is called to process an artifact into a Vagrant box. The
|
|
|
|
// artifact is given as well as the temporary directory path to
|
|
|
|
// put things.
|
|
|
|
//
|
|
|
|
// The Provider should return the contents for the Vagrantfile,
|
|
|
|
// any metadata (including the provider type in that), and an error
|
|
|
|
// if any.
|
2020-11-19 15:17:11 -05:00
|
|
|
Process(packersdk.Ui, packersdk.Artifact, string) (vagrantfile string, metadata map[string]interface{}, err error)
|
2013-12-19 16:22:46 -05:00
|
|
|
}
|