fix

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MPL-2.0 Imports: 5 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FixerOrder []string

FixerOrder is the default order the fixers should be run.

View Source
var Fixers map[string]Fixer

Fixers is the map of all available fixers, by name.

Functions

This section is empty.

Types

type Fixer

type Fixer interface {
	// DeprecatedOptions returns the name(s) of the option(s) being replaced in
	// this fixer. It is used to generate a list of deprecated options that the
	// template parser checks against to warn users that they need to call
	// `packer fix` against their templates after upgrading.
	DeprecatedOptions() map[string][]string

	// Fix takes a raw map structure input, potentially transforms it
	// in some way, and returns the new, transformed structure. The
	// Fix method is allowed to mutate the input.
	Fix(input map[string]interface{}) (map[string]interface{}, error)

	// Synopsis returns a string description of what the fixer actually
	// does.
	Synopsis() string
}

A Fixer is something that can perform a fix operation on a template.

type FixerAmazonEnhancedNetworking added in v1.1.0

type FixerAmazonEnhancedNetworking struct{}

FixerAmazonEnhancedNetworking is a Fixer that replaces the "enhanced_networking" configuration key with the clearer "ena_support". This disambiguates ena_support from sriov_support.

func (FixerAmazonEnhancedNetworking) DeprecatedOptions added in v1.6.0

func (FixerAmazonEnhancedNetworking) DeprecatedOptions() map[string][]string

func (FixerAmazonEnhancedNetworking) Fix added in v1.1.0

func (FixerAmazonEnhancedNetworking) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerAmazonEnhancedNetworking) Synopsis added in v1.1.0

type FixerAmazonPrivateIP added in v1.2.0

type FixerAmazonPrivateIP struct{}

FixerAmazonPrivateIP is a Fixer that replaces instances of `"private_ip": true` with `"ssh_interface": "private_ip"`

func (FixerAmazonPrivateIP) DeprecatedOptions added in v1.6.0

func (FixerAmazonPrivateIP) DeprecatedOptions() map[string][]string

func (FixerAmazonPrivateIP) Fix added in v1.2.0

func (FixerAmazonPrivateIP) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerAmazonPrivateIP) Synopsis added in v1.2.0

func (FixerAmazonPrivateIP) Synopsis() string

type FixerAmazonShutdownBehavior added in v0.12.1

type FixerAmazonShutdownBehavior struct{}

FixerAmazonShutdownBehavior fix the spelling of "shutdown_behavior" template in a Amazon builder

func (FixerAmazonShutdownBehavior) DeprecatedOptions added in v1.6.0

func (FixerAmazonShutdownBehavior) DeprecatedOptions() map[string][]string

func (FixerAmazonShutdownBehavior) Fix added in v0.12.1

func (FixerAmazonShutdownBehavior) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerAmazonShutdownBehavior) Synopsis added in v0.12.1

type FixerAmazonSpotPriceProductDeprecation added in v1.4.3

type FixerAmazonSpotPriceProductDeprecation struct{}

FixerAmazonSpotPriceProductDeprecation removes the deprecated "spot_price_auto_product" setting from Amazon builder templates

func (FixerAmazonSpotPriceProductDeprecation) DeprecatedOptions added in v1.6.0

func (FixerAmazonSpotPriceProductDeprecation) DeprecatedOptions() map[string][]string

func (FixerAmazonSpotPriceProductDeprecation) Fix added in v1.4.3

func (FixerAmazonSpotPriceProductDeprecation) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerAmazonSpotPriceProductDeprecation) Synopsis added in v1.4.3

type FixerAmazonTemporarySecurityCIDRs added in v1.4.0

type FixerAmazonTemporarySecurityCIDRs struct{}

func (FixerAmazonTemporarySecurityCIDRs) DeprecatedOptions added in v1.6.0

func (FixerAmazonTemporarySecurityCIDRs) DeprecatedOptions() map[string][]string

func (FixerAmazonTemporarySecurityCIDRs) Fix added in v1.4.0

func (FixerAmazonTemporarySecurityCIDRs) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerAmazonTemporarySecurityCIDRs) Synopsis added in v1.4.0

type FixerAzureExcludeFromLatest added in v1.6.5

