use of org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.
the class OF10StatsRequestInputPortStatsFactoryTest method createMultipartRequestBody.
private static MultipartRequestBody createMultipartRequestBody() {
MultipartRequestPortStatsCaseBuilder caseBuilder = new MultipartRequestPortStatsCaseBuilder();
MultipartRequestPortStatsBuilder portBuilder = new MultipartRequestPortStatsBuilder();
portBuilder.setPortNo(15L);
caseBuilder.setMultipartRequestPortStats(portBuilder.build());
return caseBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.
the class OF10StatsRequestInputTableFactoryTest method createMultipartRequestBody.
private static MultipartRequestBody createMultipartRequestBody() {
MultipartRequestTableCaseBuilder caseBuilder = new MultipartRequestTableCaseBuilder();
MultipartRequestTableBuilder tableBuilder = new MultipartRequestTableBuilder();
tableBuilder.setEmpty(true);
caseBuilder.setMultipartRequestTable(tableBuilder.build());
return caseBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.
the class MultipartRequestInputFactory method serializeeGroupStatsBody.
private static void serializeeGroupStatsBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
MultipartRequestGroupCase groupStatsCase = (MultipartRequestGroupCase) multipartRequestBody;
MultipartRequestGroup groupStats = groupStatsCase.getMultipartRequestGroup();
output.writeInt(groupStats.getGroupId().getValue().intValue());
output.writeZero(PADDING_IN_MULTIPART_REQUEST_GROUP_BODY);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.
the class MultipartRequestInputFactory method serializeTableFeaturesBody.
private void serializeTableFeaturesBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
if (multipartRequestBody != null) {
MultipartRequestTableFeaturesCase tableFeaturesCase = (MultipartRequestTableFeaturesCase) multipartRequestBody;
MultipartRequestTableFeatures tableFeatures = tableFeaturesCase.getMultipartRequestTableFeatures();
if (tableFeatures.getTableFeatures() != null) {
for (TableFeatures currTableFeature : tableFeatures.getTableFeatures()) {
final int tableFeatureLengthIndex = output.writerIndex();
output.writeShort(EncodeConstants.EMPTY_LENGTH);
output.writeByte(currTableFeature.getTableId());
output.writeZero(PADDING_IN_MULTIPART_REQUEST_TABLE_FEATURES_BODY);
final byte[] nameBytes = currTableFeature.getName().getBytes(StandardCharsets.UTF_8);
output.writeBytes(nameBytes);
output.writeZero(32 - nameBytes.length);
output.writeLong(currTableFeature.getMetadataMatch().longValue());
output.writeLong(currTableFeature.getMetadataWrite().longValue());
output.writeInt(createTableConfigBitmask(currTableFeature.getConfig()));
output.writeInt(currTableFeature.getMaxEntries().intValue());
writeTableFeatureProperties(output, currTableFeature.getTableFeatureProperties());
output.setShort(tableFeatureLengthIndex, output.writerIndex() - tableFeatureLengthIndex);
}
}
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.
the class MultipartRequestInputFactory method serializeMeterBody.
private static void serializeMeterBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
MultipartRequestMeterCase meterCase = (MultipartRequestMeterCase) multipartRequestBody;
MultipartRequestMeter meter = meterCase.getMultipartRequestMeter();
output.writeInt(meter.getMeterId().getValue().intValue());
output.writeZero(PADDING_IN_MULTIPART_REQUEST_METER_BODY);
}
Aggregations