common

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2020 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Code generated by "mapstructure-to-hcl2 -type LocationConfig"; DO NOT EDIT.

Code generated by "mapstructure-to-hcl2 -type ConfigParamsConfig"; DO NOT EDIT.

Code generated by "mapstructure-to-hcl2 -type ConnectConfig"; DO NOT EDIT.

Code generated by "mapstructure-to-hcl2 -type HardwareConfig"; DO NOT EDIT.

Code generated by "mapstructure-to-hcl2 -type RunConfig"; DO NOT EDIT.

Code generated by "mapstructure-to-hcl2 -type ShutdownConfig"; DO NOT EDIT.

Code generated by "mapstructure-to-hcl2 -type WaitIpConfig"; DO NOT EDIT.

Index

Constants

View Source
const BuilderId = "jetbrains.vsphere"

Variables

This section is empty.

Functions

func CommHost

func CommHost(host string) func(multistep.StateBag) (string, error)

Types

type Artifact

type Artifact struct {
	Name string
	VM   *driver.VirtualMachine

	// StateData should store data such as GeneratedData
	// to be shared with post-processors
	StateData map[string]interface{}
}

func (*Artifact) BuilderId

func (a *Artifact) BuilderId() string

func (*Artifact) Destroy

func (a *Artifact) Destroy() error

func (*Artifact) Files

func (a *Artifact) Files() []string

func (*Artifact) Id

func (a *Artifact) Id() string

func (*Artifact) State

func (a *Artifact) State(name string) interface{}

func (*Artifact) String

func (a *Artifact) String() string

type ConfigParamsConfig

type ConfigParamsConfig struct {
	// Custom parameters.
	ConfigParams map[string]string `mapstructure:"configuration_parameters"`
}

func (*ConfigParamsConfig) FlatMapstructure