type FixerAzureExcludeFromLatest struct{}

FixerAzureExcludeFromLatest fix the spelling of "exclude_from_latest" template in an Azure builder

func (FixerAzureExcludeFromLatest) DeprecatedOptions added in v1.6.5

func (FixerAzureExcludeFromLatest) DeprecatedOptions() map[string][]string

func (FixerAzureExcludeFromLatest) Fix added in v1.6.5

func (FixerAzureExcludeFromLatest) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerAzureExcludeFromLatest) Synopsis added in v1.6.5

type FixerCleanImageName added in v1.4.0

type FixerCleanImageName struct{}

FixerCleanImageName is a Fixer that replaces the "clean_(image|ami)_name" template calls with "clean_resource_name"

func (FixerCleanImageName) DeprecatedOptions added in v1.6.0

func (FixerCleanImageName) DeprecatedOptions() map[string][]string

func (FixerCleanImageName) Fix added in v1.4.0

func (FixerCleanImageName) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerCleanImageName) Synopsis added in v1.4.0

func (FixerCleanImageName) Synopsis() string

type FixerCommConfig added in v1.5.2

type FixerCommConfig struct{}

FixerCommConfig removes ssh prefix from communicator port forwarding config for variables host_port_min, host_port_max, skip_nat_mapping

func (FixerCommConfig) DeprecatedOptions added in v1.6.0

func (FixerCommConfig) DeprecatedOptions() map[string][]string

func (FixerCommConfig) Fix added in v1.5.2

func (FixerCommConfig) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerCommConfig) Synopsis added in v1.5.2

func (FixerCommConfig) Synopsis() string

type FixerCreateTime

type FixerCreateTime struct{}

FixerCreateTime is a Fixer that replaces the ".CreateTime" template calls with "{{timestamp}"

func (FixerCreateTime) DeprecatedOptions added in v1.6.0

func (FixerCreateTime) DeprecatedOptions() map[string][]string

func (FixerCreateTime) Fix

func (FixerCreateTime) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerCreateTime) Synopsis

func (FixerCreateTime) Synopsis() string

type FixerDockerEmail added in v1.1.2

type FixerDockerEmail struct{}

func (FixerDockerEmail) DeprecatedOptions added in v1.6.0

func (FixerDockerEmail) DeprecatedOptions() map[string][]string

func (FixerDockerEmail) Fix added in v1.1.2

func (FixerDockerEmail) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerDockerEmail) Synopsis added in v1.1.2

func (FixerDockerEmail) Synopsis() string

type FixerDockerTagtoTags added in v1.6.0

type FixerDockerTagtoTags struct{}

FixerDockerTagtoTags renames tag to tags

func (FixerDockerTagtoTags) DeprecatedOptions added in v1.6.0

func (FixerDockerTagtoTags) DeprecatedOptions() map[string][]string

func (FixerDockerTagtoTags) Fix added in v1.6.0

func (FixerDockerTagtoTags) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerDockerTagtoTags) Synopsis added in v1.6.0

func (FixerDockerTagtoTags) Synopsis() string

type FixerGalaxyCommand added in v1.5.0

type FixerGalaxyCommand struct{}

FixerGalaxyCommand removes the escape character from user environment variables and replace galaxycommand with galaxy_command

func (FixerGalaxyCommand) DeprecatedOptions added in v1.6.0

func (FixerGalaxyCommand) DeprecatedOptions() map[string][]string

func (FixerGalaxyCommand) Fix added in v1.5.0

func (FixerGalaxyCommand) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerGalaxyCommand) Synopsis added in v1.5.0

func (FixerGalaxyCommand) Synopsis() string

type FixerHypervDeprecations added in v1.3.0

type FixerHypervDeprecations struct{}

FixerHypervDeprecations removes the deprecated "vhd_temp_path" setting from Hyper-V ISO builder templates

func (FixerHypervDeprecations) DeprecatedOptions added in v1.6.0

func (FixerHypervDeprecations) DeprecatedOptions() map[string][]string

func (FixerHypervDeprecations) Fix added in v1.3.0

func (FixerHypervDeprecations) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerHypervDeprecations) Synopsis added in v1.3.0

