Search in sources :

Example 1 with MultipartRequestBody

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.

the class MultipartRequestInputFactory method serializePortStatsBody.

private static void serializePortStatsBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
    MultipartRequestPortStatsCase portstatsCase = (MultipartRequestPortStatsCase) multipartRequestBody;
    MultipartRequestPortStats portstats = portstatsCase.getMultipartRequestPortStats();
    output.writeInt(portstats.getPortNo().intValue());
    output.writeZero(PADDING_IN_MULTIPART_REQUEST_PORTSTATS_BODY);
}
Also used : MultipartRequestPortStatsCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestPortStatsCase) MultipartRequestPortStats(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.port.stats._case.MultipartRequestPortStats)

Example 2 with MultipartRequestBody

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.

the class MultipartRequestInputFactory method serializeMeterConfigBody.

private static void serializeMeterConfigBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
    MultipartRequestMeterConfigCase meterConfigCase = (MultipartRequestMeterConfigCase) multipartRequestBody;
    MultipartRequestMeterConfig meterConfig = meterConfigCase.getMultipartRequestMeterConfig();
    output.writeInt(meterConfig.getMeterId().getValue().intValue());
    output.writeZero(PADDING_IN_MULTIPART_REQUEST_METER_CONFIG_BODY);
}
Also used : MultipartRequestMeterConfig(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.meter.config._case.MultipartRequestMeterConfig) MultipartRequestMeterConfigCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestMeterConfigCase)

Example 3 with MultipartRequestBody

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.

the class MultipartRequestInputFactory method serializeFlowBody.

private void serializeFlowBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
    MultipartRequestFlowCase flowCase = (MultipartRequestFlowCase) multipartRequestBody;
    MultipartRequestFlow flow = flowCase.getMultipartRequestFlow();
    output.writeByte(flow.getTableId().byteValue());
    output.writeZero(PADDING_IN_MULTIPART_REQUEST_FLOW_BODY_01);
    output.writeInt(flow.getOutPort().intValue());
    output.writeInt(flow.getOutGroup().intValue());
    output.writeZero(PADDING_IN_MULTIPART_REQUEST_FLOW_BODY_02);
    output.writeLong(flow.getCookie().longValue());
    output.writeLong(flow.getCookieMask().longValue());
    OFSerializer<Match> serializer = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF13_VERSION_ID, Match.class));
    serializer.serialize(flow.getMatch(), output);
}
Also used : MultipartRequestFlowCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestFlowCase) MultipartRequestFlow(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.flow._case.MultipartRequestFlow) Match(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match)

Example 4 with MultipartRequestBody

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.

the class OF10StatsRequestInputFactory method serializeExperimenterBody.

private void serializeExperimenterBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
    MultipartRequestExperimenterCase expCase = (MultipartRequestExperimenterCase) multipartRequestBody;
    MultipartRequestExperimenter experimenter = expCase.getMultipartRequestExperimenter();
    final long expId = experimenter.getExperimenter().getValue().longValue();
    // write experimenterId
    output.writeInt((int) expId);
    OFSerializer<ExperimenterDataOfChoice> serializer = registry.getSerializer(ExperimenterSerializerKeyFactory.createMultipartRequestSerializerKey(EncodeConstants.OF10_VERSION_ID, expId, -1));
    serializer.serialize(experimenter.getExperimenterDataOfChoice(), output);
}
Also used : MultipartRequestExperimenter(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.experimenter._case.MultipartRequestExperimenter) ExperimenterDataOfChoice(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.experimenter.core.ExperimenterDataOfChoice) MultipartRequestExperimenterCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCase)

Example 5 with MultipartRequestBody

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.

the class OF10StatsRequestInputFactory method serializePortBody.

private static void serializePortBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
    MultipartRequestPortStatsCase portstatsCase = (MultipartRequestPortStatsCase) multipartRequestBody;
    MultipartRequestPortStats portstats = portstatsCase.getMultipartRequestPortStats();
    output.writeShort(portstats.getPortNo().intValue());
    output.writeZero(PADDING_IN_MULTIPART_REQUEST_PORT_BODY);
}
Also used : MultipartRequestPortStatsCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestPortStatsCase) MultipartRequestPortStats(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.port.stats._case.MultipartRequestPortStats)

Aggregations

MultipartType (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType)10 Test (org.junit.Test)8 MultipartRequestInput (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput)8 MultipartRequestBody (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody)8 MultipartRequestDescCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestDescCaseBuilder)3 MultipartRequestFlowCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestFlowCase)3 MultipartRequestQueueCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestQueueCase)3 MultipartRequestFlow (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.flow._case.MultipartRequestFlow)3 MultipartRequestQueue (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.queue._case.MultipartRequestQueue)3 Ipv4Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address)2 MacAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress)2 MultipartRequestDesc (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.multipart.request.multipart.request.body.MultipartRequestDesc)2 MultipartRequestPortDesc (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.multipart.request.multipart.request.body.MultipartRequestPortDesc)2 MultipartRequestFlowStats (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.multipart.request.multipart.request.body.MultipartRequestFlowStats)2 MultipartRequestGroupDesc (org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.multipart.request.multipart.request.body.MultipartRequestGroupDesc)2 MultipartRequestGroupStats (org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.multipart.request.multipart.request.body.MultipartRequestGroupStats)2 MultipartRequestBody (org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.multipart.request.MultipartRequestBody)2 MatchV10 (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10)2 MatchV10Builder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10Builder)2 MultipartRequestAggregateCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCase)2