nutanix

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NutanixIdentifierBootTypeLegacy is a resource identifier identifying the legacy boot type for virtual machines.
	NutanixIdentifierBootTypeLegacy string = "legacy"

	// NutanixIdentifierBootTypeUEFI is a resource identifier identifying the UEFI boot type for virtual machines.
	NutanixIdentifierBootTypeUEFI string = "uefi"

	// NutanixIdentifierBootTypeSecureBoot is a resource identifier identifying the secure boot type for virtual machines.
	NutanixIdentifierBootTypeSecureBoot string = "secure_boot"

	// NutanixIdentifierBootPriorityDisk is a resource identifier identifying the boot priority as disk for virtual machines.
	NutanixIdentifierBootPriorityDisk string = "disk"

	// NutanixIdentifierBootPriorityCDROM is a resource identifier identifying the boot priority as cdrom for virtual machines.
	NutanixIdentifierBootPriorityCDROM string = "cdrom"

	// NutanixIdentifierChecksunTypeSHA256 is a resource identifier identifying the SHA-256 checksum type for virtual machines.
	NutanixIdentifierChecksunTypeSHA256 string = "sha256"

	// NutanixIdentifierChecksunTypeSHA1 is a resource identifier identifying the SHA-1 checksum type for virtual machines.
	NutanixIdentifierChecksunTypeSHA1 string = "sha1"
)
View Source
const BuilderId = "packer.nutanix"

Variables

This section is empty.

Functions

func BoolMap

func BoolMap(src map[string]bool) map[string]*bool

BoolMap converts a string map of bool values into a string map of bool pointers

func BoolPtr

func BoolPtr(v bool) *bool

BoolPtr returns a pointer to the bool value passed in.

func BoolSlice

func BoolSlice(src []bool) []*bool

BoolSlice converts a slice of bool values into a slice of bool pointers

func BoolValue

func BoolValue(v *bool) bool

BoolValue returns the value of the bool pointer passed in or false if the pointer is nil.

func BoolValueMap

func BoolValueMap(src map[string]*bool) map[string]bool

BoolValueMap converts a string map of bool pointers into a string map of bool values

func BoolValueSlice

func BoolValueSlice(src []*bool) []bool

BoolValueSlice converts a slice of bool pointers into a slice of bool values

func BuildReference

func BuildReference(uuid, kind string) *v3.Reference

BuildReference create reference from defined object

func BuildReferenceValue added in v0.1.1

func BuildReferenceValue(uuid, kind string) *v3.ReferenceValues

BuildReferenceValue create referencevalue from defined object

func Float64Map

func Float64Map(src map[string]float64) map[string]*float64

Float64Map converts a string map of float64 values into a string map of float64 pointers

func Float64Ptr

func Float64Ptr(v float64) *float64

Float64Ptr returns a pointer to the float64 value passed in.

func Float64Slice

func Float64Slice(src []float64) []*float64

Float64Slice converts a slice of float64 values into a slice of float64 pointers

func Float64Value

func Float64Value(v *float64) float64

Float64Value returns the value of the float64 pointer passed in or 0 if the pointer is nil.

func Float64ValueMap

func Float64ValueMap(src map[string]*float64) map[string]float64

Float64ValueMap converts a string map of float64 pointers into a string map of float64 values

func Float64ValueSlice

func Float64ValueSlice(src []*float64) []float64

Float64ValueSlice converts a slice of float64 pointers into a slice of float64 values

func GetLatestOVAByName added in v1.0.0

func GetLatestOVAByName(ctx context.Context, entityType string, name string, conn *v3.Client) string

func Int64Map

func Int64Map(src map[string]int64) map[string]*int64

Int64Map converts a string map of int64 values into a string map of int64 pointers

func Int64Ptr

func Int64Ptr(v int64) *int64

Int64Ptr returns a pointer to the int64 value passed in.

func Int64Slice

func Int64Slice(src []int64) []*int64

Int64Slice converts a slice of int64 values into a slice of int64 pointers

func Int64Value

func Int64Value(v *int64) int64

Int64Value returns the value of the int64 pointer passed in or 0 if the pointer is nil.

func Int64ValueMap

func Int64ValueMap(src map[string]*int64) map[string]int64

Int64ValueMap converts a string map of int64 pointers into a string map of int64 values

func Int64ValueSlice

func Int64ValueSlice(src []*int64) []int64

Int64ValueSlice converts a slice of int64 pointers into a slice of int64 values

func IntMap

func IntMap(src map[string]int) map[string]*int

IntMap converts a string map of int values into a string map of int pointers

func IntPtr

func IntPtr(v int) *int

IntPtr returns a pointer to the int value passed in.

func IntSlice

func IntSlice(src []int) []*int

IntSlice converts a slice of int values into a slice of int pointers

func IntValue

func IntValue(v *int) int

IntValue returns the value of the int pointer passed in or 0 if the pointer is nil.

func IntValueMap

func IntValueMap(src map[string]*int) map[string]int

IntValueMap converts a string map of int pointers into a string map of int values

func IntValueSlice

func IntValueSlice(src []*int) []int

IntValueSlice converts a slice of int pointers into a slice of int values

func IsPrismCentral added in v1.0.0

func IsPrismCentral(cluster *v3.ClusterIntentResponse) bool

IsPrismCentral checks if the cluster is a prism central instance or not by checking if the service running on the cluster is PRISM_CENTRAL

func MillisecondsTimeValue

func MillisecondsTimeValue(v *int64) time.Time

MillisecondsTimeValue converts an int64 pointer to a time.Time value representing milliseconds sinch Epoch or time.Time{} if the pointer is nil.

func SecondsTimeValue

func SecondsTimeValue(v *int64) time.Time

SecondsTimeValue converts an int64 pointer to a time.Time value representing seconds since Epoch or time.Time{} if the pointer is nil.

func StringMap

func StringMap(src map[string]string) map[string]*string

StringMap converts a string map of string values into a string map of string pointers

func StringPtr

func StringPtr(v string) *string

StringPtr returns a pointer to the string value passed in.

