Madan Jampani

Do not disconnect from switches on deactivate + packet requests cli command upda…

…te to include nodeId in the output

Change-Id: Id19715a2cec9b44431993fefdda9fe51956978cc
......@@ -27,7 +27,7 @@ import org.onosproject.net.packet.PacketService;
description = "Lists packet requests")
public class PacketRequestsListCommand extends AbstractShellCommand {
private static final String FMT = "priority=%s, appId=%s, criteria=%s";
private static final String FMT = "nodeId=%s appId=%s, priority=%s, criteria=%s";
@Override
protected void execute() {
......@@ -41,7 +41,7 @@ public class PacketRequestsListCommand extends AbstractShellCommand {
}
private void print(PacketRequest request) {
print(FMT, request.priority(), request.appId().name(), request.selector().criteria());
print(FMT, request.nodeId(), request.appId().name(), request.priority(), request.selector().criteria());
}
}
......
......@@ -167,7 +167,6 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr
public void deactivate(ComponentContext context) {
cfgService.unregisterProperties(getClass(), false);
controller.removeListener(listener);
disconnectDevices();
providerRegistry.unregister(this);
collectors.values().forEach(PortStatsCollector::stop);
providerService = null;
......@@ -210,11 +209,6 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr
}
}
private void disconnectDevices() {
// Only disconnect the devices for which we are currently master.
controller.getMasterSwitches().forEach(sw -> listener.switchRemoved(new Dpid(sw.getId())));
}
@Override
public boolean isReachable(DeviceId deviceId) {
OpenFlowSwitch sw = controller.getSwitch(dpid(deviceId.uri()));
......