Skip to content

Commit 2f8dcb4

Browse files
committed
fix(tn-manager): Round 15 - Fix field name and type assertion errors
Fixed the final 4 compilation errors in TN Manager: 1. enhanced_types.go (3 errors): - Fixed endpoint.NodeID → endpoint.NodeName in GetSliceVXLANConfigs - Fixed endpoint.NodeID → endpoint.NodeName in GetSliceQoSStrategies - Fixed endpoint.NodeID → endpoint.NodeName in GetSlicesUsingNode The embedded tnv1alpha1.Endpoint struct uses "NodeName" not "NodeID" as defined in tn/manager/api/v1alpha1/tnslice_types.go 2. qos_manager.go (1 error): - Removed invalid type assertion on queue.BurstSize - BurstSize is already string type in QueueConfig struct - Changed from: if currentBurst, ok := queue.BurstSize.(string); ok - Changed to: if queue.BurstSize != "" All TN Manager code now compiles successfully. Ready for integration testing. Resolves: All tn-integration compilation errors
1 parent f34233c commit 2f8dcb4

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

tn/manager/pkg/enhanced_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ func (ns *NetworkState) GetSliceVXLANConfigs(nodeID string) map[string]*DynamicV
630630
for sliceID, config := range ns.sliceConfigs {
631631
// Check if this slice uses the specified node
632632
for _, endpoint := range config.Endpoints {
633-
if endpoint.NodeID == nodeID {
633+
if endpoint.NodeName == nodeID {
634634
configs[sliceID] = config
635635
break
636636
}
@@ -649,7 +649,7 @@ func (ns *NetworkState) GetSliceQoSStrategies(nodeID string) map[string]*QoSStra
649649
// Check if this slice uses the specified node
650650
if config, exists := ns.sliceConfigs[sliceID]; exists {
651651
for _, endpoint := range config.Endpoints {
652-
if endpoint.NodeID == nodeID {
652+
if endpoint.NodeName == nodeID {
653653
strategies[sliceID] = strategy
654654
break
655655
}
@@ -667,7 +667,7 @@ func (ns *NetworkState) GetSlicesUsingNode(nodeID string) []string {
667667
slices := make([]string, 0)
668668
for sliceID, config := range ns.sliceConfigs {
669669
for _, endpoint := range config.Endpoints {
670-
if endpoint.NodeID == nodeID {
670+
if endpoint.NodeName == nodeID {
671671
slices = append(slices, sliceID)
672672
break
673673
}

tn/manager/pkg/qos_manager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ func (qm *QoSManager) AdjustForLatency(strategy *QoSStrategy, faultDetails map[s
178178
// Reduce buffer sizes to minimize queuing delay
179179
for i := range adjusted.SchedulingPolicy.Queues {
180180
queue := &adjusted.SchedulingPolicy.Queues[i]
181-
if currentBurst, ok := queue.BurstSize.(string); ok {
181+
if queue.BurstSize != "" {
182182
// Reduce burst size by 50%
183-
queue.BurstSize = qm.reduceBurstSize(currentBurst, 0.5)
183+
queue.BurstSize = qm.reduceBurstSize(queue.BurstSize, 0.5)
184184
}
185185
}
186186

0 commit comments

Comments
 (0)