client

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPrismAddressNotSet  = fmt.Errorf("cannot get credentials if Prism Address is not set")
	ErrPrismPortNotSet     = fmt.Errorf("cannot get credentials if Prism Port is not set")
	ErrCredentialRefNotSet = fmt.Errorf("credentialRef must be set on CAPX manager")
)
View Source
var NutanixClientCache = v3.NewClientCache(v3.WithSessionAuth(true))

NutanixClientCache is the cache of prism clients to be shared across the different controllers

View Source
var NutanixClientCacheV4 = v4.NewClientCache(v4.WithSessionAuth(true))

NutanixClientCacheV4 is the cache of prism clients to be shared across the different controllers

View Source
var NutanixConvergedClientV4Cache = v4Converged.NewClientCache(v4.WithSessionAuth(true))

NutanixConvergedClientV4Cache is the cache of prism clients to be shared across the different controllers

Functions

func GetTaskStatus added in v1.2.5

func GetTaskStatus(ctx context.Context, client *nutanixClientV3.Client, uuid string) (string, error)

func WaitForTaskToSucceed added in v1.2.5

func WaitForTaskToSucceed(ctx context.Context, conn *nutanixClientV3.Client, uuid string) error

WaitForTaskToSucceed will poll every 2 seconds for the task with uuid to have status of "SUCCEEDED". The polling will stop if the ctx is cancelled, it's used for HTTP requests in the client and to control the polling. WaitForTaskToSucceed will exit immediately on an error getting the task.

Types

type CacheParams added in v1.2.5

type CacheParams struct {
	NutanixCluster          *v1beta1.NutanixCluster
	PrismManagementEndpoint *types.ManagementEndpoint
}

CacheParams is the struct that implements ClientCacheParams interface from prism-go-client

func (*CacheParams) Key added in v1.2.5

func (c *CacheParams) Key() string

Key is the namespace/name of te NutanixCluster CR

func (*CacheParams) ManagementEndpoint added in v1.2.5

func (c *CacheParams) ManagementEndpoint() types.ManagementEndpoint

ManagementEndpoint returns the management endpoint of the NutanixCluster CR

type NutanixClientHelper added in v0.5.2

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

func NewHelper added in v1.2.5

func (*NutanixClientHelper) BuildManagementEndpoint added in v1.2.5

func (n *NutanixClientHelper) BuildManagementEndpoint(ctx context.Context, nutanixCluster *infrav1.NutanixCluster) (*envTypes.ManagementEndpoint, error)

BuildManagementEndpoint takes in a NutanixCluster and constructs a ManagementEndpoint with all the information provided. If required information is not set, it will fallback to using information from /etc/nutanix/config/prismCentral, which is expected to be mounted in the Pod.

Jump to

Keyboard shortcuts

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