[SEBA-226] Addis IpAddress and NasId to sadis response
Change-Id: I10dcbcd2be46aca0bbebf5c5af53cc1084517f97
diff --git a/handlers.go b/handlers.go
index ef2e5af..b82b6fc 100644
--- a/handlers.go
+++ b/handlers.go
@@ -15,6 +15,7 @@
import (
"encoding/json"
+ "fmt"
"net/http"
"strconv"
@@ -76,14 +77,19 @@
}
+ fmt.Println(devices)
+
for _, device := range devices.OltDevices {
devID := device.Host + ":" + strconv.Itoa(device.Port)
if devID == sadisRequestID {
log.Infof("Found OLT device with ID %s", devID)
+ log.Debugf("ID: %s, Uplink: %s, IPAddress: %s, NasID: %s", devID, toInt(device.Uplink), device.Host, device.NasID)
sadisDevice := sadisDevice{
ID: devID,
Uplink: toInt(device.Uplink),
HardwareID: "de:ad:be:ef:ba:11", // TODO do we really need to configure this?
+ IPAddress: device.Host,
+ NasID: device.NasID,
}
json, e := json.Marshal(&sadisDevice)