func (*ConfigParamsConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatConfigParamsConfig. FlatConfigParamsConfig is an auto-generated flat version of ConfigParamsConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

type ConnectConfig

type ConnectConfig struct {
	// vCenter server hostname.
	VCenterServer string `mapstructure:"vcenter_server"`
	// vSphere username.
	Username string `mapstructure:"username"`
	// vSphere password.
	Password string `mapstructure:"password"`
	// Do not validate vCenter server's TLS certificate. Defaults to `false`.
	InsecureConnection bool `mapstructure:"insecure_connection"`
	// VMware datacenter name. Required if there is more than one datacenter in vCenter.
	Datacenter string `mapstructure:"datacenter"`
}

func (*ConnectConfig) FlatMapstructure

func (*ConnectConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatConnectConfig. FlatConnectConfig is an auto-generated flat version of ConnectConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

func (*ConnectConfig) Prepare

func (c *ConnectConfig) Prepare() []error

type FlatConfigParamsConfig

type FlatConfigParamsConfig struct {
	ConfigParams map[string]string `mapstructure:"configuration_parameters" cty:"configuration_parameters"`
}

FlatConfigParamsConfig is an auto-generated flat version of ConfigParamsConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatConfigParamsConfig) HCL2Spec

func (*FlatConfigParamsConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a ConfigParamsConfig. This spec is used by HCL to read the fields of ConfigParamsConfig. The decoded values from this spec will then be applied to a FlatConfigParamsConfig.

type FlatConnectConfig

type FlatConnectConfig struct {
	VCenterServer      *string `mapstructure:"vcenter_server" cty:"vcenter_server"`
	Username           *string `mapstructure:"username" cty:"username"`
	Password           *string `mapstructure:"password" cty:"password"`
	InsecureConnection *bool   `mapstructure:"insecure_connection" cty:"insecure_connection"`
	Datacenter         *string `mapstructure:"datacenter" cty:"datacenter"`
}

FlatConnectConfig is an auto-generated flat version of ConnectConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatConnectConfig) HCL2Spec

func (*FlatConnectConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a ConnectConfig. This spec is used by HCL to read the fields of ConnectConfig. The decoded values from this spec will then be applied to a FlatConnectConfig.

type FlatHardwareConfig

type FlatHardwareConfig struct {
	CPUs                *int32 `mapstructure:"CPUs" cty:"CPUs"`
	CpuCores            *int32 `mapstructure:"cpu_cores" cty:"cpu_cores"`
	CPUReservation      *int64 `mapstructure:"CPU_reservation" cty:"CPU_reservation"`
	CPULimit            *int64 `mapstructure:"CPU_limit" cty:"CPU_limit"`
	CpuHotAddEnabled    *bool  `mapstructure:"CPU_hot_plug" cty:"CPU_hot_plug"`
	RAM                 *int64 `mapstructure:"RAM" cty:"RAM"`
	RAMReservation      *int64 `mapstructure:"RAM_reservation" cty:"RAM_reservation"`
	RAMReserveAll       *bool  `mapstructure:"RAM_reserve_all" cty:"RAM_reserve_all"`
	MemoryHotAddEnabled *bool  `mapstructure:"RAM_hot_plug" cty:"RAM_hot_plug"`
	VideoRAM            *int64 `mapstructure:"video_ram" cty:"video_ram"`
	NestedHV            *bool  `mapstructure:"NestedHV" cty:"NestedHV"`
}

FlatHardwareConfig is an auto-generated flat version of HardwareConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatHardwareConfig) HCL2Spec

func (*FlatHardwareConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a HardwareConfig. This spec is used by HCL to read the fields of HardwareConfig. The decoded values from this spec will then be applied to a FlatHardwareConfig.

type FlatLocationConfig

type FlatLocationConfig struct {
	VMName       *string `mapstructure:"vm_name" cty:"vm_name"`
	Folder       *string `mapstructure:"folder" cty:"folder"`
	Cluster      *string `mapstructure:"cluster" cty:"cluster"`
	Host         *string `mapstructure:"host" cty:"host"`
	ResourcePool *string `mapstructure:"resource_pool" cty:"resource_pool"`
	Datastore    *string `mapstructure:"datastore" cty:"datastore"`
}

FlatLocationConfig is an auto-generated flat version of LocationConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatLocationConfig) HCL2Spec

func (*FlatLocationConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a LocationConfig. This spec is used by HCL to read the fields of LocationConfig. The decoded values from this spec will then be applied to a FlatLocationConfig.

type FlatRunConfig

type FlatRunConfig struct {
	BootOrder *string `mapstructure:"boot_order" cty:"boot_order"`
}

FlatRunConfig is an auto-generated flat version of RunConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatRunConfig) HCL2Spec

func (*FlatRunConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a RunConfig. This spec is used by HCL to read the fields of RunConfig. The decoded values from this spec will then be applied to a FlatRunConfig.

type FlatShutdownConfig

type FlatShutdownConfig struct {
	Command *string `mapstructure:"shutdown_command" cty:"shutdown_command"`
	Timeout *string `mapstructure:"shutdown_timeout" cty:"shutdown_timeout"`
}

FlatShutdownConfig is an auto-generated flat version of ShutdownConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatShutdownConfig) HCL2Spec

func (*FlatShutdownConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a ShutdownConfig. This spec is used by HCL to read the fields of ShutdownConfig. The decoded values from this spec will then be applied to a FlatShutdownConfig.

type FlatWaitIpConfig

type FlatWaitIpConfig struct {
	WaitTimeout   *string `mapstructure:"ip_wait_timeout" cty:"ip_wait_timeout"`
	SettleTimeout *string `mapstructure:"ip_settle_timeout" cty:"ip_settle_timeout"`
}

FlatWaitIpConfig is an auto-generated flat version of WaitIpConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatWaitIpConfig) HCL2Spec

func (*FlatWaitIpConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a WaitIpConfig. This spec is used by HCL to read the fields of WaitIpConfig. The decoded values from this spec will then be applied to a FlatWaitIpConfig.

type HardwareConfig

type HardwareConfig struct {
	// Number of CPU sockets.
	CPUs int32 `mapstructure:"CPUs"`
	// Number of CPU cores per socket.
	CpuCores int32 `mapstructure:"cpu_cores"`
	// Amount of reserved CPU resources in MHz.
	CPUReservation int64 `mapstructure:"CPU_reservation"`
	// Upper limit of available CPU resources in MHz.
	CPULimit int64 `mapstructure:"CPU_limit"`
	// Enable CPU hot plug setting for virtual machine. Defaults to `false`.
	CpuHotAddEnabled bool `mapstructure:"CPU_hot_plug"`
	// Amount of RAM in MB.
	RAM int64 `mapstructure:"RAM"`
	// Amount of reserved RAM in MB.
	RAMReservation int64 `mapstructure:"RAM_reservation"`
	// Reserve all available RAM. Defaults to `false`. Cannot be used together
	// with `RAM_reservation`.
	RAMReserveAll bool `mapstructure:"RAM_reserve_all"`
	// Enable RAM hot plug setting for virtual machine. Defaults to `false`.
	MemoryHotAddEnabled bool `mapstructure:"RAM_hot_plug"`
	// Amount of video memory in MB.
	VideoRAM int64 `mapstructure:"video_ram"`
	// Enable nested hardware virtualization for VM. Defaults to `false`.
	NestedHV bool `mapstructure:"NestedHV"`
}

func (*HardwareConfig) FlatMapstructure

func (*HardwareConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatHardwareConfig. FlatHardwareConfig is an auto-generated flat version of HardwareConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

func (*HardwareConfig) Prepare

func (c *HardwareConfig) Prepare() []error

type LocationConfig

type LocationConfig struct {
	// Name of the new VM to create.
	VMName string `mapstructure:"vm_name"`
	// VM folder to create the VM in.
	Folder string `mapstructure:"folder"`
	// ESXi cluster where target VM is created. See
	// [Working with Clusters](#working-with-clusters).
	Cluster string `mapstructure:"cluster"`
	// ESXi host where target VM is created. A full path must be specified if
	// the host is in a folder. For example `folder/host`. See the
	// `Specifying Clusters and Hosts` section above for more details.
	Host string `mapstructure:"host"`
	// VMWare resource pool. Defaults to the root resource pool of the
	// `host` or `cluster`.
	ResourcePool string `mapstructure:"resource_pool"`
	// VMWare datastore. Required if `host` is a cluster, or if `host` has
	// multiple datastores.
	Datastore string `mapstructure:"datastore"`
}

func (*LocationConfig) FlatMapstructure

func (*LocationConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatLocationConfig. FlatLocationConfig is an auto-generated flat version of LocationConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

func (*LocationConfig) Prepare

func (c *LocationConfig) Prepare() []error

type RunConfig

type RunConfig struct {
	// Priority of boot devices. Defaults to `disk,cdrom`
	BootOrder string `mapstructure:"boot_order"` // example: "floppy,cdrom,ethernet,disk"
}

func (*RunConfig) FlatMapstructure

func (*RunConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatRunConfig. FlatRunConfig is an auto-generated flat version of RunConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

type ShutdownConfig

type ShutdownConfig struct {
	// Specify a VM guest shutdown command. VMware guest tools are used by
	// default.
	Command string `mapstructure:"shutdown_command"`
	// Amount of time to wait for graceful VM shutdown. Examples 45s and 10m.
	// Defaults to 5m(5 minutes).
	Timeout time.Duration `mapstructure:"shutdown_timeout"`
}

func (*ShutdownConfig) FlatMapstructure

func (*ShutdownConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatShutdownConfig. FlatShutdownConfig is an auto-generated flat version of ShutdownConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

func (*ShutdownConfig) Prepare

func (c *ShutdownConfig) Prepare() []error

type StepConfigParams

type StepConfigParams struct {
	Config *ConfigParamsConfig
}

func (*StepConfigParams) Cleanup

func (s *StepConfigParams) Cleanup(state multistep.StateBag)

func (*StepConfigParams) Run

type StepConfigureHardware

type StepConfigureHardware struct {
	Config *HardwareConfig
}

func (*StepConfigureHardware) Cleanup

func (*StepConfigureHardware) Run

type StepConnect

type StepConnect struct {
	Config *ConnectConfig
}

func (*StepConnect) Cleanup

func (s *StepConnect) Cleanup(multistep.StateBag)

func (*StepConnect) Run

type StepConvertToTemplate

type StepConvertToTemplate struct {
	ConvertToTemplate bool
}

func (*StepConvertToTemplate) Cleanup

func (s *StepConvertToTemplate) Cleanup(state multistep.StateBag)

func (*StepConvertToTemplate) Run

type StepCreateSnapshot

type StepCreateSnapshot struct {
	CreateSnapshot bool
}

func (*StepCreateSnapshot) Cleanup

func (s *StepCreateSnapshot) Cleanup(state multistep.StateBag)

func (*StepCreateSnapshot) Run

type StepRun

type StepRun struct {
	Config   *RunConfig
	SetOrder bool
}

func (*StepRun) Cleanup

func (s *StepRun) Cleanup(state multistep.StateBag)

func (*StepRun) Run

type StepShutdown

type StepShutdown struct {
	Config *ShutdownConfig
}

func (*StepShutdown) Cleanup

func (s *StepShutdown) Cleanup(state multistep.StateBag)

func (*StepShutdown) Run

type StepWaitForIp

type StepWaitForIp struct {
	Config *WaitIpConfig
}

func (*StepWaitForIp) Cleanup

func (s *StepWaitForIp) Cleanup(state multistep.StateBag)

func (*StepWaitForIp) Run

type WaitIpConfig

type WaitIpConfig struct {
	// Amount of time to wait for VM's IP, similar to 'ssh_timeout'.
	// Defaults to 30m (30 minutes). See the Goang
	// [ParseDuration](https://golang.org/pkg/time/#ParseDuration) documentation
	// for full details.
	WaitTimeout time.Duration `mapstructure:"ip_wait_timeout"`
	// Amount of time to wait for VM's IP to settle down, sometimes VM may
	// report incorrect IP initially, then its recommended to set that
	// parameter to apx. 2 minutes. Examples 45s and 10m. Defaults to
	// 5s(5 seconds). See the Golang
	// [ParseDuration](https://golang.org/pkg/time/#ParseDuration) documentation
	//  for full details.
	SettleTimeout time.Duration `mapstructure:"ip_settle_timeout"`
}

func (*WaitIpConfig) FlatMapstructure

func (*WaitIpConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatWaitIpConfig. FlatWaitIpConfig is an auto-generated flat version of WaitIpConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

func (*WaitIpConfig) Prepare

func (c *WaitIpConfig) Prepare() []error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL