Documentation
¶
Index ¶
- Constants
- Variables
- func CalculateExponentialBackoff(retryCount int, config *BackoffConfig) time.Duration
- func CalculateExponentialBackoffForE2NodeSetOperation(retryCount int, operation string) time.Duration
- func CalculateExponentialBackoffForNetworkIntentOperation(retryCount int, operation string, constants *configPkg.Constants) time.Duration
- func CalculateExponentialBackoffWithConstants(retryCount int, baseDelay, maxDelay time.Duration, ...) time.Duration
- func ClearE2NodeSetRetryCount(e2nodeSet *nephoranv1.E2NodeSet, operation string)
- func ClearNetworkIntentRetryCount(networkIntent *nephoranv1.NetworkIntent, operation string)
- func GetE2NodeSetRetryCount(e2nodeSet *nephoranv1.E2NodeSet, operation string) int
- func GetMetricsEnabled() bool
- func GetNetworkIntentRetryCount(networkIntent *nephoranv1.NetworkIntent, operation string) int
- func SetE2NodeSetRetryCount(e2nodeSet *nephoranv1.E2NodeSet, operation string, count int)
- func SetNetworkIntentRetryCount(networkIntent *nephoranv1.NetworkIntent, operation string, count int)
- func UpdateCondition(conditions *[]metav1.Condition, newCondition metav1.Condition)
- type A1Policy
- type AuditTrailController
- type AuthContextKey
- type AuthenticatedE2NodeSetReconciler
- type AuthenticatedReconciler
- type BackoffConfig
- type CNFControllerConfig
- type CNFDeploymentContext
- type CNFDeploymentReconciler
- type CNFDeploymentRequest
- type CNFIntegrationConfig
- type CNFIntegrationManager
- type CNFRetryPolicy
- type CertificateAutomationCondition
- type CertificateAutomationConditionType
- type CertificateAutomationReconciler
- type CertificateAutomationSpec
- type CertificateAutomationStatus
- type CertificateValidationStatus
- type CleanupManagerInterface
- type ConcreteDependencies
- func (d *ConcreteDependencies) GetEventRecorder() record.EventRecorder
- func (d *ConcreteDependencies) GetGitClient() git.ClientInterface
- func (d *ConcreteDependencies) GetHTTPClient() *http.Client
- func (d *ConcreteDependencies) GetLLMClient() shared.ClientInterface
- func (d *ConcreteDependencies) GetPackageGenerator() *nephio.PackageGenerator
- type Config
- type ContextManagerInterface
- type ControllerAuthContext
- type ControllerInterface
- type ControllerMetrics
- func (m *ControllerMetrics) RecordFailure(namespace, name, errorType string)
- func (m *ControllerMetrics) RecordProcessingDuration(namespace, name, phase string, duration float64)
- func (m *ControllerMetrics) RecordReconcileError(namespace, name, errorType string)
- func (m *ControllerMetrics) RecordReconcileTotal(namespace, name, result string)
- func (m *ControllerMetrics) RecordSuccess(namespace, name string)
- func (m *ControllerMetrics) SetStatus(namespace, name, phase string, status float64)
- type Dependencies
- type DependencyError
- type DeploymentSpec
- type E2NodeConfigData
- type E2NodeSetReconciler
- type E2NodeStatusData
- type EndpointSpec
- type EventManagerInterface
- type GitClientInterface
- type GitOpsHandler
- func (g *GitOpsHandler) CleanupGitOpsResources(ctx context.Context, networkIntent *nephoranv1.NetworkIntent) error
- func (g *GitOpsHandler) CommitToGitOps(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, ...) (ctrl.Result, error)
- func (g *GitOpsHandler) GetPhaseName() ProcessingPhase
- func (g *GitOpsHandler) IsPhaseComplete(networkIntent *nephoranv1.NetworkIntent) bool
- func (g *GitOpsHandler) ProcessPhase(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, ...) (ctrl.Result, error)
- func (g *GitOpsHandler) VerifyDeployment(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, ...) (ctrl.Result, error)
- func (g *GitOpsHandler) VerifyDeploymentAdvanced(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, ...) (ctrl.Result, error)
- type GitOpsHandlerInterface
- type HealthCheckInterface
- type HealthCheckSpec
- type InterfaceConfiguration
- type LLMProcessor
- func (p *LLMProcessor) BuildTelecomEnhancedPrompt(ctx context.Context, intent string, processingCtx *ProcessingContext) (string, error)
- func (p *LLMProcessor) ExtractTelecomContext(intent string) map[string]interface{}
- func (p *LLMProcessor) GetPhaseName() ProcessingPhase
- func (p *LLMProcessor) IsPhaseComplete(networkIntent *nephoranv1.NetworkIntent) bool
- func (p *LLMProcessor) ProcessLLMPhase(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, ...) (ctrl.Result, error)
- func (p *LLMProcessor) ProcessPhase(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, ...) (ctrl.Result, error)
- type LLMProcessorInterface
- type MetricsManagerInterface
- type MonitoringSpec
- type NetworkFunctionDeploymentIntent
- type NetworkFunctionScaleIntent
- type NetworkIntentAuthDecorator
- type NetworkIntentError
- type NetworkIntentReconciler
- type OranAdaptorReconciler
- type PhaseProcessor
- type PlannedNetworkFunction
- type ProcessingContext
- type ProcessingPhase
- type QoSSpec
- type RANFunctionConfig
- type Reconciler
- func (r *Reconciler) ExecuteProcessingPipeline(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, ...) (ctrl.Result, error)
- func (r *Reconciler) IsProcessingComplete(networkIntent *nephoranv1.NetworkIntent) bool
- func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- type ReconcilerInterface
- type ResourcePlan
- type ResourcePlanner
- func (p *ResourcePlanner) CalculateEstimatedCost(plan *ResourcePlan) (float64, error)
- func (p *ResourcePlanner) GenerateManifests(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, ...) (ctrl.Result, error)
- func (p *ResourcePlanner) GetPhaseName() ProcessingPhase
- func (p *ResourcePlanner) IsPhaseComplete(networkIntent *nephoranv1.NetworkIntent) bool
- func (p *ResourcePlanner) PlanNetworkFunction(nfName string, llmParams, telecomContext map[string]interface{}) (*PlannedNetworkFunction, error)
- func (p *ResourcePlanner) PlanResources(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, ...) (ctrl.Result, error)
- func (p *ResourcePlanner) ProcessPhase(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, ...) (ctrl.Result, error)
- type ResourcePlannerInterface
- type ResourceRequirements
- type RetryManagerInterface
- type SecurityManagerInterface
- type SecurityPolicy
- type SecuritySpec
- type SimulationConfigData
- type SliceConfiguration
- type StatusManagerInterface
- type StructuredIntent
- type ValidationError
- type ValidationInterface
Constants ¶
const ( AuditTrailFinalizer = "audittrail.nephoran.io/finalizer" ConditionTypeReady = "Ready" ConditionTypeProgressing = "Progressing" ConditionTypeBackendsReady = "BackendsReady" ConditionTypeIntegrityReady = "IntegrityReady" EventReasonCreated = "Created" EventReasonUpdated = "Updated" EventReasonStarted = "Started" EventReasonStopped = "Stopped" EventReasonBackendFailed = "BackendFailed" EventReasonIntegrityFailed = "IntegrityFailed" EventReasonConfigChanged = "ConfigChanged" )
const ( CNFDeploymentControllerName = "cnfdeployment-controller" CNFReconcileInterval = 30 * time.Second CNFStatusUpdateInterval = 10 * time.Second )
const ( E2NodeSetFinalizer = "nephoran.com/e2nodeset-finalizer" E2NodeSetLabelKey = "nephoran.com/e2-nodeset" E2NodeAppLabelKey = "app" E2NodeAppLabelValue = "e2-node-simulator" E2NodeIDLabelKey = "nephoran.com/node-id" E2NodeIndexLabelKey = "nephoran.com/node-index" E2NodeConfigKey = "e2node-config.json" E2NodeStatusKey = "e2node-status.json" DefaultHeartbeatInterval = 10 * time.Second DefaultMetricsInterval = "30s" DefaultE2InterfaceVersion = "v3.0" DefaultMaxRetries = 3 BaseBackoffDelay = 1 * time.Second MaxBackoffDelay = 5 * time.Minute JitterFactor = 0.1 // 10% jitter BackoffMultiplier = 2.0 )
const ( StatusFailed float64 = 0 StatusProcessing float64 = 1 StatusReady float64 = 2 )
const ( CNFIntentLabel = "nephoran.com/cnf-intent" CNFDeploymentSourceLabel = "nephoran.com/source" CNFDeploymentSourceValue = "network-intent" CNFDeploymentIntentLabel = "nephoran.com/network-intent" CNFProcessingResultAnnotation = "nephoran.com/cnf-processing-result" CNFLastProcessedAnnotation = "nephoran.com/cnf-last-processed" EventCNFIntentDetected = "CNFIntentDetected" EventCNFProcessingStarted = "CNFProcessingStarted" EventCNFProcessingCompleted = "CNFProcessingCompleted" EventCNFProcessingFailed = "CNFProcessingFailed" EventCNFDeploymentCreated = "CNFDeploymentCreated" EventCNFDeploymentFailed = "CNFDeploymentFailed" )
const ( O1ConfiguredCondition = "O1Configured" A1PolicyAppliedCondition = "A1PolicyApplied" )
Variables ¶
var ( ErrGitAuthenticationFailed = errors.New("SSH key authentication failed") ErrGitNetworkTimeout = errors.New("network timeout during Git operation") ErrGitRepositoryCorrupted = errors.New("repository is corrupted or locked") ErrGitDirectoryNotFound = errors.New("directory not found in repository") ErrGitPushRejected = errors.New("push rejected by remote repository") ErrGitNoChangesToCommit = errors.New("no changes to commit") )
Git operation error constants used by cleanup tests
Functions ¶
func CalculateExponentialBackoff ¶
func CalculateExponentialBackoff(retryCount int, config *BackoffConfig) time.Duration
CalculateExponentialBackoff calculates the exponential backoff delay with jitter retryCount: current retry attempt (0-based) config: backoff configuration parameters
func CalculateExponentialBackoffForE2NodeSetOperation ¶
func CalculateExponentialBackoffForE2NodeSetOperation(retryCount int, operation string) time.Duration
CalculateExponentialBackoffForE2NodeSetOperation calculates backoff for E2NodeSet operations
func CalculateExponentialBackoffForNetworkIntentOperation ¶
func CalculateExponentialBackoffForNetworkIntentOperation(retryCount int, operation string, constants *configPkg.Constants) time.Duration
CalculateExponentialBackoffForNetworkIntentOperation calculates backoff for NetworkIntent operations
func CalculateExponentialBackoffWithConstants ¶
func CalculateExponentialBackoffWithConstants(retryCount int, baseDelay, maxDelay time.Duration, constants *configPkg.Constants) time.Duration
CalculateExponentialBackoffWithConstants calculates backoff using configPkg.Constants for backward compatibility with NetworkIntent controller
func ClearE2NodeSetRetryCount ¶
func ClearE2NodeSetRetryCount(e2nodeSet *nephoranv1.E2NodeSet, operation string)
ClearE2NodeSetRetryCount removes the retry count for an E2NodeSet operation from annotations
func ClearNetworkIntentRetryCount ¶
func ClearNetworkIntentRetryCount(networkIntent *nephoranv1.NetworkIntent, operation string)
ClearNetworkIntentRetryCount removes the retry count for a NetworkIntent operation from annotations
func GetE2NodeSetRetryCount ¶
func GetE2NodeSetRetryCount(e2nodeSet *nephoranv1.E2NodeSet, operation string) int
GetE2NodeSetRetryCount retrieves the retry count for an E2NodeSet operation from annotations
func GetMetricsEnabled ¶
func GetMetricsEnabled() bool
func GetNetworkIntentRetryCount ¶
func GetNetworkIntentRetryCount(networkIntent *nephoranv1.NetworkIntent, operation string) int
GetNetworkIntentRetryCount retrieves the retry count for a NetworkIntent operation from annotations
func SetE2NodeSetRetryCount ¶
func SetE2NodeSetRetryCount(e2nodeSet *nephoranv1.E2NodeSet, operation string, count int)
SetE2NodeSetRetryCount sets the retry count for an E2NodeSet operation in annotations
func SetNetworkIntentRetryCount ¶
func SetNetworkIntentRetryCount(networkIntent *nephoranv1.NetworkIntent, operation string, count int)
SetNetworkIntentRetryCount sets the retry count for a NetworkIntent operation in annotations
Types ¶
type A1Policy ¶
type A1Policy struct {
PolicyTypeID string `json:"policy_type_id"`
PolicyData json.RawMessage `json:"policy_data"`
}
type AuditTrailController ¶
type AuditTrailController struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
Recorder record.EventRecorder
// contains filtered or unexported fields
}
func NewAuditTrailController ¶
func NewAuditTrailController(client client.Client, log logr.Logger, scheme *runtime.Scheme, recorder record.EventRecorder) *AuditTrailController
func (*AuditTrailController) GetAuditSystem ¶
func (r *AuditTrailController) GetAuditSystem(namespace, name string) *audit.AuditSystem
func (*AuditTrailController) SetupWithManager ¶
func (r *AuditTrailController) SetupWithManager(mgr ctrl.Manager) error
type AuthContextKey ¶
type AuthContextKey string
const (
ControllerAuthContextKey AuthContextKey = "controller_auth_context"
)
type AuthenticatedE2NodeSetReconciler ¶
type AuthenticatedE2NodeSetReconciler struct {
*AuthenticatedReconciler
OriginalReconciler *E2NodeSetReconciler
}
func NewAuthenticatedE2NodeSetReconciler ¶
func NewAuthenticatedE2NodeSetReconciler( originalReconciler *E2NodeSetReconciler, authIntegration *auth.NephoranAuthIntegration, logger *slog.Logger, requireAuth bool, ) *AuthenticatedE2NodeSetReconciler
func (*AuthenticatedE2NodeSetReconciler) SetupWithManager ¶
func (aer *AuthenticatedE2NodeSetReconciler) SetupWithManager(mgr ctrl.Manager) error
type AuthenticatedReconciler ¶
func NewAuthenticatedReconciler ¶
func NewAuthenticatedReconciler( client client.Client, authIntegration *auth.NephoranAuthIntegration, logger *slog.Logger, requireAuth bool, ) *AuthenticatedReconciler
func (*AuthenticatedReconciler) ValidateNetworkIntentAccess ¶
func (ar *AuthenticatedReconciler) ValidateNetworkIntentAccess(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, operation string) error
func (*AuthenticatedReconciler) WithAuthContext ¶
type BackoffConfig ¶
type BackoffConfig struct {
BaseDelay time.Duration
MaxDelay time.Duration
Multiplier float64
JitterFactor float64
}
BackoffConfig holds configuration for exponential backoff
func DefaultBackoffConfig ¶
func DefaultBackoffConfig() *BackoffConfig
DefaultBackoffConfig returns the default backoff configuration
type CNFControllerConfig ¶
type CNFDeploymentContext ¶
type CNFDeploymentContext struct {
NetworkIntent *nephoranv1.NetworkIntent
ProcessingResult *nephoranv1.CNFIntentProcessingResult
CNFDeployments []*nephoranv1.CNFDeployment
StartTime time.Time
RequestID string
ProcessingPhase string
Errors []error
Warnings []string
}
type CNFDeploymentReconciler ¶
type CNFDeploymentReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder record.EventRecorder
CNFOrchestrator *cnf.CNFOrchestrator
LLMProcessor *llm.Processor
MetricsCollector *monitoring.MetricsCollector
Config *CNFControllerConfig
}
func NewCNFDeploymentReconciler ¶
func NewCNFDeploymentReconciler(mgr ctrl.Manager, cnfOrchestrator *cnf.CNFOrchestrator) *CNFDeploymentReconciler
func (*CNFDeploymentReconciler) SetupWithManager ¶
func (r *CNFDeploymentReconciler) SetupWithManager(mgr ctrl.Manager) error
type CNFDeploymentRequest ¶
type CNFDeploymentRequest struct {
CNFDeployment *nephoranv1.CNFDeployment
Context context.Context
RequestID string
Source string // "intent" or "direct"
NetworkIntent *nephoranv1.NetworkIntent
}
type CNFIntegrationConfig ¶
type CNFIntegrationConfig struct {
EnableCNFIntegration bool
CNFProcessingTimeout time.Duration
CNFDeploymentTimeout time.Duration
MaxConcurrentCNFDeploys int
EnableAutoDeployment bool
RequireExplicitApproval bool
DefaultTargetNamespace string
CNFLabelSelector map[string]string
RetryPolicy CNFRetryPolicy
}
type CNFIntegrationManager ¶
type CNFIntegrationManager struct {
Client client.Client
Scheme *runtime.Scheme
Recorder record.EventRecorder
CNFIntentProcessor *cnf.CNFIntentProcessor
CNFOrchestrator *cnf.CNFOrchestrator
Config *CNFIntegrationConfig
}
func NewCNFIntegrationManager ¶
func NewCNFIntegrationManager( client client.Client, scheme *runtime.Scheme, recorder record.EventRecorder, cnfProcessor *cnf.CNFIntentProcessor, cnfOrchestrator *cnf.CNFOrchestrator, ) *CNFIntegrationManager
func (*CNFIntegrationManager) ProcessCNFIntent ¶
func (m *CNFIntegrationManager) ProcessCNFIntent(ctx context.Context, networkIntent *nephoranv1.NetworkIntent) error
type CNFRetryPolicy ¶
type CertificateAutomationCondition ¶
type CertificateAutomationCondition struct {
Type CertificateAutomationConditionType `json:"type"`
Status metav1.ConditionStatus `json:"status"`
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
}
type CertificateAutomationConditionType ¶
type CertificateAutomationConditionType string
const ( CertificateAutomationConditionReady CertificateAutomationConditionType = "Ready" CertificateAutomationConditionIssued CertificateAutomationConditionType = "Issued" CertificateAutomationConditionValidated CertificateAutomationConditionType = "Validated" CertificateAutomationConditionRenewed CertificateAutomationConditionType = "Renewed" CertificateAutomationConditionRevoked CertificateAutomationConditionType = "Revoked" )
type CertificateAutomationReconciler ¶
type CertificateAutomationReconciler struct {
client.Client
Scheme *runtime.Scheme
Log logr.Logger
AutomationEngine *ca.AutomationEngine
CAManager *ca.CAManager
}
func (*CertificateAutomationReconciler) SetupWithManager ¶
func (r *CertificateAutomationReconciler) SetupWithManager(mgr ctrl.Manager) error
type CertificateAutomationSpec ¶
type CertificateAutomationSpec struct {
ServiceName string `json:"serviceName"`
Namespace string `json:"namespace"`
DNSNames []string `json:"dnsNames,omitempty"`
IPAddresses []string `json:"ipAddresses,omitempty"`
Template string `json:"template,omitempty"`
AutoRenewal bool `json:"autoRenewal,omitempty"`
ValidityDuration *metav1.Duration `json:"validityDuration,omitempty"`
SecretName string `json:"secretName,omitempty"`
Priority string `json:"priority,omitempty"`
}
type CertificateAutomationStatus ¶
type CertificateAutomationStatus struct {
Phase nephv1alpha1.CertificateAutomationPhase `json:"phase,omitempty"`
Conditions []CertificateAutomationCondition `json:"conditions,omitempty"`
CertificateSerialNumber string `json:"certificateSerialNumber,omitempty"`
ExpiresAt *metav1.Time `json:"expiresAt,omitempty"`
LastRenewalTime *metav1.Time `json:"lastRenewalTime,omitempty"`
NextRenewalTime *metav1.Time `json:"nextRenewalTime,omitempty"`
SecretRef *v1.LocalObjectReference `json:"secretRef,omitempty"`
ValidationStatus *CertificateValidationStatus `json:"validationStatus,omitempty"`
RevocationStatus string `json:"revocationStatus,omitempty"`
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}
type CertificateValidationStatus ¶
type CertificateValidationStatus struct {
Valid bool `json:"valid"`
ChainValid bool `json:"chainValid,omitempty"`
CTLogVerified bool `json:"ctLogVerified,omitempty"`
LastValidationTime *metav1.Time `json:"lastValidationTime,omitempty"`
ValidationErrors []string `json:"validationErrors,omitempty"`
ValidationWarnings []string `json:"validationWarnings,omitempty"`
}
type CleanupManagerInterface ¶
type CleanupManagerInterface interface {
PerformCleanup(ctx context.Context, networkIntent *nephoranv1.NetworkIntent) error
CleanupGeneratedResources(ctx context.Context, networkIntent *nephoranv1.NetworkIntent) error
CleanupCachedData(ctx context.Context, networkIntent *nephoranv1.NetworkIntent) error
}
type ConcreteDependencies ¶
type ConcreteDependencies struct {
// contains filtered or unexported fields
}
func NewConcreteDependencies ¶
func NewConcreteDependencies( gitClient git.ClientInterface, llmClient shared.ClientInterface, packageGen *nephio.PackageGenerator, httpClient *http.Client, eventRecorder record.EventRecorder, ) *ConcreteDependencies
func (*ConcreteDependencies) GetEventRecorder ¶
func (d *ConcreteDependencies) GetEventRecorder() record.EventRecorder
func (*ConcreteDependencies) GetGitClient ¶
func (d *ConcreteDependencies) GetGitClient() git.ClientInterface
func (*ConcreteDependencies) GetHTTPClient ¶
func (d *ConcreteDependencies) GetHTTPClient() *http.Client
func (*ConcreteDependencies) GetLLMClient ¶
func (d *ConcreteDependencies) GetLLMClient() shared.ClientInterface
func (*ConcreteDependencies) GetPackageGenerator ¶
func (d *ConcreteDependencies) GetPackageGenerator() *nephio.PackageGenerator
type ContextManagerInterface ¶
type ContextManagerInterface interface {
InitializeProcessingContext(networkIntent *nephoranv1.NetworkIntent) *ProcessingContext
UpdateProcessingContext(processingCtx *ProcessingContext, phase ProcessingPhase, data map[string]interface{})
ValidateProcessingContext(processingCtx *ProcessingContext, expectedPhase ProcessingPhase) error
SerializeProcessingContext(processingCtx *ProcessingContext) (string, error)
DeserializeProcessingContext(data string) (*ProcessingContext, error)
}
type ControllerAuthContext ¶
type ControllerInterface ¶
type ControllerInterface interface {
ReconcilerInterface
SetupWithManager(mgr ctrl.Manager) error
GetConfig() *Config
GetDependencies() Dependencies
}
type ControllerMetrics ¶
type ControllerMetrics struct {
// contains filtered or unexported fields
}
func NewControllerMetrics ¶
func NewControllerMetrics(controllerName string) *ControllerMetrics
func (*ControllerMetrics) RecordFailure ¶
func (m *ControllerMetrics) RecordFailure(namespace, name, errorType string)
func (*ControllerMetrics) RecordProcessingDuration ¶
func (m *ControllerMetrics) RecordProcessingDuration(namespace, name, phase string, duration float64)
func (*ControllerMetrics) RecordReconcileError ¶
func (m *ControllerMetrics) RecordReconcileError(namespace, name, errorType string)
func (*ControllerMetrics) RecordReconcileTotal ¶
func (m *ControllerMetrics) RecordReconcileTotal(namespace, name, result string)
func (*ControllerMetrics) RecordSuccess ¶
func (m *ControllerMetrics) RecordSuccess(namespace, name string)
func (*ControllerMetrics) SetStatus ¶
func (m *ControllerMetrics) SetStatus(namespace, name, phase string, status float64)
type Dependencies ¶
type Dependencies interface {
GetGitClient() git.ClientInterface
GetLLMClient() shared.ClientInterface
GetPackageGenerator() *nephio.PackageGenerator
GetHTTPClient() *http.Client
GetEventRecorder() record.EventRecorder
GetTelecomKnowledgeBase() *telecom.TelecomKnowledgeBase
GetMetricsCollector() monitoring.MetricsCollector
}
type DependencyError ¶
func NewDependencyError ¶
func NewDependencyError(dependency string, cause error) *DependencyError
func (*DependencyError) Error ¶
func (e *DependencyError) Error() string
func (*DependencyError) Unwrap ¶
func (e *DependencyError) Unwrap() error
type DeploymentSpec ¶
type DeploymentSpec struct {
Replicas int `json:"replicas"`
Image string `json:"image"`
Resources json.RawMessage `json:"resources"`
}
type E2NodeConfigData ¶
type E2NodeConfigData struct {
NodeID string `json:"nodeId"`
E2InterfaceVersion string `json:"e2InterfaceVersion"`
RICEndpoint string `json:"ricEndpoint"`
RANFunctions []RANFunctionConfig `json:"ranFunctions"`
SimulationConfig SimulationConfigData `json:"simulationConfig"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type E2NodeSetReconciler ¶
type E2NodeSetReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder record.EventRecorder
// External dependencies
GitClient git.ClientInterface
E2Manager e2.E2ManagerInterface
// contains filtered or unexported fields
}
func (*E2NodeSetReconciler) RegisterMetrics ¶
func (r *E2NodeSetReconciler) RegisterMetrics()
func (*E2NodeSetReconciler) SetupWithManager ¶
func (r *E2NodeSetReconciler) SetupWithManager(mgr ctrl.Manager) error
type E2NodeStatusData ¶
type E2NodeStatusData struct {
NodeID string `json:"nodeId"`
State string `json:"state"`
LastHeartbeat *time.Time `json:"lastHeartbeat,omitempty"`
ConnectedSince *time.Time `json:"connectedSince,omitempty"`
ActiveSubscriptions int32 `json:"activeSubscriptions"`
ErrorMessage string `json:"errorMessage,omitempty"`
HeartbeatCount int64 `json:"heartbeatCount"`
StatusUpdatedAt time.Time `json:"statusUpdatedAt"`
}
type EndpointSpec ¶
type EventManagerInterface ¶
type EventManagerInterface interface {
RecordEvent(networkIntent *nephoranv1.NetworkIntent, eventType, reason, message string)
RecordFailureEvent(networkIntent *nephoranv1.NetworkIntent, reason, message string)
RecordSuccessEvent(networkIntent *nephoranv1.NetworkIntent, reason, message string)
}
type GitClientInterface ¶
type GitClientInterface = git.ClientInterface
type GitOpsHandler ¶
type GitOpsHandler struct {
*NetworkIntentReconciler
}
func NewGitOpsHandler ¶
func NewGitOpsHandler(r *NetworkIntentReconciler) *GitOpsHandler
func (*GitOpsHandler) CleanupGitOpsResources ¶
func (g *GitOpsHandler) CleanupGitOpsResources(ctx context.Context, networkIntent *nephoranv1.NetworkIntent) error
func (*GitOpsHandler) CommitToGitOps ¶
func (g *GitOpsHandler) CommitToGitOps(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
func (*GitOpsHandler) GetPhaseName ¶
func (g *GitOpsHandler) GetPhaseName() ProcessingPhase
func (*GitOpsHandler) IsPhaseComplete ¶
func (g *GitOpsHandler) IsPhaseComplete(networkIntent *nephoranv1.NetworkIntent) bool
func (*GitOpsHandler) ProcessPhase ¶
func (g *GitOpsHandler) ProcessPhase(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
func (*GitOpsHandler) VerifyDeployment ¶
func (g *GitOpsHandler) VerifyDeployment(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
func (*GitOpsHandler) VerifyDeploymentAdvanced ¶
func (g *GitOpsHandler) VerifyDeploymentAdvanced(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
type GitOpsHandlerInterface ¶
type GitOpsHandlerInterface interface {
PhaseProcessor
CommitToGitOps(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
VerifyDeployment(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
CleanupGitOpsResources(ctx context.Context, networkIntent *nephoranv1.NetworkIntent) error
}
type HealthCheckInterface ¶
type HealthCheckSpec ¶
type InterfaceConfiguration ¶
type InterfaceConfiguration struct {
Name string `json:"name"`
Type string `json:"type"`
Protocol string `json:"protocol"`
Endpoints []EndpointSpec `json:"endpoints"`
Security SecuritySpec `json:"security"`
QoS QoSSpec `json:"qos"`
}
type LLMProcessor ¶
type LLMProcessor struct {
*NetworkIntentReconciler
}
func NewLLMProcessor ¶
func NewLLMProcessor(r *NetworkIntentReconciler) *LLMProcessor
func (*LLMProcessor) BuildTelecomEnhancedPrompt ¶
func (p *LLMProcessor) BuildTelecomEnhancedPrompt(ctx context.Context, intent string, processingCtx *ProcessingContext) (string, error)
func (*LLMProcessor) ExtractTelecomContext ¶
func (p *LLMProcessor) ExtractTelecomContext(intent string) map[string]interface{}
func (*LLMProcessor) GetPhaseName ¶
func (p *LLMProcessor) GetPhaseName() ProcessingPhase
func (*LLMProcessor) IsPhaseComplete ¶
func (p *LLMProcessor) IsPhaseComplete(networkIntent *nephoranv1.NetworkIntent) bool
func (*LLMProcessor) ProcessLLMPhase ¶
func (p *LLMProcessor) ProcessLLMPhase(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
func (*LLMProcessor) ProcessPhase ¶
func (p *LLMProcessor) ProcessPhase(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
type LLMProcessorInterface ¶
type LLMProcessorInterface interface {
PhaseProcessor
ProcessLLMPhase(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
BuildTelecomEnhancedPrompt(ctx context.Context, intent string, processingCtx *ProcessingContext) (string, error)
ExtractTelecomContext(intent string) map[string]interface{}
}
type MetricsManagerInterface ¶
type MetricsManagerInterface interface {
RecordProcessingMetrics(phase ProcessingPhase, duration float64, success bool)
RecordLLMMetrics(model string, tokenCount int, duration float64, success bool)
RecordGitOpsMetrics(operation string, duration float64, success bool)
UpdateNetworkIntentStatus(name, namespace, intentType, status string)
}
type MonitoringSpec ¶
type NetworkIntentAuthDecorator ¶
type NetworkIntentAuthDecorator struct {
*AuthenticatedReconciler
// contains filtered or unexported fields
}
func NewNetworkIntentAuthDecorator ¶
func NewNetworkIntentAuthDecorator( originalReconciler *NetworkIntentReconciler, authIntegration *auth.NephoranAuthIntegration, logger *slog.Logger, requireAuth bool, ) *NetworkIntentAuthDecorator
type NetworkIntentError ¶
type NetworkIntentError struct {
Phase string
Operation string
Cause error
Retries int
Timestamp time.Time
}
func NewNetworkIntentError ¶
func NewNetworkIntentError(phase, operation string, cause error, retries int) *NetworkIntentError
func (*NetworkIntentError) Error ¶
func (e *NetworkIntentError) Error() string
func (*NetworkIntentError) IsRetryable ¶
func (e *NetworkIntentError) IsRetryable() bool
func (*NetworkIntentError) Unwrap ¶
func (e *NetworkIntentError) Unwrap() error
type NetworkIntentReconciler ¶
type NetworkIntentReconciler struct {
client.Client
Scheme *runtime.Scheme
// contains filtered or unexported fields
}
func NewNetworkIntentReconciler ¶
func NewNetworkIntentReconciler(client client.Client, scheme *runtime.Scheme, deps Dependencies, config *Config) (*NetworkIntentReconciler, error)
func (*NetworkIntentReconciler) GetConfig ¶
func (r *NetworkIntentReconciler) GetConfig() *Config
GetConfig returns the reconciler configuration for testing
func (*NetworkIntentReconciler) GetDependencies ¶
func (r *NetworkIntentReconciler) GetDependencies() Dependencies
GetDependencies returns the reconciler dependencies for testing
func (*NetworkIntentReconciler) SetupWithManager ¶
func (r *NetworkIntentReconciler) SetupWithManager(mgr ctrl.Manager) error
type OranAdaptorReconciler ¶
type OranAdaptorReconciler struct {
client.Client
Scheme *runtime.Scheme
O1Adaptor *o1.O1Adaptor
A1Adaptor *a1.A1Adaptor
}
func (*OranAdaptorReconciler) SetupWithManager ¶
func (r *OranAdaptorReconciler) SetupWithManager(mgr ctrl.Manager) error
type PhaseProcessor ¶
type PhaseProcessor interface {
ProcessPhase(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
GetPhaseName() ProcessingPhase
IsPhaseComplete(networkIntent *nephoranv1.NetworkIntent) bool
}
type PlannedNetworkFunction ¶
type PlannedNetworkFunction struct {
Name string `json:"name"`
Type string `json:"type"`
Version string `json:"version"`
Replicas int `json:"replicas"`
Resources ResourceRequirements `json:"resources"`
Configuration json.RawMessage `json:"configuration"`
Dependencies []string `json:"dependencies"`
Interfaces []string `json:"interfaces"`
HealthChecks []HealthCheckSpec `json:"health_checks"`
Monitoring MonitoringSpec `json:"monitoring"`
}
type ProcessingContext ¶
type ProcessingContext struct {
StartTime time.Time
CurrentPhase ProcessingPhase
IntentType string
ExtractedEntities map[string]interface{}
TelecomContext map[string]interface{}
ResourcePlan *ResourcePlan
Manifests map[string]string
GitCommitHash string
DeploymentStatus map[string]interface{}
Metrics map[string]float64
}
type ProcessingPhase ¶
type ProcessingPhase string
const ( PhaseLLMProcessing ProcessingPhase = "LLMProcessing" PhaseResourcePlanning ProcessingPhase = "ResourcePlanning" PhaseManifestGeneration ProcessingPhase = "ManifestGeneration" PhaseGitOpsCommit ProcessingPhase = "GitOpsCommit" PhaseDeploymentVerification ProcessingPhase = "DeploymentVerification" )
type RANFunctionConfig ¶
type Reconciler ¶
type Reconciler struct {
*NetworkIntentReconciler
// contains filtered or unexported fields
}
func NewReconciler ¶
func NewReconciler(r *NetworkIntentReconciler) *Reconciler
func (*Reconciler) ExecuteProcessingPipeline ¶
func (r *Reconciler) ExecuteProcessingPipeline(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
func (*Reconciler) IsProcessingComplete ¶
func (r *Reconciler) IsProcessingComplete(networkIntent *nephoranv1.NetworkIntent) bool
type ReconcilerInterface ¶
type ReconcilerInterface interface {
Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
ExecuteProcessingPipeline(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
IsProcessingComplete(networkIntent *nephoranv1.NetworkIntent) bool
}
type ResourcePlan ¶
type ResourcePlan struct {
NetworkFunctions []PlannedNetworkFunction `json:"network_functions"`
ResourceRequirements ResourceRequirements `json:"resource_requirements"`
DeploymentPattern string `json:"deployment_pattern"`
QoSProfile string `json:"qos_profile"`
SliceConfiguration *SliceConfiguration `json:"slice_configuration,omitempty"`
Interfaces []InterfaceConfiguration `json:"interfaces"`
SecurityPolicies []SecurityPolicy `json:"security_policies"`
EstimatedCost float64 `json:"estimated_cost"`
}
type ResourcePlanner ¶
type ResourcePlanner struct {
*NetworkIntentReconciler
}
func NewResourcePlanner ¶
func NewResourcePlanner(r *NetworkIntentReconciler) *ResourcePlanner
func (*ResourcePlanner) CalculateEstimatedCost ¶
func (p *ResourcePlanner) CalculateEstimatedCost(plan *ResourcePlan) (float64, error)
func (*ResourcePlanner) GenerateManifests ¶
func (p *ResourcePlanner) GenerateManifests(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
func (*ResourcePlanner) GetPhaseName ¶
func (p *ResourcePlanner) GetPhaseName() ProcessingPhase
func (*ResourcePlanner) IsPhaseComplete ¶
func (p *ResourcePlanner) IsPhaseComplete(networkIntent *nephoranv1.NetworkIntent) bool
func (*ResourcePlanner) PlanNetworkFunction ¶
func (p *ResourcePlanner) PlanNetworkFunction(nfName string, llmParams, telecomContext map[string]interface{}) (*PlannedNetworkFunction, error)
func (*ResourcePlanner) PlanResources ¶
func (p *ResourcePlanner) PlanResources(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
func (*ResourcePlanner) ProcessPhase ¶
func (p *ResourcePlanner) ProcessPhase(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
type ResourcePlannerInterface ¶
type ResourcePlannerInterface interface {
PhaseProcessor
PlanResources(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
GenerateManifests(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, processingCtx *ProcessingContext) (ctrl.Result, error)
PlanNetworkFunction(nfName string, llmParams, telecomContext map[string]interface{}) (*PlannedNetworkFunction, error)
CalculateEstimatedCost(plan *ResourcePlan) (float64, error)
}
type ResourceRequirements ¶
type RetryManagerInterface ¶
type RetryManagerInterface interface {
GetRetryCount(networkIntent *nephoranv1.NetworkIntent, operation string) int
SetRetryCount(networkIntent *nephoranv1.NetworkIntent, operation string, count int)
ClearRetryCount(networkIntent *nephoranv1.NetworkIntent, operation string)
IsRetryLimitExceeded(networkIntent *nephoranv1.NetworkIntent, operation string, maxRetries int) bool
CalculateBackoffDelay(retryCount int, operation string) ctrl.Result
}
type SecurityPolicy ¶
type SecurityPolicy struct {
Name string `json:"name"`
Type string `json:"type"`
Config json.RawMessage `json:"config"`
}
type SecuritySpec ¶
type SimulationConfigData ¶
type SliceConfiguration ¶
type StatusManagerInterface ¶
type StatusManagerInterface interface {
UpdatePhase(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, phase string) error
SetReadyCondition(ctx context.Context, networkIntent *nephoranv1.NetworkIntent, status, reason, message string) error
UpdateCondition(networkIntent *nephoranv1.NetworkIntent, conditionType, status, reason, message string)
IsConditionTrue(networkIntent *nephoranv1.NetworkIntent, conditionType string) bool
}
type StructuredIntent ¶
type StructuredIntent struct {
Type string `json:"type"`
Data json.RawMessage `json:"data"`
}
type ValidationError ¶
func NewValidationError ¶
func NewValidationError(field string, value interface{}, message string) *ValidationError
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
type ValidationInterface ¶
type ValidationInterface interface {
ValidateNetworkIntent(networkIntent *nephoranv1.NetworkIntent) error
ValidateProcessingContext(processingCtx *ProcessingContext) error
ValidateResourcePlan(plan *ResourcePlan) error
ValidateConfiguration(config *Config) error
}
Source Files
¶
- audittrail_controller.go
- auth_context.go
- certificate_controller.go
- cnfdeployment_controller.go
- controller_utils.go
- dependencies.go
- e2nodeset_controller.go
- errors.go
- gitops_handler.go
- intent_types.go
- interfaces.go
- llm_processor.go
- metrics.go
- networkintent_cnf_integration.go
- networkintent_controller.go
- oran_controller.go
- reconciler.go
- resource_planner.go