Documentation ¶
Index ¶
- func CheckPlacementRelocateSpec(spec *types.VirtualMachineRelocateSpec) error
- func CloneVMRelocateSpec(vmCtx context.VirtualMachineContextA2, cluster *object.ClusterComputeResource, ...) (*types.VirtualMachineRelocateSpec, error)
- func ParseRelocateVMResponse(vmCtx context.VirtualMachineContextA2, res *types.PlacementResult) *types.VirtualMachineRelocateSpec
- type Recommendation
- func ClusterPlaceVMForCreate(vmCtx context.VirtualMachineContextA2, vcClient *vim25.Client, ...) ([]Recommendation, error)
- func MakePlacementDecision(recommendations map[string][]Recommendation) (string, Recommendation)
- func PlaceVMForCreate(ctx goctx.Context, cluster *object.ClusterComputeResource, ...) ([]Recommendation, error)
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPlacementRelocateSpec ¶
func CheckPlacementRelocateSpec(spec *types.VirtualMachineRelocateSpec) error
func CloneVMRelocateSpec ¶
func CloneVMRelocateSpec( vmCtx context.VirtualMachineContextA2, cluster *object.ClusterComputeResource, vmRef types.ManagedObjectReference, cloneSpec *types.VirtualMachineCloneSpec) (*types.VirtualMachineRelocateSpec, error)
func ParseRelocateVMResponse ¶
func ParseRelocateVMResponse( vmCtx context.VirtualMachineContextA2, res *types.PlacementResult) *types.VirtualMachineRelocateSpec
Types ¶
type Recommendation ¶
type Recommendation struct { PoolMoRef types.ManagedObjectReference HostMoRef *types.ManagedObjectReference }
Recommendation is the info about a placement recommendation.
func ClusterPlaceVMForCreate ¶
func ClusterPlaceVMForCreate( vmCtx context.VirtualMachineContextA2, vcClient *vim25.Client, resourcePoolsMoRefs []types.ManagedObjectReference, configSpec *types.VirtualMachineConfigSpec, needsHost bool) ([]Recommendation, error)
ClusterPlaceVMForCreate determines the suitable cluster placement among the specified ResourcePools.
func MakePlacementDecision ¶
func MakePlacementDecision(recommendations map[string][]Recommendation) (string, Recommendation)
MakePlacementDecision selects one of the recommendations for placement.
func PlaceVMForCreate ¶
func PlaceVMForCreate( ctx goctx.Context, cluster *object.ClusterComputeResource, configSpec *types.VirtualMachineConfigSpec) ([]Recommendation, error)
PlaceVMForCreate determines the suitable placement candidates in the cluster.
type Result ¶
type Result struct { ZonePlacement bool InstanceStoragePlacement bool ZoneName string HostMoRef *types.ManagedObjectReference PoolMoRef types.ManagedObjectReference }
func Placement ¶
func Placement( vmCtx context.VirtualMachineContextA2, client ctrlclient.Client, vcClient *vim25.Client, configSpec *types.VirtualMachineConfigSpec, childRPName string) (*Result, error)
Placement determines if the VM needs placement, and if so, determines where to place the VM and updates the Labels and Annotations with the placement decision.
Click to show internal directories.
Click to hide internal directories.