Merge "Increase timeout for waiting for broker service in sal-binding-it."
[controller.git] / opendaylight / md-sal / compatibility / sal-compatibility / src / main / java / org / opendaylight / controller / sal / compatibility / MDFlowMapping.xtend
index b0f6065bac751a25ceb57d6d1bde65ed9550f6cb..fe545b09888c6153b225f8467bab4456134f4cfe 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.sal.compatibility;
 
 import com.google.common.net.InetAddresses
@@ -135,7 +142,7 @@ public class MDFlowMapping {
 
     }
     
-    public static def toMDFlow(Flow sourceFlow) {
+    public static def toMDFlow(Flow sourceFlow, String flowId) {
        if (sourceFlow == null)
             throw new IllegalArgumentException();
        val it = new FlowBuilder();
@@ -143,7 +150,7 @@ public class MDFlowMapping {
        idleTimeout = sourceFlow.idleTimeout as int
        cookie = BigInteger.valueOf(sourceFlow.id)
        priority = sourceFlow.priority as int
-       id = new FlowId(sourceFlow.id)
+       id = new FlowId(flowId)
     
        val sourceActions = sourceFlow.actions;
        val targetActions = new ArrayList<Action>();