[WIP] Upgrade ONOS to karaf version 4.2.1
Change-Id: I7cd40c995bdf1c80f94b1895fb3344e32404c7fa
diff --git a/cli/src/main/java/org/onosproject/cli/net/IntentListCompilers.java b/cli/src/main/java/org/onosproject/cli/net/IntentListCompilers.java
index fd1c145..d920eec 100644
--- a/cli/src/main/java/org/onosproject/cli/net/IntentListCompilers.java
+++ b/cli/src/main/java/org/onosproject/cli/net/IntentListCompilers.java
@@ -15,7 +15,8 @@
*/
package org.onosproject.cli.net;
-import org.apache.karaf.shell.commands.Command;
+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.intent.IntentExtensionService;
@@ -24,12 +25,13 @@
/**
* Lists the inventory of intents and their states.
*/
+@Service
@Command(scope = "onos", name = "intent-compilers",
description = "Lists the mapping from intent type to compiler component")
public class IntentListCompilers extends AbstractShellCommand {
@Override
- protected void execute() {
+ protected void doExecute() {
IntentExtensionService service = get(IntentExtensionService.class);
OptionalInt length = service.getCompilers().keySet().stream()
.mapToInt(s -> s.getName().length())