func StringSlice

func StringSlice(src []string) []*string

StringSlice converts a slice of string values into a slice of string pointers

func StringValue

func StringValue(v *string) string

StringValue returns the value of the string pointer passed in or "" if the pointer is nil.

func StringValueMap

func StringValueMap(src map[string]*string) map[string]string

StringValueMap converts a string map of string pointers into a string map of string values

func StringValueSlice

func StringValueSlice(src []*string) []string

StringValueSlice converts a slice of string pointers into a slice of string values

func Time

func Time(v time.Time) *time.Time

Time returns a pointer to the time.Time value passed in.

func TimeMap

func TimeMap(src map[string]time.Time) map[string]*time.Time

TimeMap converts a string map of time.Time values into a string map of time.Time pointers

func TimeSlice

func TimeSlice(src []time.Time) []*time.Time

TimeSlice converts a slice of time.Time values into a slice of time.Time pointers

func TimeUnixMilli

func TimeUnixMilli(t time.Time) int64

TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC". The result is undefined if the Unix time cannot be represented by an int64. Which includes calling TimeUnixMilli on a zero Time is undefined.

This utility is useful for service API's such as CloudWatch Logs which require their unix time values to be in milliseconds.

See Go stdlib https://golang.org/pkg/time/#Time.UnixNano for more information.

func TimeValue

func TimeValue(v *time.Time) time.Time

TimeValue returns the value of the time.Time pointer passed in or time.Time{} if the pointer is nil.

func TimeValueMap

func TimeValueMap(src map[string]*time.Time) map[string]time.Time

TimeValueMap converts a string map of time.Time pointers into a string map of time.Time values

func TimeValueSlice

func TimeValueSlice(src []*time.Time) []time.Time

TimeValueSlice converts a slice of time.Time pointers into a slice of time.Time values

Types

type Artifact

type Artifact struct {
	Name string
	UUID string
}

Artifact contains the unique keys for the nutanix artifact produced from Packer

func (*Artifact) BuilderId

func (a *Artifact) BuilderId() string

BuilderId will return the unique builder id

func (*Artifact) Destroy

func (a *Artifact) Destroy() error

Destroy returns nothing important right now

func (*Artifact) Files

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

Files will return the files from the builder

func (*Artifact) Id

func (a *Artifact) Id() string

Id returns the UUID for the saved image

func (*Artifact) State

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

State returns nothing important right now

func (*Artifact) String

func (a *Artifact) String() string

String returns a String name of the artifact

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder - struct for building nutanix-builder

func (*Builder) ConfigSpec

func (b *Builder) ConfigSpec() hcldec.ObjectSpec

func (*Builder) Prepare

func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error)

func (*Builder) Run

Run the nutanix builder

type Category added in v0.6.0

type Category struct {
	Key   string `mapstructure:"key" json:"key" required:"false"`
	Value string `mapstructure:"value" json:"value" required:"false"`
}

func (*Category) FlatMapstructure added in v0.6.0

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

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

type ClusterConfig

type ClusterConfig struct {
	Username string `mapstructure:"nutanix_username" required:"false"`
	Password string `mapstructure:"nutanix_password" required:"false"`
	Insecure bool   `mapstructure:"nutanix_insecure" required:"false"`
	Endpoint string `mapstructure:"nutanix_endpoint" required:"true"`
	Port     int32  `mapstructure:"nutanix_port" required:"false"`
}

func (*ClusterConfig) FlatMapstructure

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

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

type Config

type Config struct {
	common.PackerConfig            `mapstructure:",squash"`
	WaitIpConfig                   `mapstructure:",squash"`
	Comm                           communicator.Config `mapstructure:",squash"`
	bootcommand.VNCConfig          `mapstructure:",squash"`
	commonsteps.CDConfig           `mapstructure:",squash"`
	shutdowncommand.ShutdownConfig `mapstructure:",squash"`
	ClusterConfig                  `mapstructure:",squash"`
	VmConfig                       `mapstructure:",squash"`
	OvaConfig                      OvaConfig      `mapstructure:"ova" required:"false"`
	TemplateConfig                 TemplateConfig `mapstructure:"template" required:"false"`
	ForceDeregister                bool           `mapstructure:"force_deregister" json:"force_deregister" required:"false"`
	ImageDescription               string         `mapstructure:"image_description" json:"image_description" required:"false"`
	ImageCategories                []Category     `mapstructure:"image_categories" required:"false"`
	ImageSkip                      bool           `mapstructure:"image_skip" json:"image_skip" required:"false"`
	ImageDelete                    bool           `mapstructure:"image_delete" json:"image_delete" required:"false"`
	ImageExport                    bool           `mapstructure:"image_export" json:"image_export" required:"false"`
	FailIfImageExists              bool           `mapstructure:"fail_if_image_exists" required:"false"`
	VmForceDelete                  bool           `mapstructure:"vm_force_delete" json:"vm_force_delete" required:"false"`
	VmRetain                       bool           `mapstructure:"vm_retain" json:"vm_retain" required:"false"`
	DisableStopInstance            bool           `mapstructure:"disable_stop_instance" required:"false"`
	SkipVMCreateTaskCheck          bool           `mapstructure:"skip_vm_create_task_check" required:"false"`
	// contains filtered or unexported fields
}

func (*Config) FlatMapstructure

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

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

func (*Config) Prepare

func (c *Config) Prepare(raws ...interface{}) ([]string, error)

type Driver

