import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group;
import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private final SalFlowService salFlowService;
private final SalGroupService salGroupService;
private final SalMeterService salMeterService;
+ private final SalTableService salTableService;
private ForwardingRulesCommiter<Flow> flowListener;
private ForwardingRulesCommiter<Group> groupListener;
private ForwardingRulesCommiter<Meter> meterListener;
+ private ForwardingRulesCommiter<Table> tableListener;
private FlowNodeReconciliation nodeListener;
public ForwardingRulesManagerImpl(final DataBroker dataBroker,
"RPC SalGroupService not found.");
this.salMeterService = Preconditions.checkNotNull(rpcRegistry.getRpcService(SalMeterService.class),
"RPC SalMeterService not found.");
+ this.salTableService = Preconditions.checkNotNull(rpcRegistry.getRpcService(SalTableService.class),
+ "RPC SalTableService not found.");
}
@Override
public void start() {
+
this.flowListener = new FlowForwarder(this, dataService);
+
this.groupListener = new GroupForwarder(this, dataService);
this.meterListener = new MeterForwarder(this, dataService);
+
+ this.tableListener = new TableForwarder(this, dataService);
this.nodeListener = new FlowNodeReconciliationImpl(this, dataService);
LOG.info("ForwardingRulesManager has started successfully.");
+
}
@Override
this.meterListener.close();
this.meterListener = null;
}
+ if (this.tableListener != null) {
+ this.tableListener.close();
+ this.tableListener = null;
+ }
if (this.nodeListener != null) {
this.nodeListener.close();
this.nodeListener = null;
return salMeterService;
}
+ @Override
+ public SalTableService getSalTableService() {
+ return salTableService;
+ }
+
@Override
public ForwardingRulesCommiter<Flow> getFlowCommiter() {
return flowListener;
return meterListener;
}
+ @Override
+ public ForwardingRulesCommiter<Table> getTableCommiter() {
+ return tableListener;
+ }
+
@Override
public FlowNodeReconciliation getFlowNodeReconciliation() {
return nodeListener;