summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
5ae1ab6)
StatisticManager needs to delete the statistics and the flows too.
* fix a path to delete whole flow (no only statistics)
Note: bugfix could help for bug 1345 too.
Change-Id: I8a8bee995d42daa9f1832cc8e26cc2c02b2e64c1
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
import org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.GenericStatistics;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.GenericStatistics;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Override
protected void cleanupSingleStat(final DataModificationTransaction trans, final FlowStatsEntry item) {
@Override
protected void cleanupSingleStat(final DataModificationTransaction trans, final FlowStatsEntry item) {
- InstanceIdentifier<?> flowRef = getNodeIdentifierBuilder()
- .augmentation(FlowCapableNode.class)
- .child(Table.class, new TableKey(item.getTableId()))
- .child(Flow.class,item.getFlow().getKey())
- .augmentation(FlowStatisticsData.class).toInstance();
+ KeyedInstanceIdentifier<Flow, FlowKey> flowRef = getNodeIdentifier()
+ .augmentation(FlowCapableNode.class)
+ .child(Table.class, new TableKey(item.getTableId()))
+ .child(Flow.class, item.getFlow().getKey());
trans.removeOperationalData(flowRef);
}
trans.removeOperationalData(flowRef);
}