type Driver interface {
	CreateRequest(context.Context, VmConfig, multistep.StateBag) (*v3.VMIntentInput, error)
	Create(context.Context, *v3.VMIntentInput) (*nutanixInstance, error)
	UpdateVM(context.Context, string, *v3.VMIntentInput) (*nutanixInstance, error)
	Delete(context.Context, string) error
	GetVM(context.Context, string) (*nutanixInstance, error)
	GetHost(context.Context, string) (*nutanixHost, error)
	PowerOff(context.Context, string) error
	CreateImageURL(context.Context, VmDisk, VmConfig) (*nutanixImage, error)
	CreateImageFile(context.Context, string, VmConfig) (*nutanixImage, error)
	DeleteImage(context.Context, string) error
	GetImage(context.Context, string) (*nutanixImage, error)
	CreateTemplate(context.Context, string, TemplateConfig) error
	CreateOVA(context.Context, string, string, string) error
	ExportOVA(context.Context, string) (io.ReadCloser, error)
	ExportImage(context.Context, string) (io.ReadCloser, error)
	SaveVMDisk(context.Context, string, int, []Category) (*nutanixImage, error)
	WaitForShutdown(string, <-chan struct{}) bool
	CleanCD(context.Context, *v3.VMIntentInput)
}

Driver is able to talk to Nutanix PrismCentral and perform certain operations with it.

type FlatCategory added in v0.6.0

type FlatCategory struct {
	Key   *string `mapstructure:"key" json:"key" required:"false" cty:"key" hcl:"key"`
	Value *string `mapstructure:"value" json:"value" required:"false" cty:"value" hcl:"value"`
}

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

func (*FlatCategory) HCL2Spec added in v0.6.0

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

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

type FlatClusterConfig

type FlatClusterConfig struct {
	Username *string `mapstructure:"nutanix_username" required:"false" cty:"nutanix_username" hcl:"nutanix_username"`
	Password *string `mapstructure:"nutanix_password" required:"false" cty:"nutanix_password" hcl:"nutanix_password"`
	Insecure *bool   `mapstructure:"nutanix_insecure" required:"false" cty:"nutanix_insecure" hcl:"nutanix_insecure"`
	Endpoint *string `mapstructure:"nutanix_endpoint" required:"true" cty:"nutanix_endpoint" hcl:"nutanix_endpoint"`
	Port     *int32  `mapstructure:"nutanix_port" required:"false" cty:"nutanix_port" hcl:"nutanix_port"`
}

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

func (*FlatClusterConfig) HCL2Spec

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

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

type FlatConfig

type FlatConfig struct {
	PackerBuildName           *string             `mapstructure:"packer_build_name" cty:"packer_build_name" hcl:"packer_build_name"`
	PackerBuilderType         *string             `mapstructure:"packer_builder_type" cty:"packer_builder_type" hcl:"packer_builder_type"`
	PackerCoreVersion         *string             `mapstructure:"packer_core_version" cty:"packer_core_version" hcl:"packer_core_version"`
	PackerDebug               *bool               `mapstructure:"packer_debug" cty:"packer_debug" hcl:"packer_debug"`
	PackerForce               *bool               `mapstructure:"packer_force" cty:"packer_force" hcl:"packer_force"`
	PackerOnError             *string             `mapstructure:"packer_on_error" cty:"packer_on_error" hcl:"packer_on_error"`
	PackerUserVars            map[string]string   `mapstructure:"packer_user_variables" cty:"packer_user_variables" hcl:"packer_user_variables"`
	PackerSensitiveVars       []string            `mapstructure:"packer_sensitive_variables" cty:"packer_sensitive_variables" hcl:"packer_sensitive_variables"`
	WaitTimeout               *string             `mapstructure:"ip_wait_timeout" cty:"ip_wait_timeout" hcl:"ip_wait_timeout"`
	SettleTimeout             *string             `mapstructure:"ip_settle_timeout" cty:"ip_settle_timeout" hcl:"ip_settle_timeout"`
	WaitAddress               *string             `mapstructure:"ip_wait_address" cty:"ip_wait_address" hcl:"ip_wait_address"`
	Type                      *string             `mapstructure:"communicator" cty:"communicator" hcl:"communicator"`
	PauseBeforeConnect        *string             `mapstructure:"pause_before_connecting" cty:"pause_before_connecting" hcl:"pause_before_connecting"`
	SSHHost                   *string             `mapstructure:"ssh_host" cty:"ssh_host" hcl:"ssh_host"`
	SSHPort                   *int                `mapstructure:"ssh_port" cty:"ssh_port" hcl:"ssh_port"`
	SSHUsername               *string             `mapstructure:"ssh_username" cty:"ssh_username" hcl:"ssh_username"`
	SSHPassword               *string             `mapstructure:"ssh_password" cty:"ssh_password" hcl:"ssh_password"`
	SSHKeyPairName            *string             `mapstructure:"ssh_keypair_name" undocumented:"true" cty:"ssh_keypair_name" hcl:"ssh_keypair_name"`
	SSHTemporaryKeyPairName   *string             `mapstructure:"temporary_key_pair_name" undocumented:"true" cty:"temporary_key_pair_name" hcl:"temporary_key_pair_name"`
	SSHTemporaryKeyPairType   *string             `mapstructure:"temporary_key_pair_type" cty:"temporary_key_pair_type" hcl:"temporary_key_pair_type"`
	SSHTemporaryKeyPairBits   *int                `mapstructure:"temporary_key_pair_bits" cty:"temporary_key_pair_bits" hcl:"temporary_key_pair_bits"`
	SSHCiphers                []string            `mapstructure:"ssh_ciphers" cty:"ssh_ciphers" hcl:"ssh_ciphers"`
	SSHClearAuthorizedKeys    *bool               `mapstructure:"ssh_clear_authorized_keys" cty:"ssh_clear_authorized_keys" hcl:"ssh_clear_authorized_keys"`
	SSHKEXAlgos               []string            `mapstructure:"ssh_key_exchange_algorithms" cty:"ssh_key_exchange_algorithms" hcl:"ssh_key_exchange_algorithms"`
	SSHPrivateKeyFile         *string             `mapstructure:"ssh_private_key_file" undocumented:"true" cty:"ssh_private_key_file" hcl:"ssh_private_key_file"`
	SSHCertificateFile        *string             `mapstructure:"ssh_certificate_file" cty:"ssh_certificate_file" hcl:"ssh_certificate_file"`
	SSHPty                    *bool               `mapstructure:"ssh_pty" cty:"ssh_pty" hcl:"ssh_pty"`
	SSHTimeout                *string             `mapstructure:"ssh_timeout" cty:"ssh_timeout" hcl:"ssh_timeout"`
	SSHWaitTimeout            *string             `mapstructure:"ssh_wait_timeout" undocumented:"true" cty:"ssh_wait_timeout" hcl:"ssh_wait_timeout"`
	SSHAgentAuth              *bool               `mapstructure:"ssh_agent_auth" undocumented:"true" cty:"ssh_agent_auth" hcl:"ssh_agent_auth"`
	SSHDisableAgentForwarding *bool               `mapstructure:"ssh_disable_agent_forwarding" cty:"ssh_disable_agent_forwarding" hcl:"ssh_disable_agent_forwarding"`
	SSHHandshakeAttempts      *int                `mapstructure:"ssh_handshake_attempts" cty:"ssh_handshake_attempts" hcl:"ssh_handshake_attempts"`
	SSHBastionHost            *string             `mapstructure:"ssh_bastion_host" cty:"ssh_bastion_host" hcl:"ssh_bastion_host"`
	SSHBastionPort            *int                `mapstructure:"ssh_bastion_port" cty:"ssh_bastion_port" hcl:"ssh_bastion_port"`
	SSHBastionAgentAuth       *bool               `mapstructure:"ssh_bastion_agent_auth" cty:"ssh_bastion_agent_auth" hcl:"ssh_bastion_agent_auth"`
	SSHBastionUsername        *string             `mapstructure:"ssh_bastion_username" cty:"ssh_bastion_username" hcl:"ssh_bastion_username"`
	SSHBastionPassword        *string             `mapstructure:"ssh_bastion_password" cty:"ssh_bastion_password" hcl:"ssh_bastion_password"`
	SSHBastionInteractive     *bool               `mapstructure:"ssh_bastion_interactive" cty:"ssh_bastion_interactive" hcl:"ssh_bastion_interactive"`
	SSHBastionPrivateKeyFile  *string             `mapstructure:"ssh_bastion_private_key_file" cty:"ssh_bastion_private_key_file" hcl:"ssh_bastion_private_key_file"`
	SSHBastionCertificateFile *string             `mapstructure:"ssh_bastion_certificate_file" cty:"ssh_bastion_certificate_file" hcl:"ssh_bastion_certificate_file"`
	SSHFileTransferMethod     *string             `mapstructure:"ssh_file_transfer_method" cty:"ssh_file_transfer_method" hcl:"ssh_file_transfer_method"`
	SSHProxyHost              *string             `mapstructure:"ssh_proxy_host" cty:"ssh_proxy_host" hcl:"ssh_proxy_host"`
	SSHProxyPort              *int                `mapstructure:"ssh_proxy_port" cty:"ssh_proxy_port" hcl:"ssh_proxy_port"`
	SSHProxyUsername          *string             `mapstructure:"ssh_proxy_username" cty:"ssh_proxy_username" hcl:"ssh_proxy_username"`
	SSHProxyPassword          *string             `mapstructure:"ssh_proxy_password" cty:"ssh_proxy_password" hcl:"ssh_proxy_password"`
	SSHKeepAliveInterval      *string             `mapstructure:"ssh_keep_alive_interval" cty:"ssh_keep_alive_interval" hcl:"ssh_keep_alive_interval"`
	SSHReadWriteTimeout       *string             `mapstructure:"ssh_read_write_timeout" cty:"ssh_read_write_timeout" hcl:"ssh_read_write_timeout"`
	SSHRemoteTunnels          []string            `mapstructure:"ssh_remote_tunnels" cty:"ssh_remote_tunnels" hcl:"ssh_remote_tunnels"`
	SSHLocalTunnels           []string            `mapstructure:"ssh_local_tunnels" cty:"ssh_local_tunnels" hcl:"ssh_local_tunnels"`
	SSHPublicKey              []byte              `mapstructure:"ssh_public_key" undocumented:"true" cty:"ssh_public_key" hcl:"ssh_public_key"`
	SSHPrivateKey             []byte              `mapstructure:"ssh_private_key" undocumented:"true" cty:"ssh_private_key" hcl:"ssh_private_key"`
	WinRMUser                 *string             `mapstructure:"winrm_username" cty:"winrm_username" hcl:"winrm_username"`
	WinRMPassword             *string             `mapstructure:"winrm_password" cty:"winrm_password" hcl:"winrm_password"`
	WinRMHost                 *string             `mapstructure:"winrm_host" cty:"winrm_host" hcl:"winrm_host"`
	WinRMNoProxy              *bool               `mapstructure:"winrm_no_proxy" cty:"winrm_no_proxy" hcl:"winrm_no_proxy"`
	WinRMPort                 *int                `mapstructure:"winrm_port" cty:"winrm_port" hcl:"winrm_port"`
	WinRMTimeout              *string             `mapstructure:"winrm_timeout" cty:"winrm_timeout" hcl:"winrm_timeout"`
	WinRMUseSSL               *bool               `mapstructure:"winrm_use_ssl" cty:"winrm_use_ssl" hcl:"winrm_use_ssl"`
	WinRMInsecure             *bool               `mapstructure:"winrm_insecure" cty:"winrm_insecure" hcl:"winrm_insecure"`
	WinRMUseNTLM              *bool               `mapstructure:"winrm_use_ntlm" cty:"winrm_use_ntlm" hcl:"winrm_use_ntlm"`
	BootGroupInterval         *string             `mapstructure:"boot_keygroup_interval" cty:"boot_keygroup_interval" hcl:"boot_keygroup_interval"`
	BootWait                  *string             `mapstructure:"boot_wait" cty:"boot_wait" hcl:"boot_wait"`
	BootCommand               []string            `mapstructure:"boot_command" cty:"boot_command" hcl:"boot_command"`
	DisableVNC                *bool               `mapstructure:"disable_vnc" cty:"disable_vnc" hcl:"disable_vnc"`
	BootKeyInterval           *string             `mapstructure:"boot_key_interval" cty:"boot_key_interval" hcl:"boot_key_interval"`
	CDFiles                   []string            `mapstructure:"cd_files" cty:"cd_files" hcl:"cd_files"`
	CDContent                 map[string]string   `mapstructure:"cd_content" cty:"cd_content" hcl:"cd_content"`
	CDLabel                   *string             `mapstructure:"cd_label" cty:"cd_label" hcl:"cd_label"`
	ShutdownCommand           *string             `mapstructure:"shutdown_command" required:"false" cty:"shutdown_command" hcl:"shutdown_command"`
	ShutdownTimeout           *string             `mapstructure:"shutdown_timeout" required:"false" cty:"shutdown_timeout" hcl:"shutdown_timeout"`
	Username                  *string             `mapstructure:"nutanix_username" required:"false" cty:"nutanix_username" hcl:"nutanix_username"`
	Password                  *string             `mapstructure:"nutanix_password" required:"false" cty:"nutanix_password" hcl:"nutanix_password"`
	Insecure                  *bool               `mapstructure:"nutanix_insecure" required:"false" cty:"nutanix_insecure" hcl:"nutanix_insecure"`
	Endpoint                  *string             `mapstructure:"nutanix_endpoint" required:"true" cty:"nutanix_endpoint" hcl:"nutanix_endpoint"`
	Port                      *int32              `mapstructure:"nutanix_port" required:"false" cty:"nutanix_port" hcl:"nutanix_port"`
	VMName                    *string             `mapstructure:"vm_name" json:"vm_name" required:"false" cty:"vm_name" hcl:"vm_name"`
	OSType                    *string             `mapstructure:"os_type" json:"os_type" required:"true" cty:"os_type" hcl:"os_type"`
	BootType                  *string             `mapstructure:"boot_type" json:"boot_type" required:"false" cty:"boot_type" hcl:"boot_type"`
	VTPM                      *FlatVTPM           `mapstructure:"vtpm" json:"vtpm" required:"false" cty:"vtpm" hcl:"vtpm"`
	HardwareVirtualization    *bool               `` /* 146-byte string literal not displayed */
	BootPriority              *string             `mapstructure:"boot_priority" json:"boot_priority" required:"false" cty:"boot_priority" hcl:"boot_priority"`
	VmDisks                   []FlatVmDisk        `mapstructure:"vm_disks" cty:"vm_disks" hcl:"vm_disks"`
	VmNICs                    []FlatVmNIC         `mapstructure:"vm_nics" cty:"vm_nics" hcl:"vm_nics"`
	ImageName                 *string             `mapstructure:"image_name" json:"image_name" required:"false" cty:"image_name" hcl:"image_name"`
	ClusterUUID               *string             `mapstructure:"cluster_uuid" json:"cluster_uuid" required:"false" cty:"cluster_uuid" hcl:"cluster_uuid"`
	ClusterName               *string             `mapstructure:"cluster_name" json:"cluster_name" required:"false" cty:"cluster_name" hcl:"cluster_name"`
	CPU                       *int64              `mapstructure:"cpu" json:"cpu" required:"false" cty:"cpu" hcl:"cpu"`
	Core                      *int64              `mapstructure:"core" json:"core" required:"false" cty:"core" hcl:"core"`
	MemoryMB                  *int64              `mapstructure:"memory_mb" json:"memory_mb" required:"false" cty:"memory_mb" hcl:"memory_mb"`
	UserData                  *string             `mapstructure:"user_data" json:"user_data" required:"false" cty:"user_data" hcl:"user_data"`
	VMCategories              []FlatCategory      `mapstructure:"vm_categories" required:"false" cty:"vm_categories" hcl:"vm_categories"`
	Project                   *string             `mapstructure:"project" required:"false" cty:"project" hcl:"project"`
	GPU                       []FlatGPU           `mapstructure:"gpu" required:"false" cty:"gpu" hcl:"gpu"`
	SerialPort                *bool               `mapstructure:"serialport" json:"serialport" required:"false" cty:"serialport" hcl:"serialport"`
	Clean                     *FlatVmClean        `mapstructure:"vm_clean" json:"vm_clean" required:"false" cty:"vm_clean" hcl:"vm_clean"`
	OvaConfig                 *FlatOvaConfig      `mapstructure:"ova" required:"false" cty:"ova" hcl:"ova"`
	TemplateConfig            *FlatTemplateConfig `mapstructure:"template" required:"false" cty:"template" hcl:"template"`
	ForceDeregister           *bool               `mapstructure:"force_deregister" json:"force_deregister" required:"false" cty:"force_deregister" hcl:"force_deregister"`
	ImageDescription          *string             `mapstructure:"image_description" json:"image_description" required:"false" cty:"image_description" hcl:"image_description"`
	ImageCategories           []FlatCategory      `mapstructure:"image_categories" required:"false" cty:"image_categories" hcl:"image_categories"`
	ImageSkip                 *bool               `mapstructure:"image_skip" json:"image_skip" required:"false" cty:"image_skip" hcl:"image_skip"`
	ImageDelete               *bool               `mapstructure:"image_delete" json:"image_delete" required:"false" cty:"image_delete" hcl:"image_delete"`
	ImageExport               *bool               `mapstructure:"image_export" json:"image_export" required:"false" cty:"image_export" hcl:"image_export"`
	FailIfImageExists         *bool               `mapstructure:"fail_if_image_exists" required:"false" cty:"fail_if_image_exists" hcl:"fail_if_image_exists"`
	VmForceDelete             *bool               `mapstructure:"vm_force_delete" json:"vm_force_delete" required:"false" cty:"vm_force_delete" hcl:"vm_force_delete"`
	VmRetain                  *bool               `mapstructure:"vm_retain" json:"vm_retain" required:"false" cty:"vm_retain" hcl:"vm_retain"`
	DisableStopInstance       *bool               `mapstructure:"disable_stop_instance" required:"false" cty:"disable_stop_instance" hcl:"disable_stop_instance"`
	SkipVMCreateTaskCheck     *bool               `mapstructure:"skip_vm_create_task_check" required:"false" cty:"skip_vm_create_task_check" hcl:"skip_vm_create_task_check"`
}

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

