ONOS-4492 Fix bug of vrouter and floatingip can't syncronized between nodes

Change-Id: I8bad7a6419039cf67bc843f9b8c54f07fc4a02b7
diff --git a/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/RouterWebResource.java b/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/RouterWebResource.java
index 84fd73c..a4b3fa3 100644
--- a/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/RouterWebResource.java
+++ b/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/RouterWebResource.java
@@ -435,10 +435,10 @@
         } else if (gateway.get("external_fixed_ips").isNull()) {
             throw new IllegalArgumentException("external_fixed_ips should not be empty");
         }
-        Collection<FixedIp> fixedIpList = jsonNodeToFixedIp(gateway
+        Iterable<FixedIp> fixedIpList = jsonNodeToFixedIp(gateway
                 .get("external_fixed_ips"));
         RouterGateway gatewayObj = RouterGateway
-                .routerGateway(networkId, enableSnat, fixedIpList);
+                .routerGateway(networkId, enableSnat, Sets.newHashSet(fixedIpList));
         return gatewayObj;
     }
 
@@ -448,7 +448,7 @@
      * @param fixedIp the allocationPools JsonNode
      * @return a collection of fixedIp
      */
-    private Collection<FixedIp> jsonNodeToFixedIp(JsonNode fixedIp) {
+    private Iterable<FixedIp> jsonNodeToFixedIp(JsonNode fixedIp) {
         checkNotNull(fixedIp, JSON_NOT_NULL);
         ConcurrentMap<Integer, FixedIp> fixedIpMaps = Maps.newConcurrentMap();
         Integer i = 0;