Documentation ¶
Index ¶
- type OutputHandler
- type PluginConfig
- type State
- func (state State) Get(key string) (value interface{})
- func (state State) GetBuilderID() string
- func (state State) GetClient() *compute.Client
- func (state State) GetFirewallRule() *compute.FirewallRule
- func (state State) GetHook() packer.Hook
- func (state State) GetLastError() error
- func (state State) GetNATRule() *compute.NATRule
- func (state State) GetNetworkDomain() *compute.NetworkDomain
- func (state State) GetOk(key string) (value interface{}, exists bool)
- func (state State) GetPackerConfig() *common.PackerConfig
- func (state State) GetRemoteOVFPackageArtifact() *artifacts.RemoteOVFPackage
- func (state State) GetServer() *compute.Server
- func (state State) GetSettings() PluginConfig
- func (state State) GetSourceArtifact() packer.Artifact
- func (state State) GetSourceImage() compute.Image
- func (state State) GetSourceImageArtifact() *artifacts.Image
- func (state State) GetTargetArtifact() packer.Artifact
- func (state State) GetTargetDatacenter() *compute.Datacenter
- func (state State) GetTargetImage() *compute.CustomerImage
- func (state State) GetTargetImageArtifact() *artifacts.Image
- func (state State) GetUI() packer.Ui
- func (state State) GetVLAN() *compute.VLAN
- func (state State) Set(key string, value interface{})
- func (state State) SetBuilderID(builderID string)
- func (state State) SetClient(client *compute.Client)
- func (state State) SetFirewallRule(firewallRule *compute.FirewallRule)
- func (state State) SetHook(hook packer.Hook)
- func (state State) SetLastError(err error)
- func (state State) SetNATRule(natRule *compute.NATRule)
- func (state State) SetNetworkDomain(networkDomain *compute.NetworkDomain)
- func (state State) SetPackerConfig(config *common.PackerConfig)
- func (state State) SetRemoteOVFPackageArtifact(packageArtifact *artifacts.RemoteOVFPackage)
- func (state State) SetServer(server *compute.Server)
- func (state State) SetSettings(config PluginConfig)
- func (state State) SetSourceArtifact(sourceArtifact packer.Artifact)
- func (state State) SetSourceImage(image compute.Image)
- func (state State) SetSourceImageArtifact(sourceArtifact *artifacts.Image)
- func (state State) SetTargetArtifact(targetArtifact packer.Artifact)
- func (state State) SetTargetDatacenter(datacenter *compute.Datacenter)
- func (state State) SetTargetImage(image *compute.CustomerImage)
- func (state State) SetTargetImageArtifact(sourceArtifact *artifacts.Image)
- func (state State) SetUI(ui packer.Ui)
- func (state State) SetVLAN(vlan *compute.VLAN)
- func (state State) ShowError(err error)
- func (state State) ShowErrorMessage(errorMessage string, formatArgs ...interface{})
- func (state State) ShowMessage(message string, formatArgs ...interface{})
- type Tool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OutputHandler ¶
type OutputHandler func(string)
OutputHandler is a function which receives lines of piped output from an external tool as they become available.
type PluginConfig ¶
type PluginConfig interface { // GetPackerConfig retrieves the common Packer configuration for the plugin. GetPackerConfig() *common.PackerConfig // GetCommunicatorConfig retrieves the Packer communicator configuration (if available) for the plugin. GetCommunicatorConfig() *communicator.Config // GetMCPUser retrieves the Cloud Control user name. GetMCPUser() string // GetMCPPassword retrieves the Cloud Control password. GetMCPPassword() string // Validate ensures that the configuration is valid. Validate() error }
PluginConfig represents the basic configuration for a plugin.
type State ¶
State is the helper for working with `multistep` state data.
func ForStateBag ¶
ForStateBag creates a new `State` helper for the specified multistep.StateBag.
func (State) GetBuilderID ¶
GetBuilderID gets the Id of the current builder plugin (if any) in the state data.
func (State) GetFirewallRule ¶
func (state State) GetFirewallRule() *compute.FirewallRule
GetFirewallRule gets the firewall rule from the state data.
func (State) GetHook ¶
GetHook gets a reference to the Packer extensibility hook from the state data.
func (State) GetLastError ¶
GetLastError retrieves the last error (if any) from the state data.
func (State) GetNATRule ¶
GetNATRule gets the NAT rule from the state data.
func (State) GetNetworkDomain ¶
func (state State) GetNetworkDomain() *compute.NetworkDomain
GetNetworkDomain gets the target network domain from the state data.
func (State) GetPackerConfig ¶
func (state State) GetPackerConfig() *common.PackerConfig
GetPackerConfig gets the Packer configuration from the state data.
func (State) GetRemoteOVFPackageArtifact ¶
func (state State) GetRemoteOVFPackageArtifact() *artifacts.RemoteOVFPackage
GetRemoteOVFPackageArtifact gets the remote OVF package artifact from the state data.
func (State) GetSettings ¶
func (state State) GetSettings() PluginConfig
GetSettings gets the plugin settings from the state data.
func (State) GetSourceArtifact ¶
GetSourceArtifact gets the source artifact from the state data.
func (State) GetSourceImage ¶
GetSourceImage gets the source image from the state data.
func (State) GetSourceImageArtifact ¶
GetSourceImageArtifact gets the source image artifact from the state data.
func (State) GetTargetArtifact ¶
GetTargetArtifact gets the target artifact from the state data.
func (State) GetTargetDatacenter ¶
func (state State) GetTargetDatacenter() *compute.Datacenter
GetTargetDatacenter gets the target datacenter from the state data.
func (State) GetTargetImage ¶
func (state State) GetTargetImage() *compute.CustomerImage
GetTargetImage gets the target image from the state data.
func (State) GetTargetImageArtifact ¶
GetTargetImageArtifact gets the target image artifact from the state data.
func (State) SetBuilderID ¶
SetBuilderID updates the Id of the current builder plugin (if any) in the state data.
func (State) SetFirewallRule ¶
func (state State) SetFirewallRule(firewallRule *compute.FirewallRule)
SetFirewallRule updates the firewall rule in the state data.
func (State) SetHook ¶
SetHook updates the reference to the Packer extensibility hook in the state data.
func (State) SetLastError ¶
SetLastError updates the last error (if any) in the state data.
func (State) SetNATRule ¶
SetNATRule updates the NAT rule in the state data.
func (State) SetNetworkDomain ¶
func (state State) SetNetworkDomain(networkDomain *compute.NetworkDomain)
SetNetworkDomain updates the target network domain in the state data.
func (State) SetPackerConfig ¶
func (state State) SetPackerConfig(config *common.PackerConfig)
SetPackerConfig updates the Packer configuration in the state data.
func (State) SetRemoteOVFPackageArtifact ¶
func (state State) SetRemoteOVFPackageArtifact(packageArtifact *artifacts.RemoteOVFPackage)
SetRemoteOVFPackageArtifact updates the remote OVF package artifact in the state data.
func (State) SetSettings ¶
func (state State) SetSettings(config PluginConfig)
SetSettings updates the plugin settings in the state data.
func (State) SetSourceArtifact ¶
SetSourceArtifact updates the source artifact in the state data.
func (State) SetSourceImage ¶
SetSourceImage updates the source image in the state data.
func (State) SetSourceImageArtifact ¶
SetSourceImageArtifact updates the source image artifact in the state data.
func (State) SetTargetArtifact ¶
SetTargetArtifact updates the target artifact in the state data.
func (State) SetTargetDatacenter ¶
func (state State) SetTargetDatacenter(datacenter *compute.Datacenter)
SetTargetDatacenter updates the target datacenter in the state data.
func (State) SetTargetImage ¶
func (state State) SetTargetImage(image *compute.CustomerImage)
SetTargetImage updates the target image in the state data.
func (State) SetTargetImageArtifact ¶
SetTargetImageArtifact updates the target image artifact in the state data.
func (State) ShowError ¶
ShowError displays the specified error via the UI, and persists it using SetLastError.
func (State) ShowErrorMessage ¶
ShowErrorMessage displays the specified error message via the UI, and persists it using SetLastError.
func (State) ShowMessage ¶
ShowMessage displays the specified message via the UI (if available, otherwise via log.Printf).
type Tool ¶
type Tool struct { // The tool name. Name string // ExecutablePath is the path of the tool executable. ExecutablePath string // WorkDir is the working directory where tool will be run. WorkDir string // contains filtered or unexported fields }
Tool represents an external tool.