Commit 2df25986 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

post-processor/vagrant: boilerplate

parent 8bfa90a3
package main
import (
"github.com/mitchellh/packer/packer/plugin"
"github.com/mitchellh/packer/post-processor/vagrant"
)
func main() {
plugin.ServePostProcessor(new(vagrant.PostProcessor))
}
package vagrant
import (
"github.com/mitchellh/packer/packer"
)
type AWSBoxPostProcessor struct {
}
func (p *AWSBoxPostProcessor) Configure(raw interface{}) error {
return nil
}
func (p *AWSBoxPostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (packer.Artifact, error) {
return nil, nil
}
package vagrant
import (
"github.com/mitchellh/packer/packer"
"testing"
)
func TestPostProcessor_ImplementsPostProcessor(t *testing.T) {
var raw interface{}
raw = &AWSBoxPostProcessor{}
if _, ok := raw.(packer.PostProcessor); !ok {
t.Fatalf("AWS PostProcessor should be a PostProcessor")
}
}
// vagrant implements the packer.PostProcessor interface and adds a
// post-processor that turns artifacts of known builders into Vagrant
// boxes.
package vagrant
import (
"github.com/mitchellh/packer/packer"
)
var builtins = map[string]string{
"mitchellh.amazonebs": "aws",
}
type Config struct {}
type PostProcessor struct {
config Config
}
func (p *PostProcessor) Configure(raw interface{}) error {
return nil
}
func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (packer.Artifact, error) {
return nil, nil
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment