[VOL-4286] Update ONU_DISCOVERY event to include the technology of the PON port
Change-Id: Id4f0b1b00321b22462c638c4b16fb9ef99343202
diff --git a/internal/pkg/core/device_handler.go b/internal/pkg/core/device_handler.go
index 9c45250..10bdd09 100644
--- a/internal/pkg/core/device_handler.go
+++ b/internal/pkg/core/device_handler.go
@@ -216,6 +216,17 @@
logger.Debug(ctx, "device-agent-stopped")
}
+func (dh *DeviceHandler) getPonTechnology(intfID uint32) string {
+ for _, resourceRanges := range dh.deviceInfo.GetRanges() {
+ for _, pooledIntfID := range resourceRanges.GetIntfIds() {
+ if pooledIntfID == intfID {
+ return resourceRanges.GetTechnology()
+ }
+ }
+ }
+ return ""
+}
+
func macifyIP(ip net.IP) string {
if len(ip) > 0 {
oct1 := strconv.FormatInt(int64(ip[12]), 16)