package org.opendaylight.openflowplugin.impl.statistics.services.direct;
+import java.util.ArrayList;
+import java.util.List;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.openflowplugin.api.OFConstants;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.flow._case.MultipartRequestFlowBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import java.util.ArrayList;
-import java.util.List;
-
/**
* The Flow direct statistics service.
*/
@Override
protected void storeStatistics(GetFlowStatisticsOutput output) throws Exception {
- final InstanceIdentifier<FlowCapableNode> nodePath = getDeviceContext()
- .getDeviceState().getNodeInstanceIdentifier().augmentation(FlowCapableNode.class);
+ final InstanceIdentifier<FlowCapableNode> nodePath = getDeviceInfo().getNodeInstanceIdentifier().augmentation(FlowCapableNode.class);
for (final FlowAndStatisticsMapList flowStatistics : output.getFlowAndStatisticsMapList()) {
final FlowId flowId = generateFlowId(flowStatistics);
.child(Table.class, new TableKey(flowStatistics.getTableId()))
.child(Flow.class, flowKey);
- getDeviceContext().writeToTransactionWithParentsSlow(LogicalDatastoreType.OPERATIONAL, flowStatisticsPath, flowBuilder.build());
+ getTxFacade().writeToTransactionWithParentsSlow(LogicalDatastoreType.OPERATIONAL, flowStatisticsPath, flowBuilder.build());
}
}
final short tableId = flowStatistics.getTableId();
final FlowRegistryKey flowRegistryKey = FlowRegistryKeyFactory.create(flowBuilder.build());
- return getDeviceContext().getDeviceFlowRegistry().storeIfNecessary(flowRegistryKey, tableId);
+ return getDeviceRegistry().getDeviceFlowRegistry().storeIfNecessary(flowRegistryKey, tableId);
}
}