use of org.onosproject.net.packet.PacketService in project onos by opennetworkinglab.
the class OFSwitchManager method processOFAgentStopped.
private void processOFAgentStopped(OFAgent ofAgent) {
devices(ofAgent.networkId()).forEach(deviceId -> {
OFSwitch ofSwitch = ofSwitchMap.get(deviceId);
if (ofSwitch != null) {
disconnectController(ofSwitch, ofAgent.controllers());
}
});
DeviceService deviceService = virtualNetService.get(ofAgent.networkId(), DeviceService.class);
deviceService.removeListener(deviceListener);
PacketService packetService = virtualNetService.get(ofAgent.networkId(), PacketService.class);
packetService.removeProcessor(packetProcessor);
FlowRuleService flowRuleService = virtualNetService.get(ofAgent.networkId(), FlowRuleService.class);
flowRuleService.removeListener(flowRuleListener);
}
Aggregations