Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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") )
var NutanixClientCache = v3.NewClientCache(v3.WithSessionAuth(true))
NutanixClientCache is the cache of prism clients to be shared across the different controllers
var NutanixClientCacheV4 = v4.NewClientCache(v4.WithSessionAuth(true))
NutanixClientCacheV4 is the cache of prism clients to be shared across the different controllers
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 WaitForTaskToSucceed ¶ added in v1.2.5
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 NewHelper(secretInformer coreinformers.SecretInformer, cmInformer coreinformers.ConfigMapInformer) *NutanixClientHelper
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.