func (*FlatConfig) HCL2Spec

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

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

type FlatGPU added in v0.9.0

type FlatGPU struct {
	Name *string `mapstructure:"name" json:"name" required:"false" cty:"name" hcl:"name"`
}

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

func (*FlatGPU) HCL2Spec added in v0.9.0

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

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

type FlatOvaConfig added in v1.0.0

type FlatOvaConfig struct {
	Export *bool   `mapstructure:"export" json:"export" required:"false" cty:"export" hcl:"export"`
	Create *bool   `mapstructure:"create" json:"create" required:"false" cty:"create" hcl:"create"`
	Format *string `mapstructure:"format" json:"format" required:"false" cty:"format" hcl:"format"`
	Name   *string `mapstructure:"name" json:"name" required:"false" cty:"name" hcl:"name"`
}

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

func (*FlatOvaConfig) HCL2Spec added in v1.0.0

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

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

type FlatTemplateConfig added in v1.0.0

type FlatTemplateConfig struct {
	Create      *bool   `mapstructure:"create" json:"create" required:"false" cty:"create" hcl:"create"`
	Name        *string `mapstructure:"name" json:"name" required:"false" cty:"name" hcl:"name"`
	Description *string `mapstructure:"description" json:"description" required:"false" cty:"description" hcl:"description"`
}

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

