IMR app changes for karaf 4.2.1 CLI

Change-Id: I434fbe47af0b0e6fafc59d1dd10b39fdd15b4ce2
diff --git a/apps/imr/api/BUILD b/apps/imr/api/BUILD
index a08f18c..990169b 100644
--- a/apps/imr/api/BUILD
+++ b/apps/imr/api/BUILD
@@ -8,6 +8,7 @@
     api_package = "org.onosproject.imr.rest",
     api_title = "IMR REST API",
     api_version = "1.0",
+    karaf_command_packages = ["org.onosproject.imr.cli"],
     web_context = "/onos/v1/imr",
     deps = COMPILE_DEPS,
 )
diff --git a/apps/imr/api/src/main/java/org/onosproject/imr/cli/StartMonitorCommand.java b/apps/imr/api/src/main/java/org/onosproject/imr/cli/StartMonitorCommand.java
index 1cdb555..d4acfca 100644
--- a/apps/imr/api/src/main/java/org/onosproject/imr/cli/StartMonitorCommand.java
+++ b/apps/imr/api/src/main/java/org/onosproject/imr/cli/StartMonitorCommand.java
@@ -18,6 +18,7 @@
 
 import org.apache.karaf.shell.api.action.Argument;
 import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Completion;
 import org.apache.karaf.shell.api.action.Option;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
 import org.onosproject.cli.AbstractShellCommand;
@@ -42,16 +43,19 @@
     @Argument(index = 0, name = "applicationId",
             description = "Application ID that submitted the intent",
             required = true)
+    @Completion(ApplicationIdImrCompleter.class)
     private Short appId;
 
     @Argument(index = 1, name = "applicationName",
             description = "Application Name that submitted the intent",
             required = true)
+    @Completion(ApplicationNameImrCompleter.class)
     private String appName;
 
     @Argument(index = 2, name = "intentKey",
             description = "String representation of the key of the intent",
             required = false)
+    @Completion(IntentKeyImrCompleter.class)
     private String key;
 
     private IntentMonitorAndRerouteService imrService;
diff --git a/apps/imr/api/src/main/java/org/onosproject/imr/cli/StopMonitorCommand.java b/apps/imr/api/src/main/java/org/onosproject/imr/cli/StopMonitorCommand.java
index 830b3f7..d71e507 100644
--- a/apps/imr/api/src/main/java/org/onosproject/imr/cli/StopMonitorCommand.java
+++ b/apps/imr/api/src/main/java/org/onosproject/imr/cli/StopMonitorCommand.java
@@ -18,6 +18,7 @@
 
 import org.apache.karaf.shell.api.action.Argument;
 import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Completion;
 import org.apache.karaf.shell.api.action.Option;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
 import org.onosproject.cli.AbstractShellCommand;
@@ -41,16 +42,19 @@
     @Argument(index = 0, name = "applicationId",
             description = "Application ID that submitted the intent",
             required = true)
+    @Completion(ApplicationIdImrCompleter.class)
     private Short appId = null;
 
     @Argument(index = 1, name = "applicationName",
             description = "Application Name that submitted the intent",
             required = true)
+    @Completion(ApplicationNameImrCompleter.class)
     private String appName = null;
 
     @Argument(index = 2, name = "intentKey",
             description = "String representation of the key of the intent",
             required = false)
+    @Completion(IntentKeyImrCompleter.class)
     private String key = null;
 
     private IntentMonitorAndRerouteService imrService;