Documentation ¶
Index ¶
- func ClusterMinCPUFreq(ctx goctx.Context, cluster *object.ClusterComputeResource) (uint64, error)
- func CreateFolder(ctx goctx.Context, vimClient *vim25.Client, parentFolderMoID, childName string) (string, error)
- func CreateOrUpdateChildResourcePool(ctx goctx.Context, vimClient *vim25.Client, parentRPMoID string, ...) (string, error)
- func DeleteChildFolder(ctx goctx.Context, vimClient *vim25.Client, parentFolderMoID, childName string) error
- func DeleteChildResourcePool(ctx goctx.Context, vimClient *vim25.Client, parentRPMoID, childName string) error
- func DoesChildFolderExist(ctx goctx.Context, vimClient *vim25.Client, parentFolderMoID, childName string) (bool, error)
- func DoesChildResourcePoolExist(ctx goctx.Context, vimClient *vim25.Client, parentRPMoID, childName string) (bool, error)
- func GetChildFolder(ctx goctx.Context, parentFolder *object.Folder, childName string) (*object.Folder, error)
- func GetChildResourcePool(ctx goctx.Context, parentRP *object.ResourcePool, childName string) (*object.ResourcePool, error)
- func GetESXHostFQDN(ctx context.Context, vimClient *vim25.Client, hostMoID string) (string, error)
- func GetFolderByMoID(ctx goctx.Context, finder *find.Finder, folderMoID string) (*object.Folder, error)
- func GetResourcePoolByMoID(ctx goctx.Context, finder *find.Finder, rpMoID string) (*object.ResourcePool, error)
- func GetResourcePoolOwnerMoRef(ctx goctx.Context, vimClient *vim25.Client, rpMoID string) (types.ManagedObjectReference, error)
- func GetVirtualMachine(vmCtx context.VirtualMachineContextA2, k8sClient ctrlclient.Client, ...) (*object.VirtualMachine, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterMinCPUFreq ¶
ClusterMinCPUFreq returns the minimum frequency across all the hosts in the cluster. This is needed to convert the CPU requirements specified in cores to MHz. vSphere core is assumed to be equivalent to the value of min frequency. This function is adapted from wcp schedext.
func CreateFolder ¶
func CreateFolder( ctx goctx.Context, vimClient *vim25.Client, parentFolderMoID, childName string) (string, error)
CreateFolder creates the named child Folder under the parent Folder.
func CreateOrUpdateChildResourcePool ¶
func CreateOrUpdateChildResourcePool( ctx goctx.Context, vimClient *vim25.Client, parentRPMoID string, rpSpec *vmopv1.ResourcePoolSpec) (string, error)
CreateOrUpdateChildResourcePool creates or updates the child ResourcePool under the parent ResourcePool.
func DeleteChildFolder ¶
func DeleteChildFolder( ctx goctx.Context, vimClient *vim25.Client, parentFolderMoID, childName string) error
DeleteChildFolder deletes the child Folder under the parent Folder.
func DeleteChildResourcePool ¶
func DeleteChildResourcePool( ctx goctx.Context, vimClient *vim25.Client, parentRPMoID, childName string) error
DeleteChildResourcePool deletes the child ResourcePool under the parent ResourcePool.
func DoesChildFolderExist ¶
func DoesChildFolderExist( ctx goctx.Context, vimClient *vim25.Client, parentFolderMoID, childName string) (bool, error)
DoesChildFolderExist returns if the named child Folder exists under the parent Folder.
func DoesChildResourcePoolExist ¶
func DoesChildResourcePoolExist( ctx goctx.Context, vimClient *vim25.Client, parentRPMoID, childName string) (bool, error)
DoesChildResourcePoolExist returns if the named child ResourcePool exists under the parent ResourcePool.
func GetChildFolder ¶
func GetChildFolder( ctx goctx.Context, parentFolder *object.Folder, childName string) (*object.Folder, error)
GetChildFolder gets the named child Folder from the parent Folder.
func GetChildResourcePool ¶
func GetChildResourcePool( ctx goctx.Context, parentRP *object.ResourcePool, childName string) (*object.ResourcePool, error)
GetChildResourcePool gets the named child ResourcePool from the parent ResourcePool.
func GetESXHostFQDN ¶
GetESXHostFQDN returns the ESX host's FQDN.
func GetFolderByMoID ¶
func GetFolderByMoID( ctx goctx.Context, finder *find.Finder, folderMoID string) (*object.Folder, error)
GetFolderByMoID returns the vim Folder for the MoID.
func GetResourcePoolByMoID ¶
func GetResourcePoolByMoID( ctx goctx.Context, finder *find.Finder, rpMoID string) (*object.ResourcePool, error)
GetResourcePoolByMoID returns the ResourcePool for the MoID.
func GetResourcePoolOwnerMoRef ¶
func GetResourcePoolOwnerMoRef( ctx goctx.Context, vimClient *vim25.Client, rpMoID string) (types.ManagedObjectReference, error)
GetResourcePoolOwnerMoRef returns the ClusterComputeResource MoID that owns the ResourcePool.
func GetVirtualMachine ¶
func GetVirtualMachine( vmCtx context.VirtualMachineContextA2, k8sClient ctrlclient.Client, vimClient *vim25.Client, datacenter *object.Datacenter, finder *find.Finder) (*object.VirtualMachine, error)
GetVirtualMachine gets the VM from VC, either by the MoID, UUID, or the inventory path.
Types ¶
This section is empty.