Search in sources :

Example 11 with PortStatusMask

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

the class GetAsyncReplyMessageFactoryTest method createPortStatusMask.

private static List<PortStatusMask> createPortStatusMask() {
    final List<PortStatusMask> masks = new ArrayList<>();
    PortStatusMaskBuilder builder;
    builder = new PortStatusMaskBuilder();
    // OFPCR_ROLE_EQUAL or OFPCR_ROLE_MASTER
    List<PortReason> portReasonList = new ArrayList<>();
    portReasonList.add(PortReason.OFPPRADD);
    portReasonList.add(PortReason.OFPPRDELETE);
    portReasonList.add(PortReason.OFPPRMODIFY);
    builder.setMask(portReasonList);
    masks.add(builder.build());
    // OFPCR_ROLE_SLAVE
    builder = new PortStatusMaskBuilder();
    portReasonList = new ArrayList<>();
    builder.setMask(portReasonList);
    masks.add(builder.build());
    return masks;
}
Also used : PortReason(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortReason) ArrayList(java.util.ArrayList) PortStatusMaskBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.PortStatusMaskBuilder) PortStatusMask(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.PortStatusMask)

Aggregations

PortStatusMask (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.PortStatusMask)8 ArrayList (java.util.ArrayList)6 PortReason (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortReason)6 PortStatusMaskBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.PortStatusMaskBuilder)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