[WIP] apps CLI changes for karaf upgrade

Change-Id: I283efc39c7d4f4b31344f1d2d0cdd2b98a60932d
diff --git a/apps/faultmanagement/fmcli/src/main/java/org/onosproject/faultmanagement/alarms/cli/GetAllAlarms.java b/apps/faultmanagement/fmcli/src/main/java/org/onosproject/faultmanagement/alarms/cli/GetAllAlarms.java
index 65614dc..5860bfa 100644
--- a/apps/faultmanagement/fmcli/src/main/java/org/onosproject/faultmanagement/alarms/cli/GetAllAlarms.java
+++ b/apps/faultmanagement/fmcli/src/main/java/org/onosproject/faultmanagement/alarms/cli/GetAllAlarms.java
@@ -17,9 +17,9 @@
 
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
-import org.apache.karaf.shell.commands.Option;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Option;
 import org.onosproject.cli.AbstractShellCommand;
 import org.onosproject.incubator.net.faultmanagement.alarm.Alarm;
 import org.onosproject.incubator.net.faultmanagement.alarm.AlarmService;
@@ -46,7 +46,7 @@
     private Set<Alarm> alarms;
 
     @Override
-    protected void execute() {
+    protected void doExecute() {
         if (deviceId != null) {
             if (activeOnly) {
                 alarms = alarmService.getActiveAlarms(DeviceId.deviceId(deviceId));
diff --git a/apps/faultmanagement/fmcli/src/main/java/org/onosproject/faultmanagement/alarms/cli/GetAllAlarmsCounts.java b/apps/faultmanagement/fmcli/src/main/java/org/onosproject/faultmanagement/alarms/cli/GetAllAlarmsCounts.java
index 8ff412a..5bbb2cee 100644
--- a/apps/faultmanagement/fmcli/src/main/java/org/onosproject/faultmanagement/alarms/cli/GetAllAlarmsCounts.java
+++ b/apps/faultmanagement/fmcli/src/main/java/org/onosproject/faultmanagement/alarms/cli/GetAllAlarmsCounts.java
@@ -17,9 +17,9 @@
 
 import static java.util.Comparator.comparingInt;
 
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
-import org.apache.karaf.shell.commands.Option;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Option;
 import org.onosproject.cli.AbstractShellCommand;
 import org.onosproject.incubator.net.faultmanagement.alarm.Alarm;
 import org.onosproject.incubator.net.faultmanagement.alarm.AlarmService;
@@ -47,7 +47,7 @@
     private Map<Alarm.SeverityLevel, Long> alarmCounts;
 
     @Override
-    protected void execute() {
+    protected void doExecute() {
         if (deviceId != null) {
             if (activeOnly) {
                 alarmCounts = alarmService.getActiveAlarms(DeviceId.deviceId(deviceId))
diff --git a/apps/faultmanagement/fmgui/BUILD b/apps/faultmanagement/fmgui/BUILD
index 667b034..6b5c757 100644
--- a/apps/faultmanagement/fmgui/BUILD
+++ b/apps/faultmanagement/fmgui/BUILD
@@ -1,7 +1,6 @@
-COMPILE_DEPS = CORE_DEPS + JACKSON + [
+COMPILE_DEPS = CORE_DEPS + JACKSON + CLI + [
     "//incubator/api:onos-incubator-api",
     "//apps/faultmanagement/fmmgr:onos-apps-faultmanagement-fmmgr",
-    "//cli:onos-cli",
 ]
 
 osgi_jar_with_tests(
diff --git a/apps/faultmanagement/fmmgr/src/main/java/org/onosproject/faultmanagement/impl/AlarmManager.java b/apps/faultmanagement/fmmgr/src/main/java/org/onosproject/faultmanagement/impl/AlarmManager.java
index e9a4695..8d1a5a5 100644
--- a/apps/faultmanagement/fmmgr/src/main/java/org/onosproject/faultmanagement/impl/AlarmManager.java
+++ b/apps/faultmanagement/fmmgr/src/main/java/org/onosproject/faultmanagement/impl/AlarmManager.java
@@ -40,7 +40,6 @@
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
 import org.osgi.service.component.annotations.Deactivate;
-import org.osgi.service.component.annotations.Modified;
 import org.osgi.service.component.annotations.Reference;
 import org.osgi.service.component.annotations.ReferenceCardinality;
 import org.slf4j.Logger;
@@ -99,12 +98,6 @@
         log.info("Stopped");
     }
 
-    @Modified
-    public boolean modified() {
-        log.info("Modified");
-        return true;
-    }
-
     @Override
     public Alarm updateBookkeepingFields(AlarmId id, boolean clear, boolean isAcknowledged,
                                          String assignedUser) {
diff --git a/apps/faultmanagement/fmmgr/src/main/java/org/onosproject/faultmanagement/impl/DistributedAlarmStore.java b/apps/faultmanagement/fmmgr/src/main/java/org/onosproject/faultmanagement/impl/DistributedAlarmStore.java
index 2c85310..ca5c7eb 100644
--- a/apps/faultmanagement/fmmgr/src/main/java/org/onosproject/faultmanagement/impl/DistributedAlarmStore.java
+++ b/apps/faultmanagement/fmmgr/src/main/java/org/onosproject/faultmanagement/impl/DistributedAlarmStore.java
@@ -35,7 +35,6 @@
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
 import org.osgi.service.component.annotations.Deactivate;
-import org.osgi.service.component.annotations.Modified;
 import org.osgi.service.component.annotations.Reference;
 import org.osgi.service.component.annotations.ReferenceCardinality;
 import org.slf4j.Logger;
@@ -88,12 +87,6 @@
         log.info("Stopped");
     }
 
-    @Modified
-    public boolean modified() {
-        log.info("Modified");
-        return true;
-    }
-
     @Override
     public Alarm getAlarm(AlarmId alarmId) {
         return alarmsMap.get(alarmId);