func (FixerHypervDeprecations) Synopsis() string

type FixerHypervVmxcTypo added in v1.3.0

type FixerHypervVmxcTypo struct{}

FixerHypervVmxcTypo fixes the typo in "clone_from_vmxc_path" replacing it with "clone_from_vmcx_path" in Hyper-V VMCX builder templates

func (FixerHypervVmxcTypo) DeprecatedOptions added in v1.6.0

func (FixerHypervVmxcTypo) DeprecatedOptions() map[string][]string

func (FixerHypervVmxcTypo) Fix added in v1.3.0

func (FixerHypervVmxcTypo) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerHypervVmxcTypo) Synopsis added in v1.3.0

func (FixerHypervVmxcTypo) Synopsis() string

type FixerISOChecksumTypeAndURL added in v1.6.0

type FixerISOChecksumTypeAndURL struct{}

FixerISOChecksumTypeAndURL is a Fixer that remove the "iso_checksum_url" and "iso_checksum_type" to put everything in the checksum field.

func (FixerISOChecksumTypeAndURL) DeprecatedOptions added in v1.6.0

func (FixerISOChecksumTypeAndURL) DeprecatedOptions() map[string][]string

func (FixerISOChecksumTypeAndURL) Fix added in v1.6.0

func (FixerISOChecksumTypeAndURL) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerISOChecksumTypeAndURL) Synopsis added in v1.6.0

type FixerISOMD5

type FixerISOMD5 struct{}

FixerISOMD5 is a Fixer that replaces the "iso_md5" configuration key with the newer "iso_checksum" and "iso_checksum_type" within builders.

func (FixerISOMD5) DeprecatedOptions added in v1.6.0

func (FixerISOMD5) DeprecatedOptions() map[string][]string

func (FixerISOMD5) Fix

func (FixerISOMD5) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerISOMD5) Synopsis

func (FixerISOMD5) Synopsis() string

type FixerManifestFilename added in v0.12.1

type FixerManifestFilename struct{}

FixerManifestFilename renames any Filename to Output

func (FixerManifestFilename) DeprecatedOptions added in v1.6.0

func (FixerManifestFilename) DeprecatedOptions() map[string][]string

func (FixerManifestFilename) Fix added in v0.12.1

func (FixerManifestFilename) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerManifestFilename) Synopsis added in v0.12.1

func (FixerManifestFilename) Synopsis() string

type FixerParallelsDeprecations added in v0.9.0

type FixerParallelsDeprecations struct{}

FixerParallelsDeprecations removes "parallels_tools_host_path" from a template in a Parallels builder and changes "guest_os_distribution" to "guest_os_type", possibly overwriting any existing "guest_os_type"

func (FixerParallelsDeprecations) DeprecatedOptions added in v1.6.0

func (FixerParallelsDeprecations) DeprecatedOptions() map[string][]string

func (FixerParallelsDeprecations) Fix added in v0.9.0

func (FixerParallelsDeprecations) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerParallelsDeprecations) Synopsis added in v0.9.0

type FixerParallelsHeadless added in v0.9.0

type FixerParallelsHeadless struct{}

FixerParallelsHeadless removes "headless" from a template in a Parallels builder

func (FixerParallelsHeadless) DeprecatedOptions added in v1.6.0

func (FixerParallelsHeadless) DeprecatedOptions() map[string][]string

func (FixerParallelsHeadless) Fix added in v0.9.0

func (FixerParallelsHeadless) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerParallelsHeadless) Synopsis added in v0.9.0

func (FixerParallelsHeadless) Synopsis() string

type FixerPowerShellEscapes added in v1.2.0

type FixerPowerShellEscapes struct{}

FixerPowerShellEscapes removes the PowerShell escape character from user environment variables and elevated username and password strings

func (FixerPowerShellEscapes) DeprecatedOptions added in v1.6.0

func (FixerPowerShellEscapes) DeprecatedOptions() map[string][]string

func (FixerPowerShellEscapes) Fix added in v1.2.0

func (FixerPowerShellEscapes) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerPowerShellEscapes) Synopsis added in v1.2.0

func (FixerPowerShellEscapes) Synopsis() string

