nutanix

package
v2.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterCategoryName = "KKPCluster"
	ProjectCategoryName = "KKPProject"

	DefaultProject = "default"
)

Variables

This section is empty.

Functions

func CategoryValue

func CategoryValue(clusterName string) string

func GetCategories added in v2.21.0

func GetCategories(ctx context.Context, client *ClientSet) ([]nutanixv3.CategoryKeyStatus, error)

func GetCategoryValues added in v2.21.0

func GetCategoryValues(ctx context.Context, client *ClientSet, category string) ([]nutanixv3.CategoryValueStatus, error)

func GetClusterByName

func GetClusterByName(ctx context.Context, client *ClientSet, name string) (*nutanixv3.ClusterIntentResponse, error)

func GetClusters added in v2.19.1

func GetClusters(ctx context.Context, client *ClientSet) ([]nutanixv3.ClusterIntentResponse, error)

func GetProjectByName

func GetProjectByName(ctx context.Context, client *ClientSet, name string) (*nutanixv3.Project, error)

func GetProjects added in v2.19.1

func GetProjects(ctx context.Context, client *ClientSet) ([]nutanixv3.Project, error)

func GetSubnetByName

func GetSubnetByName(ctx context.Context, client *ClientSet, name, clusterID string) (*nutanixv3.SubnetIntentResponse, error)

func GetSubnets added in v2.19.1

func GetSubnets(ctx context.Context, client *ClientSet, clusterName, projectName string) ([]nutanixv3.SubnetIntentResponse, error)

func ValidateCredentials added in v2.21.0

func ValidateCredentials(ctx context.Context, endpoint string, port *int32, allowInsecure *bool, proxyURL, username, password string) error

Types

type ClientSet

type ClientSet struct {
	Prism *nutanixv3.Client
}

func GetClientSetWithCreds added in v2.19.1

func GetClientSetWithCreds(endpoint string, port *int32, allowInsecure *bool, proxyURL, username, password string) (*ClientSet, error)

type ErrorResponse

type ErrorResponse struct {
	APIVersion  string             `json:"api_version"`
	Kind        string             `json:"kind"`
	State       string             `json:"state"`
	MessageList []ErrorResponseMsg `json:"message_list"`
	Code        int32              `json:"code"`
}

ErrorResponse matches the struct in upstream, but is copied here because upstream has its version in an internal package. Can be removed if and when Nutanix SDK does not return stringified errors that we have to parse ourselves.

func ParseNutanixError

func ParseNutanixError(err error) (*ErrorResponse, error)

type ErrorResponseMsg

type ErrorResponseMsg struct {
	Message string `json:"message"`
	Reason  string `json:"reason"`
}

type Nutanix

type Nutanix struct {
	// contains filtered or unexported fields
}

func NewCloudProvider

func NewCloudProvider(dc *kubermaticv1.Datacenter, secretKeyGetter provider.SecretKeySelectorValueFunc) (*Nutanix, error)

func (*Nutanix) CleanUpCloudProvider

func (n *Nutanix) CleanUpCloudProvider(ctx context.Context, cluster *kubermaticv1.Cluster, update provider.ClusterUpdater) (*kubermaticv1.Cluster, error)

func (*Nutanix) ClusterNeedsReconciling added in v2.25.0

func (*Nutanix) ClusterNeedsReconciling(cluster *kubermaticv1.Cluster) bool

func (*Nutanix) DefaultCloudSpec

func (n *Nutanix) DefaultCloudSpec(_ context.Context, spec *kubermaticv1.ClusterSpec) error

func (*Nutanix) InitializeCloudProvider

func (n *Nutanix) InitializeCloudProvider(ctx context.Context, cluster *kubermaticv1.Cluster, update provider.ClusterUpdater) (*kubermaticv1.Cluster, error)

func (*Nutanix) ReconcileCluster

func (n *Nutanix) ReconcileCluster(ctx context.Context, cluster *kubermaticv1.Cluster, update provider.ClusterUpdater) (*kubermaticv1.Cluster, error)

func (*Nutanix) ValidateCloudSpec

func (n *Nutanix) ValidateCloudSpec(ctx context.Context, spec kubermaticv1.CloudSpec) error

func (*Nutanix) ValidateCloudSpecUpdate

func (n *Nutanix) ValidateCloudSpecUpdate(_ context.Context, oldSpec kubermaticv1.CloudSpec, newSpec kubermaticv1.CloudSpec) error

Jump to

Keyboard shortcuts

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