MRI version bumpup for Aluminium
[netvirt.git] / dhcpservice / impl / src / main / java / org / opendaylight / netvirt / dhcpservice / DhcpPktHandler.java
index 78655b7d688767eb9d9c1318ee4c5ea2e0e6b06b..7e5350e0ea0c6af5f43769ff4052feb9b9443cb1 100644 (file)
@@ -349,7 +349,7 @@ public class DhcpPktHandler implements PacketProcessingListener {
             if (clientIp != null && serverIp != null) {
                 List<HostRoutes> subnetHostRoutes = new ArrayList<>();
                 if (subnet.getHostRoutes() != null && !subnet.getHostRoutes().isEmpty()) {
-                    for (HostRoutes hostRoute : subnet.getHostRoutes()) {
+                    for (HostRoutes hostRoute : subnet.getHostRoutes().values()) {
                         if (!hostRoute.getNexthop().stringValue().equals(clientIp)) {
                             subnetHostRoutes.add(hostRoute);
                         }
@@ -383,7 +383,7 @@ public class DhcpPktHandler implements PacketProcessingListener {
     @Nullable
     private static String getIpv4Address(Port port) {
 
-        for (FixedIps fixedIp : port.nonnullFixedIps()) {
+        for (FixedIps fixedIp : port.nonnullFixedIps().values()) {
             if (isIpv4Address(fixedIp.getIpAddress())) {
                 return fixedIp.getIpAddress().getIpv4Address().getValue();
             }
@@ -818,7 +818,7 @@ public class DhcpPktHandler implements PacketProcessingListener {
                     LOG.warn("RPC Call to Get egress actions for interface {} returned with Errors {}",
                             interfaceName, rpcResult.getErrors());
                 } else {
-                    return rpcResult.getResult().getAction();
+                    return new ArrayList<Action>(rpcResult.getResult().getAction().values());
                 }
             } else {
                 GetEgressActionsForInterfaceInputBuilder egressAction =
@@ -833,7 +833,7 @@ public class DhcpPktHandler implements PacketProcessingListener {
                     LOG.warn("RPC Call to Get egress actions for interface {} returned with Errors {}",
                             interfaceName, rpcResult.getErrors());
                 } else {
-                    return rpcResult.getResult().getAction();
+                    return new ArrayList<Action>(rpcResult.getResult().getAction().values());
                 }
             }
         } catch (InterruptedException | ExecutionException e) {