func (*FlatTemplateConfig) HCL2Spec added in v1.0.0

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

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

type FlatVTPM added in v1.0.0

type FlatVTPM struct {
	Enabled *bool `mapstructure:"enabled" json:"enabled" required:"false" cty:"enabled" hcl:"enabled"`
}

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

func (*FlatVTPM) HCL2Spec added in v1.0.0

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

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

type FlatVmClean added in v1.0.0

type FlatVmClean struct {
	Cdrom *bool `mapstructure:"cdrom" json:"cdrom" required:"false" cty:"cdrom" hcl:"cdrom"`
}

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

func (*FlatVmClean) HCL2Spec added in v1.0.0

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

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

type FlatVmConfig

type FlatVmConfig struct {
	VMName                 *string        `mapstructure:"vm_name" json:"vm_name" required:"false" cty:"vm_name" hcl:"vm_name"`
	OSType                 *string        `mapstructure:"os_type" json:"os_type" required:"true" cty:"os_type" hcl:"os_type"`
	BootType               *string        `mapstructure:"boot_type" json:"boot_type" required:"false" cty:"boot_type" hcl:"boot_type"`
	VTPM                   *FlatVTPM      `mapstructure:"vtpm" json:"vtpm" required:"false" cty:"vtpm" hcl:"vtpm"`
	HardwareVirtualization *bool          `` /* 146-byte string literal not displayed */
	BootPriority           *string        `mapstructure:"boot_priority" json:"boot_priority" required:"false" cty:"boot_priority" hcl:"boot_priority"`
	VmDisks                []FlatVmDisk   `mapstructure:"vm_disks" cty:"vm_disks" hcl:"vm_disks"`
	VmNICs                 []FlatVmNIC    `mapstructure:"vm_nics" cty:"vm_nics" hcl:"vm_nics"`
	ImageName              *string        `mapstructure:"image_name" json:"image_name" required:"false" cty:"image_name" hcl:"image_name"`
	ClusterUUID            *string        `mapstructure:"cluster_uuid" json:"cluster_uuid" required:"false" cty:"cluster_uuid" hcl:"cluster_uuid"`
	ClusterName            *string        `mapstructure:"cluster_name" json:"cluster_name" required:"false" cty:"cluster_name" hcl:"cluster_name"`
	CPU                    *int64         `mapstructure:"cpu" json:"cpu" required:"false" cty:"cpu" hcl:"cpu"`
	Core                   *int64         `mapstructure:"core" json:"core" required:"false" cty:"core" hcl:"core"`
	MemoryMB               *int64         `mapstructure:"memory_mb" json:"memory_mb" required:"false" cty:"memory_mb" hcl:"memory_mb"`
	UserData               *string        `mapstructure:"user_data" json:"user_data" required:"false" cty:"user_data" hcl:"user_data"`
	VMCategories           []FlatCategory `mapstructure:"vm_categories" required:"false" cty:"vm_categories" hcl:"vm_categories"`
	Project                *string        `mapstructure:"project" required:"false" cty:"project" hcl:"project"`
	GPU                    []FlatGPU      `mapstructure:"gpu" required:"false" cty:"gpu" hcl:"gpu"`
	SerialPort             *bool          `mapstructure:"serialport" json:"serialport" required:"false" cty:"serialport" hcl:"serialport"`
	Clean                  *FlatVmClean   `mapstructure:"vm_clean" json:"vm_clean" required:"false" cty:"vm_clean" hcl:"vm_clean"`
}

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

func (*FlatVmConfig) HCL2Spec

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

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

type FlatVmDisk

type FlatVmDisk struct {
	ImageType               *string `mapstructure:"image_type" json:"image_type" required:"false" cty:"image_type" hcl:"image_type"`
	SourceImageName         *string `mapstructure:"source_image_name" json:"source_image_name" required:"false" cty:"source_image_name" hcl:"source_image_name"`
	SourceImageUUID         *string `mapstructure:"source_image_uuid" json:"source_image_uuid" required:"false" cty:"source_image_uuid" hcl:"source_image_uuid"`
	SourceImageURI          *string `mapstructure:"source_image_uri" json:"source_image_uri" required:"false" cty:"source_image_uri" hcl:"source_image_uri"`
	SourceImagePath         *string `mapstructure:"source_image_path" json:"source_image_path" required:"false" cty:"source_image_path" hcl:"source_image_path"`
	SourceImageChecksum     *string `` /* 138-byte string literal not displayed */
	SourceImageChecksumType *string `` /* 158-byte string literal not displayed */
	SourceImageDelete       *bool   `` /* 130-byte string literal not displayed */
	SourceImageForce        *bool   `` /* 126-byte string literal not displayed */
	DiskSizeGB              *int64  `mapstructure:"disk_size_gb" json:"disk_size_gb" required:"false" cty:"disk_size_gb" hcl:"disk_size_gb"`
	StorageContainerUUID    *string `` /* 142-byte string literal not displayed */
}

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

