Commit a6c95841 authored by Pedro Duarte's avatar Pedro Duarte
Browse files

fix on the aggregation logic

parent 33156f0b
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -230,6 +230,18 @@ class GnmiSessionHandler:
            return

        segments = [seg for seg in relative_path.split('/') if seg]

        # Filter out known non-OpenConfig Stratum-specific paths that break validation
        # - components/.../chassis/* (Stratum-specific container not in OC platform)
        if any(seg == 'chassis' for seg in segments):
            self._logger.debug('Skipping non-OpenConfig path (chassis subtree): %s', relative_path)
            return
        # - interfaces/.../config/health-indicator (non-OC leaf)
        for i in range(len(segments) - 1):
            if segments[i] == 'config' and segments[i + 1] == 'health-indicator':
                self._logger.debug('Skipping non-OpenConfig leaf health-indicator at: %s', relative_path)
                return

        cursor = root

        for i, segment in enumerate(segments):