Using real serial_number when looking up OLT
Change-Id: Ie51676c56df08e98a3cf338b9a57c061b36900ff
diff --git a/handlers.go b/handlers.go
index d030fa7..c85f239 100644
--- a/handlers.go
+++ b/handlers.go
@@ -15,7 +15,6 @@
import (
"encoding/json"
- "fmt"
"net"
"net/http"
"strconv"
@@ -78,10 +77,9 @@
}
- fmt.Println(devices)
-
for _, device := range devices.OltDevices {
- devID := device.Host + ":" + strconv.Itoa(device.Port)
+ // NOTE if it's an OLT then sadisRequestID is the device serial number
+ devID := device.SerialNumber
if devID == sadisRequestID {
log.Infof("Found OLT device with ID %s", devID)