Merge remote-tracking branch 'liblldp/master'
[openflowplugin.git] / openflowplugin / src / test / java / org / opendaylight / openflowplugin / openflow / md / core / sal / convertor / flow / FlowConvertorTest.java
1 /*\r
2  * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 \r
9 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.flow;\r
10 \r
11 import java.math.BigInteger;\r
12 import java.util.ArrayList;\r
13 import java.util.Collections;\r
14 import java.util.List;\r
15 import java.util.Optional;\r
16 import org.junit.Assert;\r
17 import org.junit.Before;\r
18 import org.junit.Test;\r
19 import org.opendaylight.openflowplugin.api.OFConstants;\r
20 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager;\r
21 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManagerFactory;\r
22 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionDatapathIdConvertorData;\r
23 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri;\r
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetVlanIdActionCaseBuilder;\r
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.id.action._case.SetVlanIdActionBuilder;\r
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action;\r
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder;\r
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInput;\r
29 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInputBuilder;\r
30 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowTableRef;\r
31 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.RemoveFlowInput;\r
32 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.RemoveFlowInputBuilder;\r
33 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.flow.update.UpdatedFlow;\r
34 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.flow.update.UpdatedFlowBuilder;\r
35 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.Flow;\r
36 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;\r
37 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowRef;\r
38 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.Instructions;\r
39 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.InstructionsBuilder;\r
40 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.Match;\r
41 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;\r
42 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder;\r
43 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ClearActionsCaseBuilder;\r
44 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.GoToTableCaseBuilder;\r
45 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.MeterCaseBuilder;\r
46 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.WriteActionsCaseBuilder;\r
47 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.WriteMetadataCaseBuilder;\r
48 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.apply.actions._case.ApplyActionsBuilder;\r
49 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.clear.actions._case.ClearActionsBuilder;\r
50 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.go.to.table._case.GoToTableBuilder;\r
51 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.meter._case.MeterBuilder;\r
52 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.write.actions._case.WriteActionsBuilder;\r
53 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.write.metadata._case.WriteMetadataBuilder;\r
54 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction;\r
55 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder;\r
56 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;\r
57 import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.EtherType;\r
58 import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId;\r
59 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterId;\r
60 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetTypeBuilder;\r
61 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatch;\r
62 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder;\r
63 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instruction.grouping.instruction.choice.ApplyActionsCase;\r
64 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instruction.grouping.instruction.choice.GotoTableCase;\r
65 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instruction.grouping.instruction.choice.MeterCase;\r
66 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instruction.grouping.instruction.choice.WriteActionsCase;\r
67 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instruction.grouping.instruction.choice.WriteMetadataCase;\r
68 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowModCommand;\r
69 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowModFlags;\r
70 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInputBuilder;\r
71 import org.opendaylight.yangtools.yang.binding.Augmentation;\r
72 import org.opendaylight.yangtools.yang.binding.DataContainer;\r
73 \r
74 /**\r
75  * @author michal.polkorab\r
76  *\r
77  */\r
78 public class FlowConvertorTest {\r
79     private ConvertorManager convertorManager;\r
80 \r
81     @Before\r
82     public void setUp() {\r
83         convertorManager = ConvertorManagerFactory.createDefaultManager();\r
84     }\r
85 \r
86     /**\r
87      * Tests {@link org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.flow.FlowConvertor#convert(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.Flow, org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionDatapathIdConvertorData)} }\r
88      */\r
89     @Test\r
90     public void test() {\r
91         RemoveFlowInputBuilder flowBuilder = new RemoveFlowInputBuilder();\r
92         flowBuilder.setBarrier(false);\r
93         flowBuilder.setCookie(new FlowCookie(new BigInteger("4")));\r
94         flowBuilder.setCookieMask(new FlowCookie(new BigInteger("5")));\r
95         flowBuilder.setTableId((short) 6);\r
96         flowBuilder.setStrict(true);\r
97         flowBuilder.setIdleTimeout(50);\r
98         flowBuilder.setHardTimeout(500);\r
99         flowBuilder.setPriority(40);\r
100         flowBuilder.setBufferId(18L);\r
101         flowBuilder.setOutPort(new BigInteger("65535"));\r
102         flowBuilder.setOutGroup(5000L);\r
103         flowBuilder.setFlags(null);\r
104         flowBuilder.setMatch(null);\r
105         RemoveFlowInput flow = flowBuilder.build();\r
106 \r
107         VersionDatapathIdConvertorData data = new VersionDatapathIdConvertorData(OFConstants.OFP_VERSION_1_3);\r
108         data.setDatapathId(new BigInteger("42"));\r
109 \r
110         List<FlowModInputBuilder> flowMod = convert(flow, data);\r
111 \r
112         Assert.assertEquals("Wrong version", 4, flowMod.get(0).getVersion().intValue());\r
113         Assert.assertEquals("Wrong cookie", 4, flowMod.get(0).getCookie().intValue());\r
114         Assert.assertEquals("Wrong cookie mask", 5, flowMod.get(0).getCookieMask().intValue());\r
115         Assert.assertEquals("Wrong table id", 6, flowMod.get(0).getTableId().getValue().intValue());\r
116         Assert.assertEquals("Wrong command", FlowModCommand.OFPFCDELETESTRICT, flowMod.get(0).getCommand());\r
117         Assert.assertEquals("Wrong idle timeout", 50, flowMod.get(0).getIdleTimeout().intValue());\r
118         Assert.assertEquals("Wrong hard timeout", 500, flowMod.get(0).getHardTimeout().intValue());\r
119         Assert.assertEquals("Wrong priority", 40, flowMod.get(0).getPriority().intValue());\r
120         Assert.assertEquals("Wrong buffer id", 18, flowMod.get(0).getBufferId().intValue());\r
121         Assert.assertEquals("Wrong out port", 65535, flowMod.get(0).getOutPort().getValue().intValue());\r
122         Assert.assertEquals("Wrong out group", 5000, flowMod.get(0).getOutGroup().intValue());\r
123         Assert.assertEquals("Wrong flags", new FlowModFlags(false, false, false, false, false), flowMod.get(0).getFlags());\r
124         Assert.assertEquals("Wrong match", "org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmMatchType",\r
125                 flowMod.get(0).getMatch().getType().getName());\r
126         Assert.assertEquals("Wrong match entries size", 0, flowMod.get(0).getMatch().getMatchEntry().size());\r
127     }\r
128 \r
129     /**\r
130      * Tests {@link org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.flow.FlowConvertor#convert(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.Flow, org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionDatapathIdConvertorData)} }\r
131      */\r
132     @Test\r
133     public void testOnlyModifyStrictCommand() {\r
134         UpdatedFlowBuilder flowBuilder = new UpdatedFlowBuilder();\r
135         flowBuilder.setStrict(true);\r
136         UpdatedFlow flow = flowBuilder.build();\r
137 \r
138         VersionDatapathIdConvertorData data = new VersionDatapathIdConvertorData(OFConstants.OFP_VERSION_1_0);\r
139         data.setDatapathId(new BigInteger("42"));\r
140 \r
141         List<FlowModInputBuilder> flowMod = convert(flow, data);\r
142 \r
143         Assert.assertEquals("Wrong version", 1, flowMod.get(0).getVersion().intValue());\r
144         Assert.assertEquals("Wrong command", FlowModCommand.OFPFCADD, flowMod.get(0).getCommand());\r
145     }\r
146 \r
147     /**\r
148      * Tests {@link org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.flow.FlowConvertor#convert(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.Flow, org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionDatapathIdConvertorData)} }\r
149      */\r
150     @Test\r
151     public void testInstructionsTranslation() {\r
152         AddFlowInputBuilder flowBuilder = new AddFlowInputBuilder();\r
153         InstructionsBuilder instructionsBuilder = new InstructionsBuilder();\r
154         List<Instruction> instructions = new ArrayList<>();\r
155         InstructionBuilder instructionBuilder = new InstructionBuilder();\r
156         GoToTableCaseBuilder goToCaseBuilder = new GoToTableCaseBuilder();\r
157         GoToTableBuilder goToBuilder = new GoToTableBuilder();\r
158         goToBuilder.setTableId((short) 1);\r
159         goToCaseBuilder.setGoToTable(goToBuilder.build());\r
160         instructionBuilder.setInstruction(goToCaseBuilder.build());\r
161         instructionBuilder.setOrder(0);\r
162         instructions.add(instructionBuilder.build());\r
163         instructionBuilder = new InstructionBuilder();\r
164         WriteMetadataCaseBuilder metaCaseBuilder = new WriteMetadataCaseBuilder();\r
165         WriteMetadataBuilder metaBuilder = new WriteMetadataBuilder();\r
166         metaBuilder.setMetadata(new BigInteger("2"));\r
167         metaBuilder.setMetadataMask(new BigInteger("3"));\r
168         metaCaseBuilder.setWriteMetadata(metaBuilder.build());\r
169         instructionBuilder.setInstruction(metaCaseBuilder.build());\r
170         instructionBuilder.setOrder(1);\r
171         instructions.add(instructionBuilder.build());\r
172         instructionBuilder = new InstructionBuilder();\r
173         WriteActionsCaseBuilder writeCaseBuilder = new WriteActionsCaseBuilder();\r
174         WriteActionsBuilder writeBuilder = new WriteActionsBuilder();\r
175         List<Action> actions = new ArrayList<>();\r
176         writeBuilder.setAction(actions);\r
177         writeCaseBuilder.setWriteActions(writeBuilder.build());\r
178         instructionBuilder.setInstruction(writeCaseBuilder.build());\r
179         instructionBuilder.setOrder(2);\r
180         instructions.add(instructionBuilder.build());\r
181         instructionBuilder = new InstructionBuilder();\r
182         ApplyActionsCaseBuilder applyCaseBuilder = new ApplyActionsCaseBuilder();\r
183         ApplyActionsBuilder applyBuilder = new ApplyActionsBuilder();\r
184         actions = new ArrayList<>();\r
185         applyBuilder.setAction(actions);\r
186         applyCaseBuilder.setApplyActions(applyBuilder.build());\r
187         instructionBuilder.setInstruction(applyCaseBuilder.build());\r
188         instructionBuilder.setOrder(3);\r
189         instructions.add(instructionBuilder.build());\r
190         instructionBuilder = new InstructionBuilder();\r
191         ClearActionsCaseBuilder clearCaseBuilder = new ClearActionsCaseBuilder();\r
192         ClearActionsBuilder clearBuilder = new ClearActionsBuilder();\r
193         actions = new ArrayList<>();\r
194         clearBuilder.setAction(actions);\r
195         clearCaseBuilder.setClearActions(clearBuilder.build());\r
196         instructionBuilder.setInstruction(clearCaseBuilder.build());\r
197         instructionBuilder.setOrder(4);\r
198         instructions.add(instructionBuilder.build());\r
199         instructionBuilder = new InstructionBuilder();\r
200         MeterCaseBuilder meterCaseBuilder = new MeterCaseBuilder();\r
201         MeterBuilder meterBuilder = new MeterBuilder();\r
202         meterBuilder.setMeterId(new MeterId(5L));\r
203         meterCaseBuilder.setMeter(meterBuilder.build());\r
204         instructionBuilder.setInstruction(meterCaseBuilder.build());\r
205         instructionBuilder.setOrder(5);\r
206         instructions.add(instructionBuilder.build());\r
207         instructionsBuilder.setInstruction(instructions);\r
208         flowBuilder.setInstructions(instructionsBuilder.build());\r
209         AddFlowInput flow = flowBuilder.build();\r
210 \r
211         VersionDatapathIdConvertorData data = new VersionDatapathIdConvertorData(OFConstants.OFP_VERSION_1_0);\r
212         data.setDatapathId(new BigInteger("42"));\r
213         List<FlowModInputBuilder> flowMod = convert(flow, data);\r
214 \r
215         Assert.assertEquals("Wrong version", 1, flowMod.get(0).getVersion().intValue());\r
216         Assert.assertEquals("Wrong command", FlowModCommand.OFPFCADD, flowMod.get(0).getCommand());\r
217         Assert.assertEquals("Wrong instructions size", 6, flowMod.get(0).getInstruction().size());\r
218         org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions\r
219         .grouping.Instruction instruction = flowMod.get(0).getInstruction().get(0);\r
220         Assert.assertEquals("Wrong type", "org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common"\r
221                 + ".instruction.rev130731.instruction.grouping.instruction.choice.GotoTableCase", instruction.getInstructionChoice().getImplementedInterface().getName());\r
222         GotoTableCase gotoTableCase = (GotoTableCase) instruction.getInstructionChoice();\r
223         Assert.assertEquals("Wrong table id", 1, gotoTableCase.getGotoTable().getTableId().intValue());\r
224         instruction = flowMod.get(0).getInstruction().get(1);\r
225         Assert.assertEquals("Wrong type", "org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common"\r
226                 + ".instruction.rev130731.instruction.grouping.instruction.choice.WriteMetadataCase", instruction.getInstructionChoice().getImplementedInterface().getName());\r
227         WriteMetadataCase writeMetadataCase = (WriteMetadataCase) instruction.getInstructionChoice();\r
228         Assert.assertArrayEquals("Wrong metadata", new byte[]{0, 0, 0, 0, 0, 0, 0, 2},\r
229                 writeMetadataCase.getWriteMetadata().getMetadata());\r
230         Assert.assertArrayEquals("Wrong metadata mask", new byte[]{0, 0, 0, 0, 0, 0, 0, 3},\r
231                 writeMetadataCase.getWriteMetadata().getMetadataMask());\r
232         \r
233         instruction = flowMod.get(0).getInstruction().get(2);\r
234         Assert.assertEquals("Wrong type", "org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common"\r
235                 + ".instruction.rev130731.instruction.grouping.instruction.choice.WriteActionsCase", instruction.getInstructionChoice().getImplementedInterface().getName());\r
236         WriteActionsCase writeActionsCase = (WriteActionsCase) instruction.getInstructionChoice();\r
237         Assert.assertEquals("Wrong actions size", 0, writeActionsCase.getWriteActions().getAction().size());\r
238         instruction = flowMod.get(0).getInstruction().get(3);\r
239         Assert.assertEquals("Wrong type", "org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common"\r
240                 + ".instruction.rev130731.instruction.grouping.instruction.choice.ApplyActionsCase", instruction.getInstructionChoice().getImplementedInterface().getName());\r
241         ApplyActionsCase applyActionsCase =  (ApplyActionsCase) instruction.getInstructionChoice();\r
242         Assert.assertEquals("Wrong actions size", 0, applyActionsCase.getApplyActions().getAction().size());\r
243         instruction = flowMod.get(0).getInstruction().get(4);\r
244         Assert.assertEquals("Wrong type", "org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common"\r
245                 + ".instruction.rev130731.instruction.grouping.instruction.choice.ClearActionsCase", instruction.getInstructionChoice().getImplementedInterface().getName());\r
246         instruction = flowMod.get(0).getInstruction().get(5);\r
247         Assert.assertEquals("Wrong type", "org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common"\r
248                 + ".instruction.rev130731.instruction.grouping.instruction.choice.MeterCase", instruction.getInstructionChoice().getImplementedInterface().getName());\r
249         MeterCase meterCase = (MeterCase) instruction.getInstructionChoice();\r
250         Assert.assertEquals("Wrong meter id", 5, meterCase.getMeter().getMeterId().intValue());\r
251     }\r
252 \r
253     @Test\r
254     public void testCloneAndAugmentFlowWithSetVlanId() {\r
255         MockFlow mockFlow = new MockFlow();\r
256         Action action1 = createAction(\r
257                 new SetVlanIdActionCaseBuilder().setSetVlanIdAction(\r
258                         new SetVlanIdActionBuilder().setVlanId(new VlanId(10)).build())\r
259                         .build(),\r
260                 0);\r
261 \r
262         mockFlow.setMatch(new MatchBuilder().setEthernetMatch(createEthernetMatch()).build());\r
263         mockFlow.setInstructions(toApplyInstruction(Collections.singletonList(action1)));\r
264 \r
265         VersionDatapathIdConvertorData data = new VersionDatapathIdConvertorData(OFConstants.OFP_VERSION_1_3);\r
266         data.setDatapathId(BigInteger.ONE);\r
267 \r
268         List<FlowModInputBuilder> flowModInputBuilders = convert(mockFlow, data);\r
269 \r
270         Assert.assertEquals(2, flowModInputBuilders.size());\r
271 \r
272     }\r
273 \r
274     private List<FlowModInputBuilder> convert(Flow flow, VersionDatapathIdConvertorData data) {\r
275         Optional<List<FlowModInputBuilder>> flowModOptional = convertorManager.convert(flow, data);\r
276         Assert.assertTrue("Flow convertor not found", flowModOptional.isPresent());\r
277         return flowModOptional.get();\r
278     }\r
279 \r
280     private static Action createAction(final org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action actionCase,\r
281                                        final int order) {\r
282         Action action = new ActionBuilder().setOrder(order).setAction(actionCase).build();\r
283         return action;\r
284     }\r
285 \r
286     private static EthernetMatch createEthernetMatch() {\r
287         EthernetMatchBuilder ethernetMatchBuilder = new EthernetMatchBuilder();\r
288         ethernetMatchBuilder.setEthernetType(new EthernetTypeBuilder().setType(new EtherType(33024L)).build());\r
289         return ethernetMatchBuilder.build();\r
290     }\r
291 \r
292     private static Instructions toApplyInstruction(\r
293             final List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> actions) {\r
294         return new InstructionsBuilder()\r
295                 .setInstruction(\r
296                         Collections.singletonList(\r
297                                 new InstructionBuilder()\r
298                                         .setOrder(0)\r
299                                         .setInstruction(\r
300                                                 new ApplyActionsCaseBuilder()\r
301                                                         .setApplyActions((new ApplyActionsBuilder()).setAction(actions).build())\r
302                                                         .build()\r
303                                         ).build())\r
304                 ).build();\r
305     }\r
306 \r
307     private static class MockFlow implements AddFlowInput {\r
308         private Instructions instructions;\r
309         private Match match;\r
310 \r
311         public void setInstructions(final Instructions instructions) {\r
312             this.instructions = instructions;\r
313         }\r
314 \r
315         public void setMatch(final Match match) {\r
316             this.match = match;\r
317         }\r
318 \r
319 \r
320         @Override\r
321         public FlowRef getFlowRef() {\r
322             return null;\r
323         }\r
324 \r
325         @Override\r
326         public <E extends Augmentation<AddFlowInput>> E getAugmentation(final Class<E> augmentationType) {\r
327             return null;\r
328         }\r
329 \r
330         @Override\r
331         public FlowTableRef getFlowTable() {\r
332             return null;\r
333         }\r
334 \r
335         @Override\r
336         public Match getMatch() {\r
337             return match;\r
338         }\r
339 \r
340         @Override\r
341         public Instructions getInstructions() {\r
342             return instructions;\r
343         }\r
344 \r
345         @Override\r
346         public String getContainerName() {\r
347             return null;\r
348         }\r
349 \r
350         @Override\r
351         public FlowCookie getCookieMask() {\r
352             return null;\r
353         }\r
354 \r
355         @Override\r
356         public Long getBufferId() {\r
357             return null;\r
358         }\r
359 \r
360         @Override\r
361         public BigInteger getOutPort() {\r
362             return null;\r
363         }\r
364 \r
365         @Override\r
366         public Long getOutGroup() {\r
367             return null;\r
368         }\r
369 \r
370         @Override\r
371         public org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowModFlags getFlags() {\r
372             return null;\r
373         }\r
374 \r
375         @Override\r
376         public String getFlowName() {\r
377             return null;\r
378         }\r
379 \r
380         @Override\r
381         public Boolean isInstallHw() {\r
382             return null;\r
383         }\r
384 \r
385         @Override\r
386         public Boolean isBarrier() {\r
387             return null;\r
388         }\r
389 \r
390         @Override\r
391         public Boolean isStrict() {\r
392             return null;\r
393         }\r
394 \r
395         @Override\r
396         public Integer getPriority() {\r
397             return null;\r
398         }\r
399 \r
400         @Override\r
401         public Integer getIdleTimeout() {\r
402             return null;\r
403         }\r
404 \r
405         @Override\r
406         public Integer getHardTimeout() {\r
407             return null;\r
408         }\r
409 \r
410         @Override\r
411         public FlowCookie getCookie() {\r
412             return null;\r
413         }\r
414 \r
415         @Override\r
416         public Short getTableId() {\r
417             return null;\r
418         }\r
419 \r
420         @Override\r
421         public NodeRef getNode() {\r
422             return null;\r
423         }\r
424 \r
425         @Override\r
426         public Uri getTransactionUri() {\r
427             return null;\r
428         }\r
429 \r
430         @Override\r
431         public Class<? extends DataContainer> getImplementedInterface() {\r
432             return Flow.class;\r
433         }\r
434     }\r
435 }