type FixerProxmoxType added in v1.6.5

type FixerProxmoxType struct{}

FixerProxmoxType updates proxmox builder types to proxmox-iso

func (FixerProxmoxType) DeprecatedOptions added in v1.6.5

func (FixerProxmoxType) DeprecatedOptions() map[string][]string

func (FixerProxmoxType) Fix added in v1.6.5

func (FixerProxmoxType) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerProxmoxType) Synopsis added in v1.6.5

func (FixerProxmoxType) Synopsis() string

type FixerQEMUDiskSize added in v1.5.0

type FixerQEMUDiskSize struct{}

FixerQEMUDiskSize updates disk_size from a string to int for QEMU builders

func (FixerQEMUDiskSize) DeprecatedOptions added in v1.6.0

func (FixerQEMUDiskSize) DeprecatedOptions() map[string][]string

func (FixerQEMUDiskSize) Fix added in v1.5.0

func (FixerQEMUDiskSize) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerQEMUDiskSize) Synopsis added in v1.5.0

func (FixerQEMUDiskSize) Synopsis() string

type FixerQEMUHostPort added in v1.6.0

type FixerQEMUHostPort struct{}

FixerQEMUHostPort updates ssh_host_port_min and ssh_host_port_max to host_port_min and host_port_max for QEMU builders

func (FixerQEMUHostPort) DeprecatedOptions added in v1.6.0

func (FixerQEMUHostPort) DeprecatedOptions() map[string][]string

func (FixerQEMUHostPort) Fix added in v1.6.0

func (FixerQEMUHostPort) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerQEMUHostPort) Synopsis added in v1.6.0

func (FixerQEMUHostPort) Synopsis() string

type FixerSSHDisableAgent added in v1.1.0

type FixerSSHDisableAgent struct{}

FixerSSHDisableAgent changes the "ssh_disable_agent" of a template to "ssh_disable_agent_forwarding".

func (FixerSSHDisableAgent) DeprecatedOptions added in v1.6.0

func (FixerSSHDisableAgent) DeprecatedOptions() map[string][]string

func (FixerSSHDisableAgent) Fix added in v1.1.0

func (FixerSSHDisableAgent) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerSSHDisableAgent) Synopsis added in v1.1.0

func (FixerSSHDisableAgent) Synopsis() string

type FixerSSHKeyPath added in v0.9.0

type FixerSSHKeyPath struct{}

FixerSSHKeyPath changes the "ssh_key_path" of a template to "ssh_private_key_file".

func (FixerSSHKeyPath) DeprecatedOptions added in v1.6.0

func (FixerSSHKeyPath) DeprecatedOptions() map[string][]string

func (FixerSSHKeyPath) Fix added in v0.9.0

func (FixerSSHKeyPath) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerSSHKeyPath) Synopsis added in v0.9.0

func (FixerSSHKeyPath) Synopsis() string

type FixerSSHTimout added in v1.5.2

type FixerSSHTimout struct{}

FixerSSHTimout replaces ssh_wait_timeout with ssh_timeout

func (FixerSSHTimout) DeprecatedOptions added in v1.6.0

func (FixerSSHTimout) DeprecatedOptions() map[string][]string

func (FixerSSHTimout) Fix added in v1.5.2

func (FixerSSHTimout) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerSSHTimout) Synopsis added in v1.5.2

func (FixerSSHTimout) Synopsis() string

type FixerScalewayAccessKey added in v1.4.0

type FixerScalewayAccessKey struct{}

FixerScalewayAccessKey changes the "access_key" of a template to "organization_id".

func (FixerScalewayAccessKey) DeprecatedOptions added in v1.6.0

func (FixerScalewayAccessKey) DeprecatedOptions() map[string][]string

func (FixerScalewayAccessKey) Fix added in v1.4.0

func (FixerScalewayAccessKey) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerScalewayAccessKey) Synopsis added in v1.4.0

func (FixerScalewayAccessKey) Synopsis() string

type FixerVMwareCompaction added in v1.3.0

type FixerVMwareCompaction struct{}

FixerVMwareCompaction adds "skip_compaction = true" to "vmware-iso" builders with incompatible disk_type_id

