controllers

package
v0.0.0-...-27a102d Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MapCollectionToResourceURI = map[string]string{
	"systemCollection":  "/redfish/v1/Systems",
	"managerCollection": "/redfish/v1/Managers",
	"chassisCollection": "/redfish/v1/Chassis",
	"taskCollection":    "/redfish/v1/TaskService/Tasks",
	"fabricCollection":  "/redfish/v1/Fabrics",
	"allResources":      "All",
}

MapCollectionToResourceURI maps collection to corresponding collection URI used while sending create request to ODIM

View Source
var MapResourceURIToCollection = map[string]string{
	"/redfish/v1/Systems":           "systemCollection",
	"/redfish/v1/Managers":          "managerCollection",
	"/redfish/v1/Chassis":           "chassisCollection",
	"/redfish/v1/TaskService/Tasks": "taskCollection",
	"/redfish/v1/Fabrics":           "fabricCollection",
}

MapResourceURIToCollection maps collection URI to collection name used to map the eventsubscription response from ODIM

Functions

This section is empty.

Types

type EventSubscriptionInterface

type EventSubscriptionInterface interface {
	CreateEventsubscription(eventSubObj *infraiov1.Eventsubscription, namespacedName types.NamespacedName) (bool, error)
	UpdateEventsubscriptionStatus(eventSubscriptionID string) bool
	GetEventSubscriptionRequest() ([]byte, error)
	DeleteEventsubscription() bool
	GetSystemIDFromURI(resourceURIArr []string, resourceOID string) string
	UpdateEventSubscriptionLabels()
	MapOriginResources(subscriptionDetails map[string]interface{}) ([]string, error)
	GetMessageRegistryDetails(bmcObj *infraiov1.Bmc, registryName string) ([]string, []map[string]interface{})
	ValidateMessageIDs(messageIDs []string) error
}

EventSubscriptionInterface declares method signatures for EventSubscription

func GetEventSubscriptionUtils

func GetEventSubscriptionUtils(ctx context.Context, restClient restclient.RestClientInterface, commonRec utils.ReconcilerInterface, eventSubObj *infraiov1.Eventsubscription, ns string) EventSubscriptionInterface

GetEventSubscriptionUtils will create and return an object of eventsubscriptionUtils

type EventsMessageRegistryReconciler

type EventsMessageRegistryReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

EventsMessageRegistryReconciler reconciles a EventsMessageRegistry object

func (*EventsMessageRegistryReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the EventsMessageRegistry object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile

func (*EventsMessageRegistryReconciler) SetupWithManager

func (r *EventsMessageRegistryReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type EventsubscriptionReconciler

type EventsubscriptionReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

EventsubscriptionReconciler reconciles a Eventsubscription object

func (*EventsubscriptionReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Eventsubscription object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile

func (*EventsubscriptionReconciler) SetupWithManager

func (r *EventsubscriptionReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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