func (*FlatVmDisk) HCL2Spec

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

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

type FlatVmNIC

type FlatVmNIC struct {
	SubnetName *string `mapstructure:"subnet_name" json:"subnet_name" required:"false" cty:"subnet_name" hcl:"subnet_name"`
	SubnetUUID *string `mapstructure:"subnet_uuid" json:"subnet_uuid" required:"false" cty:"subnet_uuid" hcl:"subnet_uuid"`
	MacAddress *string `mapstructure:"mac_address" json:"mac_address" required:"false" cty:"mac_address" hcl:"mac_address"`
}

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

func (*FlatVmNIC) HCL2Spec

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

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

type FlatWaitIpConfig added in v0.13.0

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

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 added in v0.13.0

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 GPU added in v0.9.0

type GPU struct {
	Name string `mapstructure:"name" json:"name" required:"false"`
}

func (*GPU) FlatMapstructure added in v0.9.0

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

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

type NutanixDriver

type NutanixDriver struct {
	Config        Config
	ClusterConfig ClusterConfig
	// contains filtered or unexported fields
}

NutanixDriver is a driver for Nutanix PrismCentral calls

func (*NutanixDriver) CleanCD added in v1.0.0

func (d *NutanixDriver) CleanCD(ctx context.Context, vm *v3.VMIntentInput)

func (*NutanixDriver) Create

func (d *NutanixDriver) Create(ctx context.Context, req *v3.VMIntentInput) (*nutanixInstance, error)

func (*NutanixDriver) CreateImageFile added in v0.8.0

func (d *NutanixDriver) CreateImageFile(ctx context.Context, filePath string, vm VmConfig) (*nutanixImage, error)

CreateImageFile (VmDisk, VmConfig) (*nutanixImage, error)

func (*NutanixDriver) CreateImageURL added in v0.8.0

func (d *NutanixDriver) CreateImageURL(ctx context.Context, disk VmDisk, vm VmConfig) (*nutanixImage, error)

CreateImageURL (VmDisk, VmConfig) (*nutanixImage, error)

func (*NutanixDriver) CreateOVA added in v1.0.0

func (d *NutanixDriver) CreateOVA(ctx context.Context, ovaName string, vmUUID string, diskFileFormat string) error

func (*NutanixDriver) CreateRequest

func (d *NutanixDriver) CreateRequest(ctx context.Context, vm VmConfig, state multistep.StateBag) (*v3.VMIntentInput, error)

func (*NutanixDriver) CreateTemplate added in v1.0.0

func (d *NutanixDriver) CreateTemplate(ctx context.Context, vmUUID string, template TemplateConfig) error

func (*NutanixDriver) Delete

func (d *NutanixDriver) Delete(ctx context.Context, vmUUID string) error

func (*NutanixDriver) DeleteImage

func (d *NutanixDriver) DeleteImage(ctx context.Context, imageUUID string) error

func (*NutanixDriver) ExportImage added in v0.7.0

func (d *NutanixDriver) ExportImage(ctx context.Context, imageUUID string) (io.ReadCloser, error)

func (*NutanixDriver) ExportOVA added in v1.0.0

func (d *NutanixDriver) ExportOVA(ctx context.Context, ovaName string) (io.ReadCloser, error)

func (*NutanixDriver) GetHost

func (d *NutanixDriver) GetHost(ctx context.Context, hostUUID string) (*nutanixHost, error)

func (*NutanixDriver) GetImage added in v0.3.0

func (d *NutanixDriver) GetImage(ctx context.Context, imagename string) (*nutanixImage, error)

func (*NutanixDriver) GetVM

func (d *NutanixDriver) GetVM(ctx context.Context, vmUUID string) (*nutanixInstance, error)

func (*NutanixDriver) PowerOff

func (d *NutanixDriver) PowerOff(ctx context.Context, vmUUID string) error

func (*NutanixDriver) SaveVMDisk

func (d *NutanixDriver) SaveVMDisk(ctx context.Context, diskUUID string, index int, imageCategories []Category) (*nutanixImage, error)

func (*NutanixDriver) UpdateVM added in v1.0.0

func (d *NutanixDriver) UpdateVM(ctx context.Context, vmUUID string, req *v3.VMIntentInput) (*nutanixInstance, error)

func (*NutanixDriver) WaitForIP added in v0.13.0

func (d *NutanixDriver) WaitForIP(ctx context.Context, uuid string, ipNet *net.IPNet) (string, error)

WaitForIP waits for the virtual machine to obtain an IP address.

func (*NutanixDriver) WaitForShutdown

func (d *NutanixDriver) WaitForShutdown(vmUUID string, cancelCh <-chan struct{}) bool

type OvaConfig added in v1.0.0

type OvaConfig struct {
	Export bool   `mapstructure:"export" json:"export" required:"false"`
	Create bool   `mapstructure:"create" json:"create" required:"false"`
	Format string `mapstructure:"format" json:"format" required:"false"`
	Name   string `mapstructure:"name" json:"name" required:"false"`
}

func (*OvaConfig) FlatMapstructure added in v1.0.0

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

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

type StepCreateOVA added in v1.0.0

type StepCreateOVA struct {
	VMName    string
	OvaConfig OvaConfig
}

func (*StepCreateOVA) Cleanup added in v1.0.0

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

func (*StepCreateOVA) Run added in v1.0.0

type StepExportOVA added in v1.0.0

type StepExportOVA struct {
	VMName    string
	OvaConfig OvaConfig
}

func (*StepExportOVA) Cleanup added in v1.0.0

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

func (*StepExportOVA) Run added in v1.0.0

type StepShutdown

type StepShutdown struct {
	Command             string
	Timeout             time.Duration
	DisableStopInstance bool
}

This step shuts down the machine. It first attempts to do so gracefully, but ultimately forcefully shuts it down if that fails.

