aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/cli
diff options
context:
space:
mode:
authorAshlee Young <ashlee@wildernessvoice.com>2015-11-22 10:02:05 -0800
committerAshlee Young <ashlee@wildernessvoice.com>2015-11-22 10:02:05 -0800
commit77ce3be7567bd01c66d8ee88a93b485666723501 (patch)
tree283e7f39a501750bbd705fbb91645b20198900f1 /framework/src/onos/cli
parent00e6500d0813dcbccaaa741ef38cc1eae6d11e07 (diff)
Removed patch path since changes have been merged upstream to a different path. Updated README with directions.
Change-Id: Ie419abd2d3d3ef7315de9f607dcd757a78190995 Signed-off-by: Ashlee Young <ashlee@wildernessvoice.com>
Diffstat (limited to 'framework/src/onos/cli')
-rw-r--r--framework/src/onos/cli/src/main/java/org/onosproject/cli/net/DeviceSetControllersCommand.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/DeviceSetControllersCommand.java b/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/DeviceSetControllersCommand.java
index c3693799..cb4ff04a 100644
--- a/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/DeviceSetControllersCommand.java
+++ b/framework/src/onos/cli/src/main/java/org/onosproject/cli/net/DeviceSetControllersCommand.java
@@ -59,8 +59,11 @@ public class DeviceSetControllersCommand extends AbstractShellCommand {
ControllerConfig config = h.behaviour(ControllerConfig.class);
print("before:");
config.getControllers().forEach(c -> print(c.target()));
-
- config.setControllers(newControllers);
+ try {
+ config.setControllers(newControllers);
+ } catch (NullPointerException e) {
+ print("No Device with requested parameters {} ", uri);
+ }
print("after:");
config.getControllers().forEach(c -> print(c.target()));
print("size %d", config.getControllers().size());