BUG-835 Reserve ports should be logical ports - part2 74/8374/1
authorMichal Rehak <mirehak@cisco.com>
Thu, 26 Jun 2014 14:54:31 +0000 (16:54 +0200)
committerMichal Rehak <mirehak@cisco.com>
Thu, 26 Jun 2014 14:54:31 +0000 (16:54 +0200)
- fixed unit tests

Change-Id: I10bd053fb70c5dfe198d171202b0a7bd7f70ef06
Signed-off-by: Michal Rehak <mirehak@cisco.com>
opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/NodeMappingTest.java

index f986310..8a23ebc 100644 (file)
@@ -14,6 +14,7 @@ import org.opendaylight.controller.sal.core.ConstructionException;
 import org.opendaylight.controller.sal.core.MacAddress;
 import org.opendaylight.controller.sal.core.Node.NodeIDType;
 import org.opendaylight.controller.sal.core.NodeConnector.NodeConnectorIDType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.OutputPortValues;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
@@ -115,13 +116,13 @@ public class NodeMappingTest {
         ncId = buildNodeConnectorId("1", "42");
         Assert.assertEquals(NodeConnectorIDType.OPENFLOW, NodeMapping.toNodeConnectorType(ncId, nodeId ));
 
-        ncId = buildNodeConnectorId("1", "4294967293");
+        ncId = buildNodeConnectorId("1", OutputPortValues.CONTROLLER.toString());
         Assert.assertEquals(NodeConnectorIDType.CONTROLLER, NodeMapping.toNodeConnectorType(ncId, nodeId ));
 
-        ncId = buildNodeConnectorId("1", "4294967290");
+        ncId = buildNodeConnectorId("1", OutputPortValues.NORMAL.toString());
         Assert.assertEquals(NodeConnectorIDType.HWPATH, NodeMapping.toNodeConnectorType(ncId, nodeId ));
 
-        ncId = buildNodeConnectorId("1", "4294967294");
+        ncId = buildNodeConnectorId("1", OutputPortValues.LOCAL.toString());
         Assert.assertEquals(NodeConnectorIDType.SWSTACK, NodeMapping.toNodeConnectorType(ncId, nodeId ));
     }
 

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.