-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathmain.go
More file actions
49 lines (45 loc) · 2.26 KB
/
Copy pathmain.go
File metadata and controls
49 lines (45 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// © Broadcom. All Rights Reserved.
// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
// SPDX-License-Identifier: MPL-2.0
package main
import (
"log"
"github.com/hashicorp/packer-plugin-sdk/plugin"
"github.com/vmware/packer-plugin-vsphere/builder/vsphere/clone"
"github.com/vmware/packer-plugin-vsphere/builder/vsphere/iso"
"github.com/vmware/packer-plugin-vsphere/builder/vsphere/supervisor"
"github.com/vmware/packer-plugin-vsphere/datasource/computecluster"
"github.com/vmware/packer-plugin-vsphere/datasource/contentlibrary"
"github.com/vmware/packer-plugin-vsphere/datasource/contentlibraryitem"
"github.com/vmware/packer-plugin-vsphere/datasource/datastore"
"github.com/vmware/packer-plugin-vsphere/datasource/datastorecluster"
"github.com/vmware/packer-plugin-vsphere/datasource/host"
"github.com/vmware/packer-plugin-vsphere/datasource/network"
"github.com/vmware/packer-plugin-vsphere/datasource/resourcepool"
"github.com/vmware/packer-plugin-vsphere/datasource/virtualmachine"
"github.com/vmware/packer-plugin-vsphere/post-processor/vsphere"
vsphereTemplate "github.com/vmware/packer-plugin-vsphere/post-processor/vsphere-template"
"github.com/vmware/packer-plugin-vsphere/version"
)
func main() {
pps := plugin.NewSet()
pps.RegisterBuilder("iso", new(iso.Builder))
pps.RegisterBuilder("clone", new(clone.Builder))
pps.RegisterBuilder("supervisor", new(supervisor.Builder))
pps.RegisterDatasource("compute-cluster", new(computecluster.Datasource))
pps.RegisterDatasource("content-library", new(contentlibrary.Datasource))
pps.RegisterDatasource("content-library-item", new(contentlibraryitem.Datasource))
pps.RegisterDatasource("datastore", new(datastore.Datasource))
pps.RegisterDatasource("datastore-cluster", new(datastorecluster.Datasource))
pps.RegisterDatasource("host", new(host.Datasource))
pps.RegisterDatasource("network", new(network.Datasource))
pps.RegisterDatasource("resource-pool", new(resourcepool.Datasource))
pps.RegisterDatasource("virtualmachine", new(virtualmachine.Datasource))
pps.RegisterPostProcessor(plugin.DEFAULT_NAME, new(vsphere.PostProcessor))
pps.RegisterPostProcessor("template", new(vsphereTemplate.PostProcessor))
pps.SetVersion(version.PluginVersion)
err := pps.Run()
if err != nil {
log.Fatal(err)
}
}