X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fcompatibility%2Fflow-management-compatibility%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Ffrm%2Fcompatibility%2FFlowConfigMapping.xtend;h=e15b3c6c855c213686d5303d09bafcd4eb52970e;hb=405ea7ce68d22bd3d2501857c5253793b581b086;hp=e4d917337848967a0917e24538bcb28348f11184;hpb=e87fa215eac79bc76b0addbb1f5beebfaa8ca5f7;p=controller.git diff --git a/opendaylight/md-sal/compatibility/flow-management-compatibility/src/main/java/org/opendaylight/controller/md/frm/compatibility/FlowConfigMapping.xtend b/opendaylight/md-sal/compatibility/flow-management-compatibility/src/main/java/org/opendaylight/controller/md/frm/compatibility/FlowConfigMapping.xtend index e4d9173378..e15b3c6c85 100644 --- a/opendaylight/md-sal/compatibility/flow-management-compatibility/src/main/java/org/opendaylight/controller/md/frm/compatibility/FlowConfigMapping.xtend +++ b/opendaylight/md-sal/compatibility/flow-management-compatibility/src/main/java/org/opendaylight/controller/md/frm/compatibility/FlowConfigMapping.xtend @@ -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.md.frm.compatibility import org.opendaylight.controller.forwardingrulesmanager.FlowConfig @@ -24,14 +31,13 @@ class FlowConfigMapping { idleTimeout = source.idleTimeout match = source.match node = source.node - key = new FlowKey(sourceCfg.name,node); + key = new FlowKey(Long.parseLong(sourceCfg.name),node); return it.build(); } static def toFlowConfig(Flow sourceCfg) { - val flow = toFlow(sourceCfg); val it = new FlowConfig; - name = sourceCfg.key.id + name = String.valueOf(sourceCfg.id); node = sourceCfg.node.toADNode(); return it @@ -40,7 +46,7 @@ class FlowConfigMapping { static def toFlowConfig(InstanceIdentifier identifier) { val it = new FlowConfig() val FlowKey key = ((identifier.path.get(2) as IdentifiableItem).key) - name = key.id; + name = String.valueOf(key.id); node = key.node.toADNode(); return it;