Search in sources :

Example 11 with Queues

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.get.config.reply.Queues in project openflowplugin by opendaylight.

the class OF10QueueGetConfigReplyMessageFactoryTest method createQueues.

private List<Queues> createQueues() {
    List<Queues> list = new ArrayList<>();
    QueuesBuilder builder = new QueuesBuilder();
    builder.setQueueId(new QueueId(1L));
    builder.setQueueProperty(createPropertiesList());
    list.add(builder.build());
    return list;
}
Also used : ArrayList(java.util.ArrayList) QueueId(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId) Queues(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.get.config.reply.Queues) QueuesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.get.config.reply.QueuesBuilder)

Example 12 with Queues

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.get.config.reply.Queues in project openflowplugin by opendaylight.

the class AllQueuesOnePortService method buildRequest.

@Override
protected OfHeader buildRequest(final Xid xid, final GetAllQueuesStatisticsFromGivenPortInput input) throws ServiceException {
    MultipartRequestQueueCaseBuilder caseBuilder = new MultipartRequestQueueCaseBuilder();
    MultipartRequestQueueBuilder mprQueueBuilder = new MultipartRequestQueueBuilder();
    // Select all queues
    // Select specific port
    final short version = getVersion();
    mprQueueBuilder.setPortNo(InventoryDataServiceUtil.portNumberfromNodeConnectorId(OpenflowVersion.get(version), input.getNodeConnectorId()));
    mprQueueBuilder.setQueueId(OFConstants.OFPQ_ALL);
    caseBuilder.setMultipartRequestQueue(mprQueueBuilder.build());
    // Set request body to main multipart request
    MultipartRequestInputBuilder mprInput = RequestInputUtils.createMultipartHeader(MultipartType.OFPMPQUEUE, xid.getValue(), version);
    mprInput.setMultipartRequestBody(caseBuilder.build());
    return mprInput.build();
}
Also used : MultipartRequestInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder) MultipartRequestQueueBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.queue._case.MultipartRequestQueueBuilder) MultipartRequestQueueCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestQueueCaseBuilder)

Aggregations

Queues (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.get.config.reply.Queues)9 ArrayList (java.util.ArrayList)6 QueueId (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId)6 QueuesBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.get.config.reply.QueuesBuilder)6 ByteBuf (io.netty.buffer.ByteBuf)5 PortNumber (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber)4 Test (org.junit.Test)3 RateQueueProperty (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueueProperty)3 GetQueueConfigOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetQueueConfigOutput)3 QueueProperty (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueueProperty)2 ExperimenterIdQueueProperty (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdQueueProperty)1 MultipartRequestInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder)1 MultipartRequestQueueCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestQueueCaseBuilder)1 MultipartRequestQueueBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.queue._case.MultipartRequestQueueBuilder)1