not able to augment instruction with MeterIdInstruction

asked 2015-09-19 10:44:45 -0700

Denis gravatar image

Im trying to add per-flow meters. Adding the meter itself works fine, but assigning the meter to flow is not working. I'm not able to add the augmentation of MeterIdInstruction on a instruction.

ODL-Version: stable / helium (1.4.6-snapshot) Switch: cpqd

Here's my code:


   import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction;
   import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder;
   import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MeterIdInstruction;
   import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MeterIdInstructionBuilder;

relevant code:

    long meterId = meter.getMeterId();
    MeterIdInstructionBuilder medBuilder = new MeterIdInstructionBuilder();
    new InstructionBuilder().addAugmentation(MeterIdInstruction.class,; //

When trying to compile, there occurs this error:

The method addAugmentation(Class<? extends Augmentation<Instruction>>, Augmentation<Instruction>) in the type InstructionBuilder is not applicable for the arguments (Class<MeterIdInstruction>, MeterIdInstruction)

Dont know, how to go from here. Does anyone know, how to solve this ?

edit retag flag offensive close merge delete