Documentation
¶
Index ¶
- type ClusterTemplateBuilder
- type HardwareManagerBuilder
- func ListHardwareManagers(apiClient *clients.Settings, options ...runtimeclient.ListOptions) ([]*HardwareManagerBuilder, error)
- func NewHwmgrBuilder(apiClient *clients.Settings, name, nsname string, ...) *HardwareManagerBuilder
- func PullHwmgr(apiClient *clients.Settings, name, nsname string) (*HardwareManagerBuilder, error)
- func (builder *HardwareManagerBuilder) Create() (*HardwareManagerBuilder, error)
- func (builder *HardwareManagerBuilder) Delete() error
- func (builder *HardwareManagerBuilder) Exists() bool
- func (builder *HardwareManagerBuilder) Get() (*pluginv1alpha1.HardwareManager, error)
- func (builder *HardwareManagerBuilder) Update(force bool) (*HardwareManagerBuilder, error)
- func (builder *HardwareManagerBuilder) WaitForCondition(expected metav1.Condition, timeout time.Duration) (*HardwareManagerBuilder, error)
- func (builder *HardwareManagerBuilder) WithDellData(data pluginv1alpha1.DellData) *HardwareManagerBuilder
- func (builder *HardwareManagerBuilder) WithLoopbackData(data pluginv1alpha1.LoopbackData) *HardwareManagerBuilder
- type NodeBuilder
- type NodePoolBuilder
- type ProvisioningRequestBuilder
- func (builder *ProvisioningRequestBuilder) Create() (*ProvisioningRequestBuilder, error)
- func (builder *ProvisioningRequestBuilder) Delete() error
- func (builder *ProvisioningRequestBuilder) DeleteAndWait(timeout time.Duration) error
- func (builder *ProvisioningRequestBuilder) Exists() bool
- func (builder *ProvisioningRequestBuilder) Get() (*provisioningv1alpha1.ProvisioningRequest, error)
- func (builder *ProvisioningRequestBuilder) GetTemplateParameters() (map[string]any, error)
- func (builder *ProvisioningRequestBuilder) Update() (*ProvisioningRequestBuilder, error)
- func (builder *ProvisioningRequestBuilder) WaitForCondition(expected metav1.Condition, timeout time.Duration) (*ProvisioningRequestBuilder, error)
- func (builder *ProvisioningRequestBuilder) WaitUntilFulfilled(timeout time.Duration) (*ProvisioningRequestBuilder, error)
- func (builder *ProvisioningRequestBuilder) WithTemplateParameter(key string, value any) *ProvisioningRequestBuilder
- func (builder *ProvisioningRequestBuilder) WithTemplateParameters(templateParameters map[string]any) *ProvisioningRequestBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterTemplateBuilder ¶
type ClusterTemplateBuilder struct { // Definition of the ClusterTemplate used to create the resource. Definition *provisioningv1alpha1.ClusterTemplate // Object of the ClusterTemplate as it is on the cluster. Object *provisioningv1alpha1.ClusterTemplate // contains filtered or unexported fields }
ClusterTemplateBuilder provides a struct to inferface with ClusterTemplate resources on a specific cluster.
func ListClusterTemplates ¶
func ListClusterTemplates( apiClient *clients.Settings, options ...runtimeclient.ListOptions) ([]*ClusterTemplateBuilder, error)
ListClusterTemplates returns a list of ClusterTemplates in all namespaces, using the provided options.
func PullClusterTemplate ¶
func PullClusterTemplate(apiClient *clients.Settings, name, nsname string) (*ClusterTemplateBuilder, error)
PullClusterTemplate pulls an existing ClusterTemplate into a ClusterTemplateBuilder struct.
func (*ClusterTemplateBuilder) Exists ¶
func (builder *ClusterTemplateBuilder) Exists() bool
Exists checks whether this ClusterTemplate exists on the cluster.
func (*ClusterTemplateBuilder) Get ¶
func (builder *ClusterTemplateBuilder) Get() (*provisioningv1alpha1.ClusterTemplate, error)
Get returns the ClusterTemplate object if found.
func (*ClusterTemplateBuilder) WaitForCondition ¶
func (builder *ClusterTemplateBuilder) WaitForCondition( expected metav1.Condition, timeout time.Duration) (*ClusterTemplateBuilder, error)
WaitForCondition waits up to the provided timeout for a condition matching expected. It checks only the Type, Status, Reason, and Message fields. For the message, it matches if the message contains the expected. Zero fields in the expected condition are ignored.
type HardwareManagerBuilder ¶
type HardwareManagerBuilder struct { // Definition of the HardwareManager used to create the resource. Definition *pluginv1alpha1.HardwareManager // Object of the HardwareManager as it is on the cluster. Object *pluginv1alpha1.HardwareManager // contains filtered or unexported fields }
HardwareManagerBuilder provides a struct to interface with HardwareManager resources on a specific cluster.
func ListHardwareManagers ¶
func ListHardwareManagers( apiClient *clients.Settings, options ...runtimeclient.ListOptions) ([]*HardwareManagerBuilder, error)
ListHardwareManagers returns a list of HardwareManagers in all namespaces, using the provided options.
func NewHwmgrBuilder ¶
func NewHwmgrBuilder(apiClient *clients.Settings, name, nsname string, adaptorID pluginv1alpha1.HardwareManagerAdaptorID) *HardwareManagerBuilder
NewHwmgrBuilder creates a new instance of a HardwareManager builder. If adaptorID is dell-hwmgr, WithDellData must be called before creating the builder.
func PullHwmgr ¶
func PullHwmgr(apiClient *clients.Settings, name, nsname string) (*HardwareManagerBuilder, error)
PullHwmgr pulls an existing HardwareManager into a HardwareManagerBuilder struct.
func (*HardwareManagerBuilder) Create ¶
func (builder *HardwareManagerBuilder) Create() (*HardwareManagerBuilder, error)
Create makes a HardwareManager on the cluster if it does not already exist.
func (*HardwareManagerBuilder) Delete ¶
func (builder *HardwareManagerBuilder) Delete() error
Delete removes a HardwareManager from the cluster if it exists.
func (*HardwareManagerBuilder) Exists ¶
func (builder *HardwareManagerBuilder) Exists() bool
Exists checks whether this HardwareManager exists on the cluster.
func (*HardwareManagerBuilder) Get ¶
func (builder *HardwareManagerBuilder) Get() (*pluginv1alpha1.HardwareManager, error)
Get returns the HardwareManager object if found.
func (*HardwareManagerBuilder) Update ¶
func (builder *HardwareManagerBuilder) Update(force bool) (*HardwareManagerBuilder, error)
Update changes the existing Hardwaremanager resource on the cluster, falling back to deleting and recreating if the update fails when force is set.
func (*HardwareManagerBuilder) WaitForCondition ¶
func (builder *HardwareManagerBuilder) WaitForCondition( expected metav1.Condition, timeout time.Duration) (*HardwareManagerBuilder, error)
WaitForCondition waits up to the provided timeout for a condition matching expected. It checks only the Type, Status, Reason, and Message fields. For the message, it matches if the message contains the expected. Zero fields in the expected condition are ignored.
func (*HardwareManagerBuilder) WithDellData ¶
func (builder *HardwareManagerBuilder) WithDellData(data pluginv1alpha1.DellData) *HardwareManagerBuilder
WithDellData sets the DellData of a HardwareManager with AdaptorID dell-hwmgr.
func (*HardwareManagerBuilder) WithLoopbackData ¶
func (builder *HardwareManagerBuilder) WithLoopbackData(data pluginv1alpha1.LoopbackData) *HardwareManagerBuilder
WithLoopbackData sets the LoopbackData of a HardwareManager with AdaptorID loopback.
type NodeBuilder ¶
type NodeBuilder struct { // Definition of the Node used to create the resource. Definition *hardwaremanagementv1alpha1.Node // Object of the Node as it is on the cluster. Object *hardwaremanagementv1alpha1.Node // contains filtered or unexported fields }
NodeBuilder provides a struct to inferface with Node resources on a specific cluster.
func ListNodes ¶
func ListNodes(apiClient *clients.Settings, options ...runtimeclient.ListOptions) ([]*NodeBuilder, error)
ListNodes returns a list of Nodes in all namespaces, using the provided options.
func PullNode ¶
func PullNode(apiClient *clients.Settings, name, nsname string) (*NodeBuilder, error)
PullNode pulls an existing Node into a NodeBuilder struct.
func (*NodeBuilder) Exists ¶
func (builder *NodeBuilder) Exists() bool
Exists checks whether this Node exists on the cluster.
func (*NodeBuilder) Get ¶
func (builder *NodeBuilder) Get() (*hardwaremanagementv1alpha1.Node, error)
Get returns the Node object if found.
type NodePoolBuilder ¶
type NodePoolBuilder struct { // Definition of the NodePool used to create the resource. Definition *hardwaremanagementv1alpha1.NodePool // Object of the NodePool as it is on the cluster. Object *hardwaremanagementv1alpha1.NodePool // contains filtered or unexported fields }
NodePoolBuilder provides a struct to inferface with NodePool resources on a specific cluster.
func ListNodePools ¶
func ListNodePools(apiClient *clients.Settings, options ...runtimeclient.ListOptions) ([]*NodePoolBuilder, error)
ListNodePools returns a list of NodePools in all namespaces, using the provided options.
func PullNodePool ¶
func PullNodePool(apiClient *clients.Settings, name, nsname string) (*NodePoolBuilder, error)
PullNodePool pulls an existing NodePool into a NodePoolBuilder struct.
func (*NodePoolBuilder) Exists ¶
func (builder *NodePoolBuilder) Exists() bool
Exists checks whether this NodePool exists on the cluster.
func (*NodePoolBuilder) Get ¶
func (builder *NodePoolBuilder) Get() (*hardwaremanagementv1alpha1.NodePool, error)
Get returns the NodePool object if found.
type ProvisioningRequestBuilder ¶
type ProvisioningRequestBuilder struct { // Definition of the ProvisioningRequest used to create the resource. Definition *provisioningv1alpha1.ProvisioningRequest // Object of the ProvisioningRequest as it is on the cluster. Object *provisioningv1alpha1.ProvisioningRequest // contains filtered or unexported fields }
ProvisioningRequestBuilder provides a struct to inferface with ProvisioningRequest resources on a specific cluster.
func NewPRBuilder ¶
func NewPRBuilder( apiClient *clients.Settings, name, templateName, templateVersion string) *ProvisioningRequestBuilder
NewPRBuilder creates a new instance of a ProvisioningRequest builder.
func PullPR ¶
func PullPR(apiClient *clients.Settings, name string) (*ProvisioningRequestBuilder, error)
PullPR pulls an existing ProvisioningRequest into a Builder struct.
func (*ProvisioningRequestBuilder) Create ¶
func (builder *ProvisioningRequestBuilder) Create() (*ProvisioningRequestBuilder, error)
Create makes a ProvisioningRequest on the cluster if it does not already exist.
func (*ProvisioningRequestBuilder) Delete ¶
func (builder *ProvisioningRequestBuilder) Delete() error
Delete removes a ProvisioningRequest from the cluster if it exists.
func (*ProvisioningRequestBuilder) DeleteAndWait ¶
func (builder *ProvisioningRequestBuilder) DeleteAndWait(timeout time.Duration) error
DeleteAndWait deletes the ProvisioningRequest then waits up to timeout until the ProvisioningRequest no longer exists.
func (*ProvisioningRequestBuilder) Exists ¶
func (builder *ProvisioningRequestBuilder) Exists() bool
Exists checks whether the given ProvisioningRequest exists on the cluster.
func (*ProvisioningRequestBuilder) Get ¶
func (builder *ProvisioningRequestBuilder) Get() (*provisioningv1alpha1.ProvisioningRequest, error)
Get returns the ProvisioningRequest object if found.
func (*ProvisioningRequestBuilder) GetTemplateParameters ¶
func (builder *ProvisioningRequestBuilder) GetTemplateParameters() (map[string]any, error)
GetTemplateParameters unmarshals the raw JSON stored in the TemplateParameters in the Definition, returning an empty rather than nil map if TemplateParameters is empty.
func (*ProvisioningRequestBuilder) Update ¶
func (builder *ProvisioningRequestBuilder) Update() (*ProvisioningRequestBuilder, error)
Update changes the existing ProvisioningRequest resource on the cluster. Since deleting a ProvisioningRequest is a non-trivial operation and corresponds to deleting a cluster, there is no option to fall back to deleting and recreating the ProvisioningRequest.
func (*ProvisioningRequestBuilder) WaitForCondition ¶
func (builder *ProvisioningRequestBuilder) WaitForCondition( expected metav1.Condition, timeout time.Duration) (*ProvisioningRequestBuilder, error)
WaitForCondition waits up to the provided timeout for a condition matching expected. It checks only the Type, Status, Reason, and Message fields. For the message, it matches if the message contains the expected. Zero fields in the expected condition are ignored.
func (*ProvisioningRequestBuilder) WaitUntilFulfilled ¶
func (builder *ProvisioningRequestBuilder) WaitUntilFulfilled( timeout time.Duration) (*ProvisioningRequestBuilder, error)
WaitUntilFulfilled waits up to timeout until the ProvisioningRequest is in the fulfilled phase. Changes to the template will not be accepted until it is fulfilled.
func (*ProvisioningRequestBuilder) WithTemplateParameter ¶
func (builder *ProvisioningRequestBuilder) WithTemplateParameter(key string, value any) *ProvisioningRequestBuilder
WithTemplateParameter sets key to value in the TemplateParameters field.
func (*ProvisioningRequestBuilder) WithTemplateParameters ¶
func (builder *ProvisioningRequestBuilder) WithTemplateParameters( templateParameters map[string]any) *ProvisioningRequestBuilder
WithTemplateParameters marshals the provided map into JSON and stores it in the builder Definition. Nil maps are converted to empty maps before marshaling.