Documentation ¶
Index ¶
- Constants
- func BootStrapCloudInit(vmCtx context.VirtualMachineContextA2, config *types.VirtualMachineConfigInfo, ...) (*types.VirtualMachineConfigSpec, *types.CustomizationSpec, error)
- func BootStrapLinuxPrep(ctx goctx.Context, config *vimTypes.VirtualMachineConfigInfo, ...) (*vimTypes.VirtualMachineConfigSpec, *vimTypes.CustomizationSpec, error)
- func BootstrapSysPrep(ctx goctx.Context, config *vimTypes.VirtualMachineConfigInfo, ...) (*vimTypes.VirtualMachineConfigSpec, *vimTypes.CustomizationSpec, error)
- func BootstrapVAppConfig(ctx goctx.Context, config *vimTypes.VirtualMachineConfigInfo, ...) (*vimTypes.VirtualMachineConfigSpec, *vimTypes.CustomizationSpec, error)
- func CreateVirtualMachine(vmCtx context.VirtualMachineContextA2, clClient contentlibrary.Provider, ...) (*types.ManagedObjectReference, error)
- func DoBootstrap(vmCtx context.VirtualMachineContextA2, vcVM *object.VirtualMachine, ...) error
- func GetCloudInitGuestInfoCustSpec(config *types.VirtualMachineConfigInfo, metadata, userdata string) (*types.VirtualMachineConfigSpec, error)
- func GetCloudInitMetadata(uid string, hostname string, netplan *network.Netplan, sshPublicKeys string) (string, error)
- func GetCloudInitPrepCustSpec(metadata, userdata string) (*types.VirtualMachineConfigSpec, *types.CustomizationSpec, error)
- func GetMergedvAppConfigSpec(inProps map[string]string, vmProps []vimTypes.VAppPropertyInfo) *vimTypes.VmConfigSpec
- func GetOVFVAppConfigForConfigSpec(config *vimTypes.VirtualMachineConfigInfo, ...) vimTypes.BaseVmConfigSpec
- func IsCustomizationPendingExtraConfig(extraConfig []vimTypes.BaseOptionValue) bool
- func MarkCustomizationInfoCondition(vm *vmopv1.VirtualMachine, guestInfo *types.GuestInfo)
- func MarkVMToolsRunningStatusCondition(vm *vmopv1.VirtualMachine, guestInfo *types.GuestInfo)
- func UpdateStatus(vmCtx context.VirtualMachineContextA2, k8sClient ctrlclient.Client, ...) error
- type BootstrapArgs
- type BootstrapData
- type CloudInitMetadata
- type CreateArgs
- type TemplateRenderFunc
Constants ¶
View Source
const ( // OvfEnvironmentTransportGuestInfo is the OVF transport type that uses // GuestInfo. The other valid type is "iso". OvfEnvironmentTransportGuestInfo = "com.vmware.guestInfo" )
Variables ¶
This section is empty.
Functions ¶
func BootStrapCloudInit ¶
func BootStrapCloudInit( vmCtx context.VirtualMachineContextA2, config *types.VirtualMachineConfigInfo, cloudInitSpec *vmopv1.VirtualMachineBootstrapCloudInitSpec, bsArgs *BootstrapArgs) (*types.VirtualMachineConfigSpec, *types.CustomizationSpec, error)
func BootStrapLinuxPrep ¶
func BootStrapLinuxPrep( ctx goctx.Context, config *vimTypes.VirtualMachineConfigInfo, linuxPrepSpec *vmopv1.VirtualMachineBootstrapLinuxPrepSpec, vAppConfigSpec *vmopv1.VirtualMachineBootstrapVAppConfigSpec, bsArgs *BootstrapArgs) (*vimTypes.VirtualMachineConfigSpec, *vimTypes.CustomizationSpec, error)
func BootstrapSysPrep ¶
func BootstrapSysPrep( ctx goctx.Context, config *vimTypes.VirtualMachineConfigInfo, sysPrepSpec *vmopv1.VirtualMachineBootstrapSysprepSpec, vAppConfigSpec *vmopv1.VirtualMachineBootstrapVAppConfigSpec, bsArgs *BootstrapArgs) (*vimTypes.VirtualMachineConfigSpec, *vimTypes.CustomizationSpec, error)
func BootstrapVAppConfig ¶
func BootstrapVAppConfig( ctx goctx.Context, config *vimTypes.VirtualMachineConfigInfo, vAppConfigSpec *vmopv1.VirtualMachineBootstrapVAppConfigSpec, bsArgs *BootstrapArgs) (*vimTypes.VirtualMachineConfigSpec, *vimTypes.CustomizationSpec, error)
func CreateVirtualMachine ¶
func CreateVirtualMachine( vmCtx context.VirtualMachineContextA2, clClient contentlibrary.Provider, restClient *rest.Client, finder *find.Finder, createArgs *CreateArgs) (*types.ManagedObjectReference, error)
func DoBootstrap ¶
func DoBootstrap( vmCtx context.VirtualMachineContextA2, vcVM *object.VirtualMachine, config *vimTypes.VirtualMachineConfigInfo, k8sClient ctrl.Client, networkResults network.NetworkInterfaceResults, bootstrapData BootstrapData) error
func GetCloudInitGuestInfoCustSpec ¶
func GetCloudInitGuestInfoCustSpec( config *types.VirtualMachineConfigInfo, metadata, userdata string) (*types.VirtualMachineConfigSpec, error)
func GetCloudInitMetadata ¶
func GetCloudInitPrepCustSpec ¶
func GetCloudInitPrepCustSpec( metadata, userdata string) (*types.VirtualMachineConfigSpec, *types.CustomizationSpec, error)
func GetMergedvAppConfigSpec ¶
func GetMergedvAppConfigSpec(inProps map[string]string, vmProps []vimTypes.VAppPropertyInfo) *vimTypes.VmConfigSpec
GetMergedvAppConfigSpec prepares a vApp VmConfigSpec which will set the provided key/value fields. Only fields marked userConfigurable and pre-existing on the VM (ie. originated from the OVF Image) will be set, and all others will be ignored.
func GetOVFVAppConfigForConfigSpec ¶
func GetOVFVAppConfigForConfigSpec( config *vimTypes.VirtualMachineConfigInfo, vAppConfigSpec *vmopv1.VirtualMachineBootstrapVAppConfigSpec, vAppData map[string]string, vAppExData map[string]map[string]string, templateRenderFn TemplateRenderFunc) vimTypes.BaseVmConfigSpec
func IsCustomizationPendingExtraConfig ¶
func IsCustomizationPendingExtraConfig(extraConfig []vimTypes.BaseOptionValue) bool
func MarkCustomizationInfoCondition ¶
func MarkCustomizationInfoCondition(vm *vmopv1.VirtualMachine, guestInfo *types.GuestInfo)
func MarkVMToolsRunningStatusCondition ¶
func MarkVMToolsRunningStatusCondition( vm *vmopv1.VirtualMachine, guestInfo *types.GuestInfo)
func UpdateStatus ¶
func UpdateStatus( vmCtx context.VirtualMachineContextA2, k8sClient ctrlclient.Client, vcVM *object.VirtualMachine, vmMO *mo.VirtualMachine) error
Types ¶
type BootstrapArgs ¶
type BootstrapArgs struct { BootstrapData TemplateRenderFn TemplateRenderFunc NetworkResults network.NetworkInterfaceResults Hostname string DNSServers []string SearchSuffixes []string }
type BootstrapData ¶
type CloudInitMetadata ¶
type CreateArgs ¶
type CreateArgs struct { UseContentLibrary bool ProviderItemID string ConfigSpec *types.VirtualMachineConfigSpec StorageProvisioning string FolderMoID string ResourcePoolMoID string HostMoID string StorageProfileID string DatastoreMoID string // gce2e only: used only if StorageProfileID is unset }
CreateArgs contains the arguments needed to create a VM.
type TemplateRenderFunc ¶
func GetTemplateRenderFunc ¶
func GetTemplateRenderFunc( vmCtx context.VirtualMachineContextA2, bsArgs *BootstrapArgs, ) TemplateRenderFunc
Click to show internal directories.
Click to hide internal directories.