commit | dd70dfb2aa71272b2b1ffee44abd9712d1f0de11 | [log] [tgz] |
---|---|---|
author | Palash Kala <palash.kala@samsung.com> | Tue Apr 11 11:01:44 2017 +0900 |
committer | Yuta HIGUCHI <y-higuchi@onlab.us> | Fri Apr 14 22:55:54 2017 +0000 |
tree | 0792ad0be13f3809ba7ea468f15f37caf1784159 | |
parent | 1ddfea0795c7e3d177e5b0ec0ba92d630bedc818 [diff] |
[ONOS-6210] Should be able to remove device from store if device is not reachable Change-Id: I814741a1ee7ec0e6d743e5422e4dd29f354b8b49
diff --git a/cli/src/main/java/org/onosproject/cli/net/DeviceRemoveCommand.java b/cli/src/main/java/org/onosproject/cli/net/DeviceRemoveCommand.java index c4ef065..ecac8f9 100644 --- a/cli/src/main/java/org/onosproject/cli/net/DeviceRemoveCommand.java +++ b/cli/src/main/java/org/onosproject/cli/net/DeviceRemoveCommand.java
@@ -34,7 +34,11 @@ @Override protected void execute() { - get(DeviceAdminService.class).removeDevice(DeviceId.deviceId(uri)); + try { + get(DeviceAdminService.class).removeDevice(DeviceId.deviceId(uri)); + } catch (IllegalStateException e) { + print("There was some issue in removing device, please try again"); + } } }