client

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 16 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")

	ErrPrismIUsernameNotSet = fmt.Errorf("could not create client because username was not set")
	ErrPrismIPasswordNotSet = fmt.Errorf("could not create client because password was not set")

	ErrCredentialRefNotSet = fmt.Errorf("credentialRef must be set on CAPX manager")
)

Functions

func Build added in v1.3.3

func Build(creds prismgoclient.Credentials, additionalTrustBundle string) (*nutanixClientV3.Client, error)

func GetTaskStatus added in v1.3.0

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

func WaitForTaskToSucceed added in v1.3.0

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

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

Types

type NutanixClientHelper added in v0.5.2

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

func NewHelper added in v1.3.3

func (*NutanixClientHelper) BuildClientForNutanixClusterWithFallback added in v1.3.3

func (n *NutanixClientHelper) BuildClientForNutanixClusterWithFallback(ctx context.Context, nutanixCluster *infrav1.NutanixCluster) (*nutanixClientV3.Client, error)

BuildClientForNutanixClusterWithFallback builds a Nutanix Client from the information provided in nutanixCluster.

Jump to

Keyboard shortcuts

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