Update config-generator to account for ONOS API changes in 1.12.
Change-Id: I6a07e4bfe2bd69a1a63a628539d7d39899436854
diff --git a/config-generator/handlers.go b/config-generator/handlers.go
index 3363c6c..e880c86 100644
--- a/config-generator/handlers.go
+++ b/config-generator/handlers.go
@@ -148,7 +148,8 @@
// Walk the list of know compute nodes (hosts) and if the compute node
// is connected to a switch, then that switch is an edge router
for _, host := range hosts.Hosts {
- if device, ok := dm[host.Location.ElementID]; ok {
+ // Assume that each host has only one location for now
+ if device, ok := dm[host.Locations[0].ElementID]; ok {
(*device).IsEdgeRouter = true
}
}