add integrate lxc builder in packer

add lxc with scripts/generate-plugins.go
This commit is contained in:
Michele Catalano 2015-12-24 23:48:40 +01:00 committed by Megan Marsh
parent 659a0da594
commit f4f0ab9f50
3 changed files with 20 additions and 2 deletions

View File

@ -26,6 +26,8 @@ import (
filebuilder "github.com/hashicorp/packer/builder/file"
googlecomputebuilder "github.com/hashicorp/packer/builder/googlecompute"
hypervisobuilder "github.com/hashicorp/packer/builder/hyperv/iso"
lxcbuilder "github.com/hashicorp/packer/builder/lxc"
lxdbuilder "github.com/hashicorp/packer/builder/lxd"
nullbuilder "github.com/hashicorp/packer/builder/null"
oneandonebuilder "github.com/hashicorp/packer/builder/oneandone"
openstackbuilder "github.com/hashicorp/packer/builder/openstack"
@ -69,8 +71,6 @@ import (
shelllocalprovisioner "github.com/hashicorp/packer/provisioner/shell-local"
windowsrestartprovisioner "github.com/hashicorp/packer/provisioner/windows-restart"
windowsshellprovisioner "github.com/hashicorp/packer/provisioner/windows-shell"
lxdbuilder "github.com/hashicorp/packer/builder/lxd"
)
type PluginCommand struct {
@ -78,6 +78,7 @@ type PluginCommand struct {
}
var Builders = map[string]packer.Builder{
<<<<<<< HEAD
"alicloud-ecs": new(alicloudecsbuilder.Builder),
"amazon-chroot": new(amazonchrootbuilder.Builder),
"amazon-ebs": new(amazonebsbuilder.Builder),
@ -91,6 +92,7 @@ var Builders = map[string]packer.Builder{
"file": new(filebuilder.Builder),
"googlecompute": new(googlecomputebuilder.Builder),
"hyperv-iso": new(hypervisobuilder.Builder),
"lxc": new(lxcbuilder.Builder),
"lxd": new(lxdbuilder.Builder),
"null": new(nullbuilder.Builder),
"oneandone": new(oneandonebuilder.Builder),

View File

@ -0,0 +1,15 @@
package main
import (
"github.com/mitchellh/packer/builder/lxc"
"github.com/mitchellh/packer/packer/plugin"
)
func main() {
server, err := plugin.Server()
if err != nil {
panic(err)
}
server.RegisterBuilder(new(lxc.Builder))
server.Serve()
}

View File

@ -0,0 +1 @@
package main