Documentation ¶
Index ¶
- Constants
- type Adaptor
- func (a *Adaptor) AllocateNode(ctx context.Context, hwmgrClient *hwmgrclient.HardwareManagerClient, ...) (string, error)
- func (a *Adaptor) CreateBMCSecret(ctx context.Context, hwmgrClient *hwmgrclient.HardwareManagerClient, ...) error
- func (a *Adaptor) CreateNode(ctx context.Context, nodepool *hwmgmtv1alpha1.NodePool, nodename string, ...) error
- func (a *Adaptor) GetAllocatedNodes(ctx context.Context, nodepool *hwmgmtv1alpha1.NodePool) (allocatedNodes []string, err error)
- func (a *Adaptor) HandleNodePool(ctx context.Context, hwmgr *pluginv1alpha1.HardwareManager, ...) (ctrl.Result, error)
- func (a *Adaptor) HandleNodePoolCreate(ctx context.Context, hwmgrClient *hwmgrclient.HardwareManagerClient, ...) (ctrl.Result, error)
- func (a *Adaptor) HandleNodePoolDeletion(ctx context.Context, hwmgr *pluginv1alpha1.HardwareManager, ...) error
- func (a *Adaptor) HandleNodePoolProcessing(ctx context.Context, hwmgrClient *hwmgrclient.HardwareManagerClient, ...) (ctrl.Result, error)
- func (a *Adaptor) HandleNodePoolSpecChanged(ctx context.Context, hwmgrClient *hwmgrclient.HardwareManagerClient, ...) (ctrl.Result, error)
- func (a *Adaptor) ProcessNewNodePool(ctx context.Context, hwmgrClient *hwmgrclient.HardwareManagerClient, ...) error
- func (a *Adaptor) ReleaseNodePool(ctx context.Context, hwmgrClient *hwmgrclient.HardwareManagerClient, ...) error
- func (a *Adaptor) SetupAdaptor(mgr ctrl.Manager) error
- func (a *Adaptor) UpdateNodeStatus(ctx context.Context, nodename string, resource hwmgrapi.RhprotoResource) error
- func (a *Adaptor) ValidateNodeConfig(ctx context.Context, resource hwmgrapi.RhprotoResource) error
- func (a *Adaptor) ValidateNodePool(nodepool *hwmgmtv1alpha1.NodePool) error
- type BMCCredentials
- type ExtensionInterface
- type ExtensionPort
- type ExtensionsLabel
Constants ¶
const ( NodePoolFSMCreate = iota NodePoolFSMProcessing NodePoolFSMSpecChanged NodePoolFSMNoop )
const ( ExtensionsNics = "O2-nics" ExtensionsNads = "nads" ExtensionsRemoteManagement = "RemoteManagement" ExtensionsVirtualMediaUrl = "virtualMediaUrl" LabelNameKey = "name" LabelLabelKey = "label" )
const (
JobIdAnnotation = "hwmgr-plugin.oran.openshift.io/jobId"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adaptor ¶
type Adaptor struct { client.Client Scheme *runtime.Scheme Logger *slog.Logger Namespace string AdaptorID pluginv1alpha1.HardwareManagerAdaptorID }
func NewAdaptor ¶
func (*Adaptor) AllocateNode ¶
func (a *Adaptor) AllocateNode( ctx context.Context, hwmgrClient *hwmgrclient.HardwareManagerClient, nodepool *hwmgmtv1alpha1.NodePool, resource hwmgrapi.RhprotoResource, nodegroupName string) (string, error)
AllocateNode processes a NodePool CR, allocating a free node for each specified nodegroup as needed
func (*Adaptor) CreateBMCSecret ¶
func (a *Adaptor) CreateBMCSecret( ctx context.Context, hwmgrClient *hwmgrclient.HardwareManagerClient, nodepool *hwmgmtv1alpha1.NodePool, nodename string, resource hwmgrapi.RhprotoResource) error
CreateBMCSecret creates the bmc-secret for a node
func (*Adaptor) CreateNode ¶
func (a *Adaptor) CreateNode(ctx context.Context, nodepool *hwmgmtv1alpha1.NodePool, nodename string, resource hwmgrapi.RhprotoResource, nodegroupName string) error
CreateNode creates a Node CR with specified attributes
func (*Adaptor) GetAllocatedNodes ¶
func (a *Adaptor) GetAllocatedNodes(ctx context.Context, nodepool *hwmgmtv1alpha1.NodePool) (allocatedNodes []string, err error)
GetAllocatedNodes gets a list of nodes allocated for the specified NodePool CR
func (*Adaptor) HandleNodePool ¶
func (a *Adaptor) HandleNodePool(ctx context.Context, hwmgr *pluginv1alpha1.HardwareManager, nodepool *hwmgmtv1alpha1.NodePool) (ctrl.Result, error)
func (*Adaptor) HandleNodePoolCreate ¶
func (a *Adaptor) HandleNodePoolCreate( ctx context.Context, hwmgrClient *hwmgrclient.HardwareManagerClient, hwmgr *pluginv1alpha1.HardwareManager, nodepool *hwmgmtv1alpha1.NodePool) (ctrl.Result, error)
HandleNodePoolCreate processes a new NodePool CR, creating a resource group on the hardware manager
func (*Adaptor) HandleNodePoolDeletion ¶
func (a *Adaptor) HandleNodePoolDeletion(ctx context.Context, hwmgr *pluginv1alpha1.HardwareManager, nodepool *hwmgmtv1alpha1.NodePool) error
func (*Adaptor) HandleNodePoolProcessing ¶
func (a *Adaptor) HandleNodePoolProcessing( ctx context.Context, hwmgrClient *hwmgrclient.HardwareManagerClient, hwmgr *pluginv1alpha1.HardwareManager, nodepool *hwmgmtv1alpha1.NodePool) (ctrl.Result, error)
HandleNodePoolProcessing checks the status of an in-progress NodePool, querying the hardware manager for the job status. If the job is completed, it queries for the resource group in order to create Node CRs corresponding to the allocated nodes.
func (*Adaptor) HandleNodePoolSpecChanged ¶
func (a *Adaptor) HandleNodePoolSpecChanged( ctx context.Context, hwmgrClient *hwmgrclient.HardwareManagerClient, hwmgr *pluginv1alpha1.HardwareManager, nodepool *hwmgmtv1alpha1.NodePool) (ctrl.Result, error)
func (*Adaptor) ProcessNewNodePool ¶
func (a *Adaptor) ProcessNewNodePool(ctx context.Context, hwmgrClient *hwmgrclient.HardwareManagerClient, hwmgr *pluginv1alpha1.HardwareManager, nodepool *hwmgmtv1alpha1.NodePool) error
ProcessNewNodePool sends a request to the hardware manager to create a resource group
func (*Adaptor) ReleaseNodePool ¶
func (a *Adaptor) ReleaseNodePool(ctx context.Context, hwmgrClient *hwmgrclient.HardwareManagerClient, hwmgr *pluginv1alpha1.HardwareManager, nodepool *hwmgmtv1alpha1.NodePool) error
ReleaseNodePool frees resources allocated to a NodePool
func (*Adaptor) SetupAdaptor ¶
SetupAdaptor sets up the Dell Hardware Manager Adaptor
func (*Adaptor) UpdateNodeStatus ¶
func (a *Adaptor) UpdateNodeStatus(ctx context.Context, nodename string, resource hwmgrapi.RhprotoResource) error
UpdateNodeStatus updates a Node CR status field with additional node information from the RhprotoResource
func (*Adaptor) ValidateNodeConfig ¶
ValidateNodeConfig performs basic data structure validation on the resource
func (*Adaptor) ValidateNodePool ¶
func (a *Adaptor) ValidateNodePool(nodepool *hwmgmtv1alpha1.NodePool) error
ValidateNodePool performs basic validation of the nodepool data
type BMCCredentials ¶
type ExtensionInterface ¶
type ExtensionInterface struct { Model string `json:"model,omitempty"` Name string `json:"name,omitempty"` Ports []ExtensionPort `json:"ports,omitempty"` }
type ExtensionPort ¶
type ExtensionPort struct { MACAddress string `json:"mac,omitempty"` MBPS int `json:"mbps,omitempty"` Labels []ExtensionsLabel `json:"Labels,omitempty"` }
type ExtensionsLabel ¶
Directories ¶
Path | Synopsis |
---|---|
Package api provides primitives to interact with the openapi HTTP API.
|
Package api provides primitives to interact with the openapi HTTP API. |