0

I am programming an SDN application using opendaylight. I see that an InstructionKey is required to create an instruction but I don't know where it is used. Any idea what it's use is?

I am always setting it to new InstructionKey(0) but I am not sure if this is correct. Thanks.

1 Answers1

0

The InstructionKey is not necessary. This is part of code I have created :

Instruction applyActionsInstruction = new InstructionBuilder()
        .setOrder(0).setInstruction(new ApplyActionsCaseBuilder()
                .setApplyActions(applyActions)
                .build())
        .build();

instructions.add(applyActionsInstruction);

Instructions allInstructions = new InstructionsBuilder()
        .setInstruction(instructions)
        .build();

and it works fine, the Instruction is created even without the key specified.

Marievi
  • 4,951
  • 1
  • 16
  • 33