Search in sources :

Example 1 with FlowCapableNodeConnectorStatisticsBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.flow.capable.node.connector.statistics.FlowCapableNodeConnectorStatisticsBuilder in project openflowplugin by opendaylight.

the class PortStatsMultipartWriter method storeStatistics.

@Override
public void storeStatistics(final NodeConnectorStatisticsAndPortNumberMap statistics, final boolean withParents) {
    statistics.getNodeConnectorStatisticsAndPortNumberMap().forEach(stat -> {
        final OpenflowVersion openflowVersion = OpenflowVersion.get(features.getVersion());
        final Long port = InventoryDataServiceUtil.portNumberfromNodeConnectorId(openflowVersion, stat.getNodeConnectorId());
        final NodeConnectorId id = InventoryDataServiceUtil.nodeConnectorIdfromDatapathPortNo(features.getDatapathId(), port, OpenflowVersion.get(features.getVersion()));
        writeToTransaction(getInstanceIdentifier().child(NodeConnector.class, new NodeConnectorKey(id)).augmentation(FlowCapableNodeConnectorStatisticsData.class).child(FlowCapableNodeConnectorStatistics.class), new FlowCapableNodeConnectorStatisticsBuilder(stat).build(), OFConstants.OFP_VERSION_1_0 == features.getVersion() || withParents);
    });
}
Also used : FlowCapableNodeConnectorStatisticsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.flow.capable.node.connector.statistics.FlowCapableNodeConnectorStatisticsBuilder) OpenflowVersion(org.opendaylight.openflowplugin.api.openflow.md.util.OpenflowVersion) NodeConnector(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector) NodeConnectorId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId) FlowCapableNodeConnectorStatistics(org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.flow.capable.node.connector.statistics.FlowCapableNodeConnectorStatistics) NodeConnectorKey(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnectorKey)

Aggregations

OpenflowVersion (org.opendaylight.openflowplugin.api.openflow.md.util.OpenflowVersion)1 NodeConnectorId (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId)1 NodeConnector (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector)1 NodeConnectorKey (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnectorKey)1 FlowCapableNodeConnectorStatistics (org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.flow.capable.node.connector.statistics.FlowCapableNodeConnectorStatistics)1 FlowCapableNodeConnectorStatisticsBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.flow.capable.node.connector.statistics.FlowCapableNodeConnectorStatisticsBuilder)1