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; ...@@ -27,7 +27,7 @@ import org.onosproject.net.packet.PacketService;
27 description = "Lists packet requests") 27 description = "Lists packet requests")
28 public class PacketRequestsListCommand extends AbstractShellCommand { 28 public class PacketRequestsListCommand extends AbstractShellCommand {
29 29
30 - private static final String FMT = "priority=%s, appId=%s, criteria=%s"; 30 + private static final String FMT = "nodeId=%s appId=%s, priority=%s, criteria=%s";
31 31
32 @Override 32 @Override
33 protected void execute() { 33 protected void execute() {
...@@ -41,7 +41,7 @@ public class PacketRequestsListCommand extends AbstractShellCommand { ...@@ -41,7 +41,7 @@ public class PacketRequestsListCommand extends AbstractShellCommand {
41 } 41 }
42 42
43 private void print(PacketRequest request) { 43 private void print(PacketRequest request) {
44 - print(FMT, request.priority(), request.appId().name(), request.selector().criteria()); 44 + print(FMT, request.nodeId(), request.appId().name(), request.priority(), request.selector().criteria());
45 } 45 }
46 46
47 } 47 }
......
...@@ -167,7 +167,6 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr ...@@ -167,7 +167,6 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr
167 public void deactivate(ComponentContext context) { 167 public void deactivate(ComponentContext context) {
168 cfgService.unregisterProperties(getClass(), false); 168 cfgService.unregisterProperties(getClass(), false);
169 controller.removeListener(listener); 169 controller.removeListener(listener);
170 - disconnectDevices();
171 providerRegistry.unregister(this); 170 providerRegistry.unregister(this);
172 collectors.values().forEach(PortStatsCollector::stop); 171 collectors.values().forEach(PortStatsCollector::stop);
173 providerService = null; 172 providerService = null;
...@@ -210,11 +209,6 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr ...@@ -210,11 +209,6 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr
210 } 209 }
211 } 210 }
212 211
213 - private void disconnectDevices() {
214 - // Only disconnect the devices for which we are currently master.
215 - controller.getMasterSwitches().forEach(sw -> listener.switchRemoved(new Dpid(sw.getId())));
216 - }
217 -
218 @Override 212 @Override
219 public boolean isReachable(DeviceId deviceId) { 213 public boolean isReachable(DeviceId deviceId) {
220 OpenFlowSwitch sw = controller.getSwitch(dpid(deviceId.uri())); 214 OpenFlowSwitch sw = controller.getSwitch(dpid(deviceId.uri()));
......