cluster

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClusterUpdateSpec added in v0.3.0

func CreateClusterUpdateSpec(data *schema.ResourceData, markForDeletion bool) (*models.ClusterUpdateSpec, error)

func FlattenCluster added in v0.3.0

func FlattenCluster(ctx context.Context, clusterObj *models.Cluster, apiClient *client.VcfClient) (*map[string]interface{}, error)

func FlattenHost

func FlattenHost(host *models.Host) *map[string]interface{}

func FlattenHostReference added in v0.3.0

func FlattenHostReference(host *models.HostReference) *map[string]interface{}

func HostSpecSchema

func HostSpecSchema() *schema.Resource

HostSpecSchema this helper function extracts the Host schema, so that it's made available for both workload domain and cluster creation.

func ImportCluster added in v0.3.0

func ImportCluster(ctx context.Context, data *schema.ResourceData, apiClient *client.VcfClient,
	clusterId string) ([]*schema.ResourceData, error)

func SetExpansionOrContractionSpec added in v0.3.0

func SetExpansionOrContractionSpec(updateSpec *models.ClusterUpdateSpec,
	oldHostsList, newHostsList []interface{}) (*models.ClusterUpdateSpec, error)

SetExpansionOrContractionSpec sets ClusterExpansionSpec or ClusterContractionSpec to a provided ClusterUpdateSpec depending on weather hosts are being added or removed.

func SetStretchOrUnstretchSpec added in v0.8.5

func SetStretchOrUnstretchSpec(updateSpec *models.ClusterUpdateSpec, data *schema.ResourceData) (*models.ClusterUpdateSpec, error)

SetStretchOrUnstretchSpec sets ClusterStretchSpec or ClusterUnstretchSpec to a provided ClusterUpdateSpec depending on weather a witness host is being added or removed.

func TryConvertResourceDataToClusterSpec added in v0.3.0

func TryConvertResourceDataToClusterSpec(data *schema.ResourceData) (*models.ClusterSpec, error)

func TryConvertToClusterSpec added in v0.3.0

func TryConvertToClusterSpec(object map[string]interface{}) (*models.ClusterSpec, error)

TryConvertToClusterSpec is a convenience method that converts a map[string]interface{} received from the Terraform SDK to an API struct, used in VCF API calls.

func TryConvertToHostSpec

func TryConvertToHostSpec(object map[string]interface{}) (*models.HostSpec, error)

func ValidateClusterUpdateOperation added in v0.3.0

func ValidateClusterUpdateOperation(ctx context.Context, clusterId string,
	clusterUpdateSpec *models.ClusterUpdateSpec, apiClient *client.VcfClient) diag.Diagnostics

Types

type EmptySpec added in v0.8.5

type EmptySpec struct{}

Jump to

Keyboard shortcuts

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