Uses:

communicator packersdk.Communicator
driver Driver
ui     packersdk.Ui
vmName string

Produces:

<nothing>

func (*StepShutdown) Cleanup

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

func (*StepShutdown) Run

type TemplateConfig added in v1.0.0

type TemplateConfig struct {
	Create      bool   `mapstructure:"create" json:"create" required:"false"`
	Name        string `mapstructure:"name" json:"name" required:"false"`
	Description string `mapstructure:"description" json:"description" required:"false"`
}

func (*TemplateConfig) FlatMapstructure added in v1.0.0

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

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

type VTPM added in v1.0.0

type VTPM struct {
	Enabled bool `mapstructure:"enabled" json:"enabled" required:"false"`
}

func (*VTPM) FlatMapstructure added in v1.0.0

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

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

type VmClean added in v1.0.0

type VmClean struct {
	Cdrom bool `mapstructure:"cdrom" json:"cdrom" required:"false"`
}

func (*VmClean) FlatMapstructure added in v1.0.0

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

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

type VmConfig

type VmConfig struct {
	VMName                 string     `mapstructure:"vm_name" json:"vm_name" required:"false"`
	OSType                 string     `mapstructure:"os_type" json:"os_type" required:"true"`
	BootType               string     `mapstructure:"boot_type" json:"boot_type" required:"false"`
	VTPM                   VTPM       `mapstructure:"vtpm" json:"vtpm" required:"false"`
	HardwareVirtualization bool       `mapstructure:"hardware_virtualization" json:"hardware_virtualization" required:"false"`
	BootPriority           string     `mapstructure:"boot_priority" json:"boot_priority" required:"false"`
	VmDisks                []VmDisk   `mapstructure:"vm_disks"`
	VmNICs                 []VmNIC    `mapstructure:"vm_nics"`
	ImageName              string     `mapstructure:"image_name" json:"image_name" required:"false"`
	ClusterUUID            string     `mapstructure:"cluster_uuid" json:"cluster_uuid" required:"false"`
	ClusterName            string     `mapstructure:"cluster_name" json:"cluster_name" required:"false"`
	CPU                    int64      `mapstructure:"cpu" json:"cpu" required:"false"`
	Core                   int64      `mapstructure:"core" json:"core" required:"false"`
	MemoryMB               int64      `mapstructure:"memory_mb" json:"memory_mb" required:"false"`
	UserData               string     `mapstructure:"user_data" json:"user_data" required:"false"`
	VMCategories           []Category `mapstructure:"vm_categories" required:"false"`
	Project                string     `mapstructure:"project" required:"false"`
	GPU                    []GPU      `mapstructure:"gpu" required:"false"`
	SerialPort             bool       `mapstructure:"serialport" json:"serialport" required:"false"`
	Clean                  VmClean    `mapstructure:"vm_clean" json:"vm_clean" required:"false"`
}

func (*VmConfig) FlatMapstructure

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

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

type VmDisk

type VmDisk struct {
	ImageType               string `mapstructure:"image_type" json:"image_type" required:"false"`
	SourceImageName         string `mapstructure:"source_image_name" json:"source_image_name" required:"false"`
	SourceImageUUID         string `mapstructure:"source_image_uuid" json:"source_image_uuid" required:"false"`
	SourceImageURI          string `mapstructure:"source_image_uri" json:"source_image_uri" required:"false"`
	SourceImagePath         string `mapstructure:"source_image_path" json:"source_image_path" required:"false"`
	SourceImageChecksum     string `mapstructure:"source_image_checksum" json:"source_image_checksum" required:"false"`
	SourceImageChecksumType string `mapstructure:"source_image_checksum_type" json:"source_image_checksum_type" required:"false"`
	SourceImageDelete       bool   `mapstructure:"source_image_delete" json:"source_image_delete" required:"false"`
	SourceImageForce        bool   `mapstructure:"source_image_force" json:"source_image_force" required:"false"`
	DiskSizeGB              int64  `mapstructure:"disk_size_gb" json:"disk_size_gb" required:"false"`
	StorageContainerUUID    string `mapstructure:"storage_container_uuid" json:"storage_container_uuid" required:"false"`
}

func (*VmDisk) FlatMapstructure

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

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

type VmNIC

type VmNIC struct {
	SubnetName string `mapstructure:"subnet_name" json:"subnet_name" required:"false"`
	SubnetUUID string `mapstructure:"subnet_uuid" json:"subnet_uuid" required:"false"`
	MacAddress string `mapstructure:"mac_address" json:"mac_address" required:"false"`
}

func (*VmNIC) FlatMapstructure

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

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

type WaitIpConfig added in v0.13.0

type WaitIpConfig struct {
	// Amount of time to wait for VM's IP, similar to 'ssh_timeout'.
	// Defaults to `30m` (30 minutes). Refer to the Golang
	// [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 it is recommended to set that
	// parameter to apx. 2 minutes. Examples `45s` and `10m`.
	// Defaults to `5s` (5 seconds). Refer to the Golang
	// [ParseDuration](https://golang.org/pkg/time/#ParseDuration)
	// documentation for full details.
	SettleTimeout time.Duration `mapstructure:"ip_settle_timeout"`
	// Set this to a CIDR address to cause the service to wait for an address that is contained in
	// this network range. Defaults to `0.0.0.0/0` for any IPv4 address. Examples include:
	//
	// * empty string ("") - remove all filters
	// * `0:0:0:0:0:0:0:0/0` - allow only ipv6 addresses
	// * `192.168.1.0/24` - only allow ipv4 addresses from 192.168.1.1 to 192.168.1.254
	WaitAddress *string `mapstructure:"ip_wait_address"`
	// contains filtered or unexported fields
}

func (*WaitIpConfig) FlatMapstructure added in v0.13.0

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) GetIPNet added in v0.13.0

func (c *WaitIpConfig) GetIPNet() *net.IPNet

func (*WaitIpConfig) Prepare added in v0.13.0

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

Jump to

Keyboard shortcuts

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