Sort reported nodes
[netvirt.git] / northbound / src / main / java / org / opendaylight / ovsdb / northbound / NodeResource.java
index a4fc913c0f011167cab3a2c5aa653cbdf5388c2e..034ddff6becd9eb4267e574a7a17414badae528b 100644 (file)
@@ -2,6 +2,7 @@ package org.opendaylight.ovsdb.northbound;
 
 import com.fasterxml.jackson.databind.SerializationFeature;
 import java.io.InputStream;
+import java.util.Collections;
 import java.util.List;
 
 import javax.ws.rs.Consumes;
@@ -99,6 +100,7 @@ public class NodeResource {
         for (Node node : nodes) {
             nodeIds.add(node.getId().getValue());
         }
+        Collections.sort(nodeIds);
 
         String response = objectMapper.writeValueAsString(nodeIds);
         return Response.status(Response.Status.OK)