[WIP] Upgrade ONOS to karaf version 4.2.1
Change-Id: I7cd40c995bdf1c80f94b1895fb3344e32404c7fa
diff --git a/cli/src/main/java/org/onosproject/cli/net/RegionAddDevicesCommand.java b/cli/src/main/java/org/onosproject/cli/net/RegionAddDevicesCommand.java
index 7abb2e9..2ed04f8 100644
--- a/cli/src/main/java/org/onosproject/cli/net/RegionAddDevicesCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/RegionAddDevicesCommand.java
@@ -15,8 +15,9 @@
*/
package org.onosproject.cli.net;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.net.DeviceId;
import org.onosproject.net.region.RegionAdminService;
@@ -28,6 +29,7 @@
/**
* Add a set of devices into existing region.
*/
+@Service
@Command(scope = "onos", name = "region-add-devices",
description = "Adds a set of devices into the region.")
public class RegionAddDevicesCommand extends AbstractShellCommand {
@@ -41,7 +43,7 @@
List<String> devIds = null;
@Override
- protected void execute() {
+ protected void doExecute() {
RegionAdminService service = get(RegionAdminService.class);
RegionId regionId = RegionId.regionId(id);