-Example output of a needed flow using an NX action
and an OXM set_field metadata:
actions=resubmit(10,0),write_metadata:0xc/0xc
-This is indeed odd. Returned List<Instruction>
rather then InstructionBuilder since the first
param was variable etc. Made a new method to
avoid breaking SFC or anyone using the current
NX augmentation. Will knock out match next.
This is indeed odd :s
rev131026.instruction.list.Instruction
rev131026.instruction.Instruction
Signed-off-by: Brent Salisbury <brent.salisbury@gmail.com>
return getInstructions(applyActionIns(dropAction()));
}
+ /**
+ * Get a list of Instructions containing Nicira extensions that can have
+ * additional OF/OXM instructions added to the returned Instruction list
+ *
+ * @param instructions org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instructions
+ * @return instruction list that additional
+ */
+ public static List<Instruction> getInstructionList(
+ org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction... instructions) {
+ ArrayList<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> ins
+ = new ArrayList<>();
+ int order = 0;
+ for (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction i : instructions) {
+ ins.add(new InstructionBuilder()
+ .setOrder(order++)
+ .setInstruction(i)
+ .build());
+ }
+ return ins;
+ }
}
\ No newline at end of file