Search in sources :

Example 1 with PortStatsMultipartWriter

use of org.opendaylight.openflowplugin.impl.datastore.multipart.PortStatsMultipartWriter in project openflowplugin by opendaylight.

the class MultipartWriterProviderFactory method createDefaultProvider.

/**
 * Create default #{@link MultipartWriterProvider}.
 *
 * @param deviceContext device context
 * @return the statistics writer provider
 */
public static MultipartWriterProvider createDefaultProvider(final DeviceContext deviceContext) {
    final InstanceIdentifier<Node> instanceIdentifier = deviceContext.getDeviceInfo().getNodeInstanceIdentifier();
    final MultipartWriterProvider provider = new MultipartWriterProvider();
    // Periodic/direct statistics writers
    provider.register(MultipartType.OFPMPTABLE, new TableStatsMultipartWriter(deviceContext, instanceIdentifier));
    provider.register(MultipartType.OFPMPGROUP, new GroupStatsMultipartWriter(deviceContext, instanceIdentifier));
    provider.register(MultipartType.OFPMPMETER, new MeterStatsMultipartWriter(deviceContext, instanceIdentifier));
    provider.register(MultipartType.OFPMPPORTSTATS, new PortStatsMultipartWriter(deviceContext, instanceIdentifier, deviceContext.getPrimaryConnectionContext().getFeatures()));
    provider.register(MultipartType.OFPMPQUEUE, new QueueStatsMultipartWriter(deviceContext, instanceIdentifier));
    provider.register(MultipartType.OFPMPFLOW, new FlowStatsMultipartWriter(deviceContext, instanceIdentifier, deviceContext, deviceContext.getDeviceInfo().getVersion()));
    provider.register(MultipartType.OFPMPGROUPDESC, new GroupDescMultipartWriter(deviceContext, instanceIdentifier, deviceContext));
    provider.register(MultipartType.OFPMPMETERCONFIG, new MeterConfigMultipartWriter(deviceContext, instanceIdentifier, deviceContext));
    // Device initialization writers
    provider.register(MultipartType.OFPMPDESC, new DescMultipartWriter(deviceContext, instanceIdentifier, deviceContext.getPrimaryConnectionContext()));
    provider.register(MultipartType.OFPMPGROUPFEATURES, new GroupFeaturesMultipartWriter(deviceContext, instanceIdentifier));
    provider.register(MultipartType.OFPMPMETERFEATURES, new MeterFeaturesMultipartWriter(deviceContext, instanceIdentifier));
    provider.register(MultipartType.OFPMPTABLEFEATURES, new TableFeaturesMultipartWriter(deviceContext, instanceIdentifier));
    provider.register(MultipartType.OFPMPPORTDESC, new PortDescMultipartWriter(deviceContext, instanceIdentifier, deviceContext.getPrimaryConnectionContext().getFeatures()));
    return provider;
}
Also used : DescMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.DescMultipartWriter) GroupDescMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.GroupDescMultipartWriter) PortDescMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.PortDescMultipartWriter) TableStatsMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.TableStatsMultipartWriter) GroupStatsMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.GroupStatsMultipartWriter) Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) FlowStatsMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.FlowStatsMultipartWriter) TableFeaturesMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.TableFeaturesMultipartWriter) GroupDescMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.GroupDescMultipartWriter) QueueStatsMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.QueueStatsMultipartWriter) MeterFeaturesMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.MeterFeaturesMultipartWriter) GroupFeaturesMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.GroupFeaturesMultipartWriter) PortStatsMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.PortStatsMultipartWriter) PortDescMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.PortDescMultipartWriter) MeterStatsMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.MeterStatsMultipartWriter) MeterConfigMultipartWriter(org.opendaylight.openflowplugin.impl.datastore.multipart.MeterConfigMultipartWriter)

Aggregations

DescMultipartWriter (org.opendaylight.openflowplugin.impl.datastore.multipart.DescMultipartWriter)1 FlowStatsMultipartWriter (org.opendaylight.openflowplugin.impl.datastore.multipart.FlowStatsMultipartWriter)1 GroupDescMultipartWriter (org.opendaylight.openflowplugin.impl.datastore.multipart.GroupDescMultipartWriter)1 GroupFeaturesMultipartWriter (org.opendaylight.openflowplugin.impl.datastore.multipart.GroupFeaturesMultipartWriter)1 GroupStatsMultipartWriter (org.opendaylight.openflowplugin.impl.datastore.multipart.GroupStatsMultipartWriter)1 MeterConfigMultipartWriter (org.opendaylight.openflowplugin.impl.datastore.multipart.MeterConfigMultipartWriter)1 MeterFeaturesMultipartWriter (org.opendaylight.openflowplugin.impl.datastore.multipart.MeterFeaturesMultipartWriter)1 MeterStatsMultipartWriter (org.opendaylight.openflowplugin.impl.datastore.multipart.MeterStatsMultipartWriter)1 PortDescMultipartWriter (org.opendaylight.openflowplugin.impl.datastore.multipart.PortDescMultipartWriter)1 PortStatsMultipartWriter (org.opendaylight.openflowplugin.impl.datastore.multipart.PortStatsMultipartWriter)1 QueueStatsMultipartWriter (org.opendaylight.openflowplugin.impl.datastore.multipart.QueueStatsMultipartWriter)1 TableFeaturesMultipartWriter (org.opendaylight.openflowplugin.impl.datastore.multipart.TableFeaturesMultipartWriter)1 TableStatsMultipartWriter (org.opendaylight.openflowplugin.impl.datastore.multipart.TableStatsMultipartWriter)1 Node (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node)1