Search in sources :

Example 11 with FlowRemovedMask

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.FlowRemovedMask in project openflowplugin by opendaylight.

the class SetAsyncInputMessageFactoryTest method createFlowRemowedMask.

private static List<FlowRemovedMask> createFlowRemowedMask() {
    final List<FlowRemovedMask> masks = new ArrayList<>();
    FlowRemovedMaskBuilder builder;
    // OFPCR_ROLE_EQUAL or OFPCR_ROLE_MASTER
    builder = new FlowRemovedMaskBuilder();
    List<FlowRemovedReason> flowRemovedReasonList = new ArrayList<>();
    flowRemovedReasonList.add(FlowRemovedReason.OFPRRIDLETIMEOUT);
    flowRemovedReasonList.add(FlowRemovedReason.OFPRRHARDTIMEOUT);
    flowRemovedReasonList.add(FlowRemovedReason.OFPRRDELETE);
    flowRemovedReasonList.add(FlowRemovedReason.OFPRRGROUPDELETE);
    builder.setMask(flowRemovedReasonList);
    masks.add(builder.build());
    // OFPCR_ROLE_SLAVE
    builder = new FlowRemovedMaskBuilder();
    flowRemovedReasonList = new ArrayList<>();
    builder.setMask(flowRemovedReasonList);
    masks.add(builder.build());
    return masks;
}
Also used : FlowRemovedMaskBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.FlowRemovedMaskBuilder) ArrayList(java.util.ArrayList) FlowRemovedMask(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.FlowRemovedMask) FlowRemovedReason(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowRemovedReason)

Aggregations

FlowRemovedMask (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.FlowRemovedMask)8 ArrayList (java.util.ArrayList)6 FlowRemovedReason (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowRemovedReason)6 FlowRemovedMaskBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.FlowRemovedMaskBuilder)6 ByteBuf (io.netty.buffer.ByteBuf)3 Test (org.junit.Test)3 HashMap (java.util.HashMap)2 GetAsyncOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncOutput)2 GetAsyncOutputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncOutputBuilder)1 SetAsyncInput (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.SetAsyncInput)1 SetAsyncInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.SetAsyncInputBuilder)1