use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId 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;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId in project openflowplugin by opendaylight.
the class SetQueueActionDeserializerTest method testDeserialize.
@Test
public void testDeserialize() throws Exception {
final ByteBuf in = UnpooledByteBufAllocator.DEFAULT.buffer();
final int queueId = 10;
writeHeader(in);
in.writeInt(queueId);
final Action action = deserializeAction(in);
assertTrue(SetQueueActionCase.class.isInstance(action));
assertEquals(queueId, SetQueueActionCase.class.cast(action).getSetQueueAction().getQueueId().intValue());
assertEquals(0, in.readableBytes());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId in project openflowplugin by opendaylight.
the class QueueDirectStatisticsServiceTest method testStoreStatistics.
@Override
public void testStoreStatistics() throws Exception {
final QueueIdAndStatisticsMap map = mock(QueueIdAndStatisticsMap.class);
when(map.getQueueId()).thenReturn(new QueueId(QUEUE_NO));
final List<QueueIdAndStatisticsMap> maps = Collections.singletonList(map);
final GetQueueStatisticsOutput output = mock(GetQueueStatisticsOutput.class);
when(output.getQueueIdAndStatisticsMap()).thenReturn(maps);
multipartWriterProvider.lookup(MultipartType.OFPMPQUEUE).get().write(output, true);
verify(deviceContext).writeToTransactionWithParentsSlow(eq(LogicalDatastoreType.OPERATIONAL), any(), any());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId in project openflowplugin by opendaylight.
the class QueueDirectStatisticsServiceTest method testBuildRequestBody.
@Override
public void testBuildRequestBody() throws Exception {
final GetQueueStatisticsInput input = mock(GetQueueStatisticsInput.class);
when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
when(input.getQueueId()).thenReturn(new QueueId(QUEUE_NO));
when(input.getNodeConnectorId()).thenReturn(nodeConnectorId);
final MultipartRequestQueueStats body = (MultipartRequestQueueStats) ((MultipartRequest) service.buildRequest(new Xid(42L), input)).getMultipartRequestBody();
assertEquals(nodeConnectorId, body.getNodeConnectorId());
assertEquals(QUEUE_NO, body.getQueueId().getValue());
}
Aggregations