Documentation ¶
Index ¶
- Constants
- Variables
- func GetAvailabilityZone(ctx context.Context, client ctrlclient.Client, availabilityZoneName string) (topologyv1.AvailabilityZone, error)
- func GetAvailabilityZones(ctx context.Context, client ctrlclient.Client) ([]topologyv1.AvailabilityZone, error)
- func GetNamespaceFolderAndRPMoID(ctx context.Context, client ctrlclient.Client, ...) (string, string, error)
- func GetNamespaceFolderAndRPMoIDs(ctx context.Context, client ctrlclient.Client, namespace string) (string, []string, error)
- func GetNamespaceFolderMoID(ctx context.Context, client ctrlclient.Client, namespace string) (string, error)
- func LookupZoneForClusterMoID(ctx context.Context, client ctrlclient.Client, clusterMoID string) (string, error)
Constants ¶
View Source
const ( // DefaultAvailabilityZoneName is the name of the default availability // zone used in backwards compatibility mode. DefaultAvailabilityZoneName = "default" // KubernetesTopologyZoneLabelKey is the label used to specify the // availability zone for a VM. KubernetesTopologyZoneLabelKey = "topology.kubernetes.io/zone" // NamespaceRPAnnotationKey is the annotation value set by WCP that // indicates the managed object ID of the resource pool for a given // namespace. NamespaceRPAnnotationKey = "vmware-system-resource-pool" // NamespaceFolderAnnotationKey is the annotation value set by WCP // that indicates the managed object ID of the folder for a given // namespace. NamespaceFolderAnnotationKey = "vmware-system-vm-folder" )
Variables ¶
View Source
var ( // ErrNoAvailabilityZones occurs when no availability zones are detected. ErrNoAvailabilityZones = errors.New("no availability zones") // ErrWcpFaultDomainsFSSIsEnabled occurs when a function is invoked that // is disabled when the WCP_FaultDomains FSS is enabled. ErrWcpFaultDomainsFSSIsEnabled = errors.New("wcp fault domains fss is enabled") )
Functions ¶
func GetAvailabilityZone ¶
func GetAvailabilityZone( ctx context.Context, client ctrlclient.Client, availabilityZoneName string) (topologyv1.AvailabilityZone, error)
GetAvailabilityZone returns a named AvailabilityZone resource.
func GetAvailabilityZones ¶
func GetAvailabilityZones( ctx context.Context, client ctrlclient.Client) ([]topologyv1.AvailabilityZone, error)
GetAvailabilityZones returns a list of the AvailabilityZone resources.
func GetNamespaceFolderAndRPMoID ¶
func GetNamespaceFolderAndRPMoID( ctx context.Context, client ctrlclient.Client, availabilityZoneName, namespace string) (string, string, error)
GetNamespaceFolderAndRPMoID returns the Folder and ResourcePool MoID for the zone and namespace.
func GetNamespaceFolderAndRPMoIDs ¶
func GetNamespaceFolderAndRPMoIDs( ctx context.Context, client ctrlclient.Client, namespace string) (string, []string, error)
GetNamespaceFolderAndRPMoIDs returns the Folder and ResourcePool MoIDs for the namespace, across all zones.
func GetNamespaceFolderMoID ¶
func GetNamespaceFolderMoID( ctx context.Context, client ctrlclient.Client, namespace string) (string, error)
GetNamespaceFolderMoID returns the FolderMoID for the namespace.
func LookupZoneForClusterMoID ¶
func LookupZoneForClusterMoID( ctx context.Context, client ctrlclient.Client, clusterMoID string) (string, error)
LookupZoneForClusterMoID returns the zone for the given Cluster MoID.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.