import org.opendaylight.openflowplugin.api.openflow.md.util.OpenflowVersion;\r
import org.opendaylight.openflowplugin.extension.api.path.ActionPath;\r
import org.opendaylight.openflowplugin.openflow.md.util.OpenflowPortsUtil;\r
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Prefix;\r
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Prefix;\r
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;\r
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix;\r
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix;\r
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;\r
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.GroupActionCase;\r
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.OutputActionCase;\r
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PopMplsActionCase;\r
SetNwSrcActionCaseBuilder nwSrcCaseBuilder = new SetNwSrcActionCaseBuilder();\r
SetNwSrcActionBuilder nwSrcBuilder = new SetNwSrcActionBuilder();\r
Ipv4Builder ipv4Builder = new Ipv4Builder();\r
- ipv4Builder.setIpv4Address(new Ipv4Prefix("10.0.0.1/24"));\r
+ /* Correct canonical form for v4 prefix!!! */\r
+ ipv4Builder.setIpv4Address(new Ipv4Prefix("10.0.0.0/24"));\r
nwSrcBuilder.setAddress(ipv4Builder.build());\r
nwSrcCaseBuilder.setSetNwSrcAction(nwSrcBuilder.build());\r
actionBuilder.setAction(nwSrcCaseBuilder.build());\r
SetTpSrcActionCaseBuilder tpSrcCaseBuilder = new SetTpSrcActionCaseBuilder();\r
SetTpSrcActionBuilder tpSrcBuilder = new SetTpSrcActionBuilder();\r
tpSrcBuilder.setPort(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types\r
- .rev100924.PortNumber(54));\r
+ .rev130715.PortNumber(54));\r
tpSrcCaseBuilder.setSetTpSrcAction(tpSrcBuilder.build());\r
actionBuilder.setAction(tpSrcCaseBuilder.build());\r
actionBuilder.setOrder(6);\r
SetTpDstActionCaseBuilder tpDstCaseBuilder = new SetTpDstActionCaseBuilder();\r
SetTpDstActionBuilder tpDstBuilder = new SetTpDstActionBuilder();\r
tpDstBuilder.setPort(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types\r
- .rev100924.PortNumber(45));\r
+ .rev130715.PortNumber(45));\r
tpDstCaseBuilder.setSetTpDstAction(tpDstBuilder.build());\r
actionBuilder.setAction(tpDstCaseBuilder.build());\r
actionBuilder.setOrder(7);\r
nwSrcCaseBuilder = new SetNwSrcActionCaseBuilder();\r
nwSrcBuilder = new SetNwSrcActionBuilder();\r
Ipv6Builder ipv6Builder = new Ipv6Builder();\r
- ipv6Builder.setIpv6Address(new Ipv6Prefix("0000:0000:0000:0000:0000:0000:0000:0005/128"));\r
+ /* Use canonical form, 00:00:0000 is not a valid v6 notation */\r
+ ipv6Builder.setIpv6Address(new Ipv6Prefix("::5/128"));\r
nwSrcBuilder.setAddress(ipv6Builder.build());\r
nwSrcCaseBuilder.setSetNwSrcAction(nwSrcBuilder.build());\r
actionBuilder.setAction(nwSrcCaseBuilder.build());\r
nwDstCaseBuilder = new SetNwDstActionCaseBuilder();\r
nwDstBuilder = new SetNwDstActionBuilder();\r
ipv6Builder = new Ipv6Builder();\r
- ipv6Builder.setIpv6Address(new Ipv6Prefix("0000:0000:0000:0000:0000:0000:0000:0008/64"));\r
+ /* Use canonical form, 00:00:0006/64 is not a valid v6 notation - this equates to ::/64 */\r
+ ipv6Builder.setIpv6Address(new Ipv6Prefix("::/64"));\r
nwDstBuilder.setAddress(ipv6Builder.build());\r
nwDstCaseBuilder.setSetNwDstAction(nwDstBuilder.build());\r
actionBuilder.setAction(nwDstCaseBuilder.build());\r
+ ".action.rev150203.action.grouping.action.choice.SetFieldCase", action.getActionChoice().getImplementedInterface().getName());\r
entry = setFieldCase.getSetFieldAction().getMatchEntry().get(0);\r
checkEntryHeader(entry, org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv4Src.class, false);\r
- Assert.assertEquals("Wrong ipv4 src", "10.0.0.1", ((Ipv4SrcCase) entry.getMatchEntryValue()).getIpv4Src()\r
+ Assert.assertEquals("Wrong ipv4 src", "10.0.0.0", ((Ipv4SrcCase) entry.getMatchEntryValue()).getIpv4Src()\r
.getIpv4Address().getValue());\r
\r
action = actions.get(5);\r
+ ".action.rev150203.action.grouping.action.choice.SetFieldCase", action.getActionChoice().getImplementedInterface().getName());\r
entry = setFieldCase.getSetFieldAction().getMatchEntry().get(0);\r
checkEntryHeader(entry, org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Src.class, false);\r
- Assert.assertEquals("Wrong ipv4 src", "0000:0000:0000:0000:0000:0000:0000:0005",\r
+ Assert.assertEquals("Wrong ipv6 src", "::5",\r
((Ipv6SrcCase) entry.getMatchEntryValue()).getIpv6Src().getIpv6Address().getValue());\r
\r
action = actions.get(11);\r
+ ".action.rev150203.action.grouping.action.choice.SetFieldCase", action.getActionChoice().getImplementedInterface().getName());\r
entry = setFieldCase.getSetFieldAction().getMatchEntry().get(0);\r
checkEntryHeader(entry, org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Dst.class, false);\r
- Assert.assertEquals("Wrong ipv4 dst", "0000:0000:0000:0000:0000:0000:0000:0008",\r
+ Assert.assertEquals("Wrong ipv6 dst", "::",\r
((Ipv6DstCase) entry.getMatchEntryValue()).getIpv6Dst().getIpv6Address().getValue());\r
}\r
\r
Assert.assertEquals("Wrong oxm field", field, entry.getOxmMatchField());\r
Assert.assertEquals("Wrong hasMask", hasMask, entry.isHasMask());\r
}\r
-}
\ No newline at end of file
+}\r