From 7cb25c211e4953e01d76aca8a115bd2d43d64e91 Mon Sep 17 00:00:00 2001 From: Jozef Gloncak Date: Tue, 27 Jan 2015 15:28:17 +0100 Subject: [PATCH] BUG 2281 - Incorrect IP address conversion It looks like reported problem (do not cut the ip mask off) was fixed. Test is passing after uncommenting commented parts. Change-Id: If81e4f675ac2bae25d57a18a14cf3e3802faecea Signed-off-by: Jozef Gloncak --- .../md/core/sal/convertor/ActionConvertorV10Test.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertorV10Test.java b/openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertorV10Test.java index 38d698a9e4..2d4ca9d261 100644 --- a/openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertorV10Test.java +++ b/openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertorV10Test.java @@ -52,6 +52,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId; import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanPcp; import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.IpMatchBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DlAddressAction; +import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IpAddressAction; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthActionBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTosAction; @@ -185,15 +186,13 @@ public class ActionConvertorV10Test { action = actions.get(4); Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common" + ".action.rev130731.SetNwSrc", action.getType().getName()); - // FIXME - fix ipv4 address translation - cut off network mask -// Assert.assertEquals("Wrong nw src", "10.0.0.1", action.getAugmentation(IpAddressAction.class) -// .getIpAddress().getValue()); + Assert.assertEquals("Wrong nw src", "10.0.0.1", action.getAugmentation(IpAddressAction.class) + .getIpAddress().getValue()); action = actions.get(5); Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common" + ".action.rev130731.SetNwDst", action.getType().getName()); - // FIXME - fix ipv4 address translation - cut off network mask -// Assert.assertEquals("Wrong nw dst", "10.0.0.2", action.getAugmentation(IpAddressAction.class) -// .getIpAddress().getValue()); + Assert.assertEquals("Wrong nw dst", "10.0.0.2", action.getAugmentation(IpAddressAction.class) + .getIpAddress().getValue()); action = actions.get(6); Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common" + ".action.rev130731.SetTpSrc", action.getType().getName()); -- 2.36.6