func (FixerVMwareCompaction) DeprecatedOptions added in v1.6.0

func (FixerVMwareCompaction) DeprecatedOptions() map[string][]string

func (FixerVMwareCompaction) Fix added in v1.3.0

func (FixerVMwareCompaction) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerVMwareCompaction) Synopsis added in v1.3.0

func (FixerVMwareCompaction) Synopsis() string

type FixerVMwareRename

type FixerVMwareRename struct{}

FixerVMwareRename changes "vmware" builders to "vmware-iso"

func (FixerVMwareRename) DeprecatedOptions added in v1.6.0

func (FixerVMwareRename) DeprecatedOptions() map[string][]string

func (FixerVMwareRename) Fix

func (FixerVMwareRename) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerVMwareRename) Synopsis

func (FixerVMwareRename) Synopsis() string

type FixerVSphereNetworkDisk added in v1.6.0

type FixerVSphereNetworkDisk struct{}

FixerVSphereNetworkDisk changes vsphere-iso network and networkCard fields into a network adapter and changes the disk_size, disk_thin_provisioned, and disk_eagerly_scrub into a storage adapter

func (FixerVSphereNetworkDisk) DeprecatedOptions added in v1.6.0

func (FixerVSphereNetworkDisk) DeprecatedOptions() map[string][]string

func (FixerVSphereNetworkDisk) Fix added in v1.6.0

func (FixerVSphereNetworkDisk) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerVSphereNetworkDisk) Synopsis added in v1.6.0

func (FixerVSphereNetworkDisk) Synopsis() string

type FixerVagrantPPOverride

type FixerVagrantPPOverride struct{}

FixerVagrantPPOverride is a Fixer that replaces the provider-specific overrides for the Vagrant post-processor with the new style introduced as part of Packer 0.5.0.

func (FixerVagrantPPOverride) DeprecatedOptions added in v1.6.0

func (FixerVagrantPPOverride) DeprecatedOptions() map[string][]string

func (FixerVagrantPPOverride) Fix

func (FixerVagrantPPOverride) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerVagrantPPOverride) Synopsis

func (FixerVagrantPPOverride) Synopsis() string

type FixerVirtualBoxGAAttach

type FixerVirtualBoxGAAttach struct{}

FixerVirtualBoxGAAttach changes the "guest_additions_attach" of a template to "guest_additions_mode".

func (FixerVirtualBoxGAAttach) DeprecatedOptions added in v1.6.0

func (FixerVirtualBoxGAAttach) DeprecatedOptions() map[string][]string

func (FixerVirtualBoxGAAttach) Fix

func (FixerVirtualBoxGAAttach) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerVirtualBoxGAAttach) Synopsis

func (FixerVirtualBoxGAAttach) Synopsis() string

type FixerVirtualBoxRename

type FixerVirtualBoxRename struct{}

FixerVirtualBoxRename changes "virtualbox" builders to "virtualbox-iso"

func (FixerVirtualBoxRename) DeprecatedOptions added in v1.6.0

func (FixerVirtualBoxRename) DeprecatedOptions() map[string][]string

func (FixerVirtualBoxRename) Fix

func (FixerVirtualBoxRename) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FixerVirtualBoxRename) Synopsis

func (FixerVirtualBoxRename) Synopsis() string

type FizerHypervCPUandRAM added in v1.4.0

type FizerHypervCPUandRAM struct{}

FizerHypervCPUandRAM changes `cpu` to `cpus` and `ram_size` to `memory`

func (FizerHypervCPUandRAM) DeprecatedOptions added in v1.6.0

func (FizerHypervCPUandRAM) DeprecatedOptions() map[string][]string

func (FizerHypervCPUandRAM) Fix added in v1.4.0

func (FizerHypervCPUandRAM) Fix(input map[string]interface{}) (map[string]interface{}, error)

func (FizerHypervCPUandRAM) Synopsis added in v1.4.0

func (FizerHypervCPUandRAM) Synopsis() string

type PP added in v1.3.0

type PP struct {
	PostProcessors []interface{} `mapstructure:"post-processors"`
}

PP is a convenient way to interact with the post-processors within a fixer

Jump to

Keyboard shortcuts

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