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);
});
}
Aggregations