Merge remote-tracking branch 'origin/master' into dev/auklet

Change-Id: I01a9eedcdb588ae132550c148a268f50b5110bcf
diff --git a/apps/actn-mdsc/tetunnel-ctl/src/main/java/org/onosproject/actn/mdsc/tetunnelctl/TeTunnelCtl.java b/apps/actn-mdsc/tetunnel-ctl/src/main/java/org/onosproject/actn/mdsc/tetunnelctl/TeTunnelCtl.java
index 5415e83..77961ed 100644
--- a/apps/actn-mdsc/tetunnel-ctl/src/main/java/org/onosproject/actn/mdsc/tetunnelctl/TeTunnelCtl.java
+++ b/apps/actn-mdsc/tetunnel-ctl/src/main/java/org/onosproject/actn/mdsc/tetunnelctl/TeTunnelCtl.java
@@ -254,7 +254,7 @@
 
     private TeTunnelKey getNextTeTunnelKey(TeTopologyKey key) {
         //FIXME need a better way to get a te tunnel id
-        long teTunnelId = teTunnelService.getTeTunnels(key).size() + 1;
+        long teTunnelId = teTunnelService.getTeTunnels(key).size() + 1L;
         return new TeTunnelKey(key, teTunnelId);
     }
 
diff --git a/apps/cpman/app/src/main/java/org/onosproject/cpman/gui/CpmanViewMessageHandler.java b/apps/cpman/app/src/main/java/org/onosproject/cpman/gui/CpmanViewMessageHandler.java
index 8f64844..873d23d 100644
--- a/apps/cpman/app/src/main/java/org/onosproject/cpman/gui/CpmanViewMessageHandler.java
+++ b/apps/cpman/app/src/main/java/org/onosproject/cpman/gui/CpmanViewMessageHandler.java
@@ -179,7 +179,7 @@
                     local.put(StringUtils.lowerCase(cmt.name()), data.get(cmt)[i]);
                 }
 
-                String calculated = time.minusMinutes(numOfDp - i).format(TIME_FORMAT);
+                String calculated = time.minusMinutes((long) numOfDp - i).format(TIME_FORMAT);
 
                 local.put(LABEL, calculated);
                 populateMetric(cm.addDataPoint(calculated), local);
diff --git a/apps/openstacknetworking/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackRoutingSnatHandler.java b/apps/openstacknetworking/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackRoutingSnatHandler.java
index 217a981..a07cdef 100644
--- a/apps/openstacknetworking/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackRoutingSnatHandler.java
+++ b/apps/openstacknetworking/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackRoutingSnatHandler.java
@@ -86,7 +86,7 @@
 
     private static final String ERR_PACKETIN = "Failed to handle packet in: ";
     private static final String ERR_UNSUPPORTED_NET_TYPE = "Unsupported network type";
-    private static final long TIME_OUT_SNAT_PORT_MS = 120 * 1000;
+    private static final long TIME_OUT_SNAT_PORT_MS = 120L * 1000L;
     private static final int TP_PORT_MINIMUM_NUM = 65000;
     private static final int TP_PORT_MAXIMUM_NUM = 65535;
 
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
index fd57f09..72243bb 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
@@ -64,7 +64,7 @@
  */
 public class DefaultRoutingHandler {
     private static final int MAX_CONSTANT_RETRY_ATTEMPTS = 5;
-    private static final int RETRY_INTERVAL_MS = 250;
+    private static final long RETRY_INTERVAL_MS = 250L;
     private static final int RETRY_INTERVAL_SCALE = 1;
     private static final long STABLITY_THRESHOLD = 10; //secs
     private static final int UPDATE_INTERVAL = 5; //secs
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/config/PwaasConfig.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/config/PwaasConfig.java
index 18fc738..feb0049 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/config/PwaasConfig.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/config/PwaasConfig.java
@@ -215,8 +215,8 @@
         if ((!ingressInner.equals(VlanId.NONE) &&
                 ingressOuter.equals(VlanId.NONE) &&
                 !egressOuter.equals(VlanId.NONE))
-           || (!ingressOuter.equals(VlanId.NONE) &&
-                egressOuter.equals(VlanId.NONE) &&
+           || (egressOuter.equals(VlanId.NONE) &&
+                !egressInner.equals(VlanId.NONE) &&
                 !ingressOuter.equals(VlanId.NONE))) {
                 throw new IllegalArgumentException(String.valueOf(String.format("Support for double-tag<->" +
                                                                                 "single-tag is not supported" +
diff --git a/apps/test/demo/src/main/java/org/onosproject/demo/DemoInstaller.java b/apps/test/demo/src/main/java/org/onosproject/demo/DemoInstaller.java
index 369a3af..3772bdb 100644
--- a/apps/test/demo/src/main/java/org/onosproject/demo/DemoInstaller.java
+++ b/apps/test/demo/src/main/java/org/onosproject/demo/DemoInstaller.java
@@ -588,7 +588,7 @@
             FlowRuleOperations.Builder remove = FlowRuleOperations.builder();
 
             for (Device d : devices) {
-                for (int i = 0; i < this.flowPerDevice; i++) {
+                for (long i = 0; i < this.flowPerDevice; i++) {
                     sbuilder = DefaultTrafficSelector.builder();
 
                     sbuilder.matchEthSrc(MacAddress.valueOf(RandomUtils.nextInt() * i))
@@ -771,7 +771,7 @@
                 TrafficTreatment.Builder tbuilder = DefaultTrafficTreatment.builder();
                 tbuilder.add(Instructions.createOutput(PortNumber.portNumber(2)));
                 TrafficSelector.Builder sbuilder = DefaultTrafficSelector.builder();
-                sbuilder.matchInPort(PortNumber.portNumber(i + 3));
+                sbuilder.matchInPort(PortNumber.portNumber(i + 3L));
                 sbuilder.matchEthDst(MacAddress.valueOf("12:00:00:00:00:10"));
 
                 FilteringObjective.Builder fobBuilder = DefaultFilteringObjective.builder();
diff --git a/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfInstaller.java b/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfInstaller.java
index 639ee84..f7e46cc 100644
--- a/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfInstaller.java
+++ b/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfInstaller.java
@@ -288,7 +288,7 @@
         }
 
         try {
-            workers.awaitTermination(5 * cyclePeriod, TimeUnit.MILLISECONDS);
+            workers.awaitTermination(5L * cyclePeriod, TimeUnit.MILLISECONDS);
         } catch (InterruptedException e) {
             log.warn("Failed to stop worker", e);
         }
diff --git a/apps/virtualbng/src/main/java/org/onosproject/virtualbng/VbngConfigurationManager.java b/apps/virtualbng/src/main/java/org/onosproject/virtualbng/VbngConfigurationManager.java
index 1e8a5ed..c09d7cc 100644
--- a/apps/virtualbng/src/main/java/org/onosproject/virtualbng/VbngConfigurationManager.java
+++ b/apps/virtualbng/src/main/java/org/onosproject/virtualbng/VbngConfigurationManager.java
@@ -167,7 +167,7 @@
                 return publicIpAddress;
             }
 
-            int prefixLen = prefix.getKey().prefixLength();
+            double prefixLen = prefix.getKey().prefixLength();
             int availableIpNum = (int) Math.pow(2,
                     IpPrefix.MAX_INET_MASK_LENGTH - prefixLen) - 1;
             for (int i = 1; i <= availableIpNum; i++) {
diff --git a/cli/src/main/java/org/onosproject/cli/net/AddTestFlowsCommand.java b/cli/src/main/java/org/onosproject/cli/net/AddTestFlowsCommand.java
index 403c006..004ebfa 100644
--- a/cli/src/main/java/org/onosproject/cli/net/AddTestFlowsCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/AddTestFlowsCommand.java
@@ -87,7 +87,7 @@
         FlowRuleOperations.Builder remove = FlowRuleOperations.builder();
 
         for (Device d : devices) {
-            for (int i = 0; i < flowsPerDevice; i++) {
+            for (long i = 0; i < flowsPerDevice; i++) {
                 sbuilder = DefaultTrafficSelector.builder();
 
                 sbuilder.matchEthSrc(MacAddress.valueOf(RandomUtils.nextInt() * i))
diff --git a/cli/src/main/java/org/onosproject/cli/net/IntentCycleCommand.java b/cli/src/main/java/org/onosproject/cli/net/IntentCycleCommand.java
index cdc8d79..db86d5f 100644
--- a/cli/src/main/java/org/onosproject/cli/net/IntentCycleCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/IntentCycleCommand.java
@@ -121,7 +121,7 @@
         TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment();
 
         List<Intent> intents = Lists.newArrayList();
-        for (int i = 0; i < count; i++) {
+        for (long i = 0; i < count; i++) {
             TrafficSelector selector = selectorBldr
                     .matchEthSrc(MacAddress.valueOf(i + keyOffset))
                     .build();
diff --git a/cli/src/main/java/org/onosproject/cli/net/IntentPushTestCommand.java b/cli/src/main/java/org/onosproject/cli/net/IntentPushTestCommand.java
index 92209d7..0b28f92 100644
--- a/cli/src/main/java/org/onosproject/cli/net/IntentPushTestCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/IntentPushTestCommand.java
@@ -134,7 +134,7 @@
         TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment();
 
         List<Intent> intents = Lists.newArrayList();
-        for (int i = 0; i < count; i++) {
+        for (long i = 0; i < count; i++) {
             TrafficSelector selector = selectorBldr
                     .matchEthSrc(MacAddress.valueOf(i + keyOffset))
                     .build();
@@ -167,7 +167,7 @@
         try {
             // In this way with the tests in place the timeout will be
             // 61 seconds.
-            if (latch.await(1000 + count * 60, TimeUnit.MILLISECONDS)) {
+            if (latch.await(1000L + count * 60L, TimeUnit.MILLISECONDS)) {
                 printResults(count);
             } else {
                 print("Failure: %d intents not installed", latch.getCount());
diff --git a/cli/src/main/java/org/onosproject/cli/net/WipeOutCommand.java b/cli/src/main/java/org/onosproject/cli/net/WipeOutCommand.java
index e137d00..cd42752 100644
--- a/cli/src/main/java/org/onosproject/cli/net/WipeOutCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/WipeOutCommand.java
@@ -96,7 +96,7 @@
         intentsToWithdrawn.forEach(intentService::withdraw);
         try {
             // Wait 1.5 seconds for each Intent
-            completableFuture.get(intentsToWithdrawn.size() * 1500, TimeUnit.MILLISECONDS);
+            completableFuture.get(intentsToWithdrawn.size() * 1500L, TimeUnit.MILLISECONDS);
         } catch (InterruptedException e) {
             print("Got interrupted exception while withdrawn Intents " + e.toString());
         } catch (ExecutionException e) {
diff --git a/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml
index 2571444..c75fcc9 100644
--- a/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml
+++ b/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -102,10 +102,6 @@
         </command>
 
         <command>
-            <action class="org.onosproject.cli.UiViewListCommand"/>
-        </command>
-
-        <command>
             <action class="org.onosproject.cli.RolesCommand"/>
         </command>
         <command>
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/trafficcontrol/DefaultTokenBucket.java b/core/api/src/main/java/org/onosproject/net/behaviour/trafficcontrol/DefaultTokenBucket.java
index 8313f3f..ec3b24f 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/trafficcontrol/DefaultTokenBucket.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/trafficcontrol/DefaultTokenBucket.java
@@ -143,7 +143,7 @@
 
         private long rate;
         // Default to 2 * MTU
-        private long burstSize = 2 * 1500;
+        private long burstSize = 2L * 1500L;
         private Action action;
         private short dscp;
         private Type type;
diff --git a/core/api/src/main/java/org/onosproject/ui/UiPreferencesService.java b/core/api/src/main/java/org/onosproject/ui/UiPreferencesService.java
index 2e9f027..682e1a6 100644
--- a/core/api/src/main/java/org/onosproject/ui/UiPreferencesService.java
+++ b/core/api/src/main/java/org/onosproject/ui/UiPreferencesService.java
@@ -52,11 +52,11 @@
     ObjectNode getPreference(String username, String key);
 
     /**
-     * Sets the named preference for the specified user.
+     * Sets or clears the named preference for the specified user.
      *
      * @param username user name
      * @param key      preference key
-     * @param value    preference value
+     * @param value    preference value; if null it will be cleared
      */
     void setPreference(String username, String key, ObjectNode value);
 
diff --git a/core/net/src/main/java/org/onosproject/cluster/impl/ConfigFileBasedClusterMetadataProvider.java b/core/net/src/main/java/org/onosproject/cluster/impl/ConfigFileBasedClusterMetadataProvider.java
index cd21490..99920f9 100644
--- a/core/net/src/main/java/org/onosproject/cluster/impl/ConfigFileBasedClusterMetadataProvider.java
+++ b/core/net/src/main/java/org/onosproject/cluster/impl/ConfigFileBasedClusterMetadataProvider.java
@@ -182,7 +182,7 @@
     }
 
     private Versioned<ClusterMetadata> blockForMetadata(String metadataUrl) {
-        int iterations = 0;
+        long iterations = 0;
         for (;;) {
             try {
                 Versioned<ClusterMetadata> metadata = fetchMetadata(metadataUrl);
diff --git a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
index 994303e..9c1a31a 100644
--- a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
+++ b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
@@ -474,7 +474,7 @@
                 return true;
             }
 
-            final long timeout = storedRule.timeout() * 1000;
+            final long timeout = storedRule.timeout() * 1000L;
             final long currentTime = System.currentTimeMillis();
 
             // Checking flow with hardTimeout
@@ -484,7 +484,7 @@
                     firstSeen.put(storedRule, currentTime);
                 } else {
                     Long first = firstSeen.get(storedRule);
-                    final long hardTimeout = storedRule.hardTimeout() * 1000;
+                    final long hardTimeout = storedRule.hardTimeout() * 1000L;
                     if ((currentTime - first) > hardTimeout) {
                         return false;
                     }
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentCleanup.java b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentCleanup.java
index 021e3ac..21c3efc 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentCleanup.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentCleanup.java
@@ -160,8 +160,8 @@
                 }
             };
             // Convert to ms
-            periodMs = period * 1_000;
-            periodMsForStuck = INSTALLING_WITHDRAWING_PERIOD * 1000;
+            periodMs = period * 1_000L;
+            periodMsForStuck = INSTALLING_WITHDRAWING_PERIOD * 1000L;
             // Schedule the executions
             timer.scheduleAtFixedRate(timerTask, periodMs, periodMs);
         }
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/TransactionManager.java b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/TransactionManager.java
index 198c1ae..7d8d4c4 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/TransactionManager.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/TransactionManager.java
@@ -48,7 +48,7 @@
     private final PartitionService partitionService;
     private final List<PartitionId> sortedPartitions;
     private final AsyncConsistentMap<TransactionId, Transaction.State> transactions;
-    private final int cacheSize;
+    private final long cacheSize;
     private final int buckets;
     private final Map<PartitionId, Cache<String, CachedMap>> partitionCache = Maps.newConcurrentMap();
 
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java
index 2a5a024..4376295 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java
@@ -144,7 +144,7 @@
         // ONOS-3579 workaround, let core threads die out on idle
         if (GROUP_CHECKER instanceof ScheduledThreadPoolExecutor) {
             ScheduledThreadPoolExecutor executor = (ScheduledThreadPoolExecutor) GROUP_CHECKER;
-            executor.setKeepAliveTime(CHECK_DELAY * 2, TimeUnit.MILLISECONDS);
+            executor.setKeepAliveTime(CHECK_DELAY * 2L, TimeUnit.MILLISECONDS);
             executor.allowCoreThreadTimeOut(true);
         }
     }
diff --git a/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/JuniperUtils.java b/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/JuniperUtils.java
index f8fb3e4..4f23b79 100644
--- a/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/JuniperUtils.java
+++ b/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/JuniperUtils.java
@@ -426,7 +426,7 @@
         Matcher matcher = SPEED_PATTERN.matcher(s);
         if (matcher.matches()) {
             // numeric
-            int n = Integer.parseInt(matcher.group(1));
+            long n = Long.parseLong(matcher.group(1));
             String unit = matcher.group(2);
             if ("m".equalsIgnoreCase(unit)) {
                 // Mbps
diff --git a/drivers/lumentum/src/main/java/org/onosproject/drivers/lumentum/LumentumRoadmDiscovery.java b/drivers/lumentum/src/main/java/org/onosproject/drivers/lumentum/LumentumRoadmDiscovery.java
index 79c9181..44220c1 100644
--- a/drivers/lumentum/src/main/java/org/onosproject/drivers/lumentum/LumentumRoadmDiscovery.java
+++ b/drivers/lumentum/src/main/java/org/onosproject/drivers/lumentum/LumentumRoadmDiscovery.java
@@ -99,7 +99,7 @@
                                     .set(AnnotationKeys.PORT_NAME, portDirection + "-" + portNumber)
                                     .build();
                             PortDescription p = omsPortDescription(
-                                    PortNumber.portNumber(ports.size() + 1),
+                                    PortNumber.portNumber(ports.size() + 1L),
                                     true,
                                     LumentumSnmpDevice.START_CENTER_FREQ,
                                     LumentumSnmpDevice.END_CENTER_FREQ,
@@ -117,7 +117,7 @@
                 .set(AnnotationKeys.PORT_NAME, "LINE IN")
                 .build();
         ports.add(omsPortDescription(
-                PortNumber.portNumber(ports.size() + 1),
+                PortNumber.portNumber(ports.size() + 1L),
                 true,
                 LumentumSnmpDevice.START_CENTER_FREQ,
                 LumentumSnmpDevice.END_CENTER_FREQ,
@@ -129,7 +129,7 @@
                 .set(AnnotationKeys.PORT_NAME, "LINE OUT")
                 .build();
         ports.add(omsPortDescription(
-                PortNumber.portNumber(ports.size() + 1),
+                PortNumber.portNumber(ports.size() + 1L),
                 true,
                 LumentumSnmpDevice.START_CENTER_FREQ,
                 LumentumSnmpDevice.END_CENTER_FREQ,
diff --git a/drivers/lumentum/src/main/java/org/onosproject/drivers/lumentum/LumentumWaveReadyDiscovery.java b/drivers/lumentum/src/main/java/org/onosproject/drivers/lumentum/LumentumWaveReadyDiscovery.java
index 5bd629f..3ced845 100644
--- a/drivers/lumentum/src/main/java/org/onosproject/drivers/lumentum/LumentumWaveReadyDiscovery.java
+++ b/drivers/lumentum/src/main/java/org/onosproject/drivers/lumentum/LumentumWaveReadyDiscovery.java
@@ -182,14 +182,14 @@
         Arrays.stream(s.split("\"\"")).forEach(p -> {
             if (p.contains(EIGHTFIFTY)) {
                 PortDescription cltPort = oduCltPortDescription(
-                        PortNumber.portNumber(ports.size() + 1),
+                        PortNumber.portNumber(ports.size() + 1L),
                         true,
                         CltSignalType.CLT_10GBE,
                         extractAnnotations(p));
                 ports.add(cltPort);
             } else {
                 PortDescription netPort = ochPortDescription(
-                        PortNumber.portNumber(ports.size() + 1),
+                        PortNumber.portNumber(ports.size() + 1L),
                         true,
                         OduSignalType.ODU2e,
                         true,
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowRuleManager.java b/incubator/net/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowRuleManager.java
index 237c3e8..3408394 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowRuleManager.java
+++ b/incubator/net/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowRuleManager.java
@@ -418,7 +418,7 @@
                 return true;
             }
 
-            final long timeout = storedRule.timeout() * 1000;
+            final long timeout = storedRule.timeout() * 1000L;
             final long currentTime = System.currentTimeMillis();
 
             // Checking flow with hardTimeout
@@ -428,7 +428,7 @@
                     firstSeen.put(storedRule, currentTime);
                 } else {
                     Long first = firstSeen.get(storedRule);
-                    final long hardTimeout = storedRule.hardTimeout() * 1000;
+                    final long hardTimeout = storedRule.hardTimeout() * 1000L;
                     if ((currentTime - first) > hardTimeout) {
                         return false;
                     }
diff --git a/lib/pom.xml b/lib/pom.xml
index 8298544..8cc00c4 100644
--- a/lib/pom.xml
+++ b/lib/pom.xml
@@ -39,7 +39,7 @@
         <onos-build-conf.version>1.13.0-SNAPSHOT</onos-build-conf.version>
         <netty4.version>4.1.8.Final</netty4.version>
         <openflowj.version>3.2.0.onos</openflowj.version>
-        <onos-maven-plugin.version>1.10</onos-maven-plugin.version>
+        <onos-maven-plugin.version>1.11</onos-maven-plugin.version>
         <onos-yang-tools.version>2.3.1</onos-yang-tools.version>
         <osgi.version>5.0.0</osgi.version>
         <karaf.version>3.0.8</karaf.version>
diff --git a/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpKeepAliveTimer.java b/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpKeepAliveTimer.java
index 919e9af..5c66b13 100644
--- a/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpKeepAliveTimer.java
+++ b/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpKeepAliveTimer.java
@@ -49,7 +49,7 @@
     public BgpKeepAliveTimer(BgpChannelHandler h, int seconds) {
         this.handler = h;
         this.keepAliveTimer = new Timer();
-        this.keepAliveTimer.schedule(new SendKeepAlive(), 0, seconds * 1000);
+        this.keepAliveTimer.schedule(new SendKeepAlive(), 0, seconds * 1000L);
     }
 
     /**
diff --git a/protocols/lisp/ctl/src/main/java/org/onosproject/lisp/ctl/impl/LispExpireMapDatabase.java b/protocols/lisp/ctl/src/main/java/org/onosproject/lisp/ctl/impl/LispExpireMapDatabase.java
index 036e334..aab371b 100644
--- a/protocols/lisp/ctl/src/main/java/org/onosproject/lisp/ctl/impl/LispExpireMapDatabase.java
+++ b/protocols/lisp/ctl/src/main/java/org/onosproject/lisp/ctl/impl/LispExpireMapDatabase.java
@@ -39,7 +39,7 @@
  */
 public final class LispExpireMapDatabase implements LispMappingDatabase {
 
-    private static final long MINUTE_TO_MS_UNIT = 60 * 1000;
+    private static final long MINUTE_TO_MS_UNIT = 60L * 1000L;
 
     private static final Logger log = getLogger(LispExpireMapDatabase.class);
 
diff --git a/protocols/tl1/ctl/src/main/java/org/onosproject/tl1/impl/DefaultTl1Controller.java b/protocols/tl1/ctl/src/main/java/org/onosproject/tl1/impl/DefaultTl1Controller.java
index 30e7224..70ccf1f 100644
--- a/protocols/tl1/ctl/src/main/java/org/onosproject/tl1/impl/DefaultTl1Controller.java
+++ b/protocols/tl1/ctl/src/main/java/org/onosproject/tl1/impl/DefaultTl1Controller.java
@@ -245,7 +245,7 @@
                     // ctag is just in front of it
                     int ctag = Integer.parseInt(words[i - 1]);
                     // We return everything that follows to the caller (this will lose line breaks and such)
-                    String result = Arrays.stream(words).skip(i + 1).collect(Collectors.joining());
+                    String result = Arrays.stream(words).skip(i + 1L).collect(Collectors.joining());
                     // Set future when command is executed, good or bad
                     Map<Integer, CompletableFuture<String>> msg = msgMap.get(ctx.channel());
                     if (msg != null) {
diff --git a/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java b/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java
index 66ded21..b007af1 100644
--- a/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java
+++ b/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java
@@ -419,7 +419,7 @@
 
     //TODO consider renaming KBPS and MBPS (as they are used to convert by division)
     private static final long KBPS = 1_000;
-    private static final long MBPS = 1_000 * 1_000;
+    private static final long MBPS = 1_000L * 1_000L;
     private static final Frequency FREQ50 = Frequency.ofGHz(50);
     private static final Frequency FREQ191_7 = Frequency.ofGHz(191_700);
     private static final Frequency FREQ4_4 = Frequency.ofGHz(4_400);
diff --git a/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/PortStatsCollector.java b/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/PortStatsCollector.java
index cb83948..a17a690 100644
--- a/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/PortStatsCollector.java
+++ b/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/PortStatsCollector.java
@@ -36,7 +36,7 @@
 
     private final Logger log = getLogger(getClass());
 
-    private static final int SECONDS = 1000;
+    private static final long SECONDS = 1000L;
 
     private OpenFlowSwitch sw;
     private Timer timer;
diff --git a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowStatsCollector.java b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowStatsCollector.java
index 6f24fd2..f2e7137 100644
--- a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowStatsCollector.java
+++ b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowStatsCollector.java
@@ -35,7 +35,7 @@
 
     private final Logger log = getLogger(getClass());
 
-    public static final int SECONDS = 1000;
+    public static final long SECONDS = 1000L;
 
     private final OpenFlowSwitch sw;
     private Timer timer;
diff --git a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/TableStatisticsCollector.java b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/TableStatisticsCollector.java
index ee3f0c9..73dabeb 100644
--- a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/TableStatisticsCollector.java
+++ b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/TableStatisticsCollector.java
@@ -33,7 +33,7 @@
 
     private final Logger log = getLogger(getClass());
 
-    public static final int SECONDS = 1000;
+    public static final long SECONDS = 1000L;
 
     private final OpenFlowSwitch sw;
     private Timer timer;
diff --git a/tools/package/archetypes/api/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/api/src/main/resources/archetype-resources/pom.xml
index ed66080..bb68413 100644
--- a/tools/package/archetypes/api/src/main/resources/archetype-resources/pom.xml
+++ b/tools/package/archetypes/api/src/main/resources/archetype-resources/pom.xml
@@ -48,13 +48,13 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>3.0.1</version>
+                <version>3.3.0</version>
                 <extensions>true</extensions>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.5.1</version>
+                <version>3.7.0</version>
                 <configuration>
                     <source>1.8</source>
                     <target>1.8</target>
diff --git a/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml
index 370ec4f..fcf1bef 100644
--- a/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml
+++ b/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml
@@ -84,13 +84,13 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>3.0.1</version>
+                <version>3.3.0</version>
                 <extensions>true</extensions>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.5.1</version>
+                <version>3.7.0</version>
                 <configuration>
                     <source>1.8</source>
                     <target>1.8</target>
@@ -99,7 +99,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-scr-plugin</artifactId>
-                <version>1.21.0</version>
+                <version>1.24.0</version>
                 <executions>
                     <execution>
                         <id>generate-scr-srcdescriptor</id>
@@ -118,7 +118,7 @@
             <plugin>
                 <groupId>org.onosproject</groupId>
                 <artifactId>onos-maven-plugin</artifactId>
-                <version>1.10</version>
+                <version>1.11</version>
                 <executions>
                     <execution>
                         <id>cfg</id>
diff --git a/tools/package/archetypes/cli/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/cli/src/main/resources/archetype-resources/pom.xml
index 7eb0476..054ee11 100644
--- a/tools/package/archetypes/cli/src/main/resources/archetype-resources/pom.xml
+++ b/tools/package/archetypes/cli/src/main/resources/archetype-resources/pom.xml
@@ -95,13 +95,13 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>3.0.1</version>
+                <version>3.3.0</version>
                 <extensions>true</extensions>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.5.1</version>
+                <version>3.7.0</version>
                 <configuration>
                     <source>1.8</source>
                     <target>1.8</target>
@@ -110,7 +110,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-scr-plugin</artifactId>
-                <version>1.21.0</version>
+                <version>1.24.0</version>
                 <executions>
                     <execution>
                         <id>generate-scr-srcdescriptor</id>
diff --git a/tools/package/archetypes/rest/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/rest/src/main/resources/archetype-resources/pom.xml
index 049acf8..c34b01a 100644
--- a/tools/package/archetypes/rest/src/main/resources/archetype-resources/pom.xml
+++ b/tools/package/archetypes/rest/src/main/resources/archetype-resources/pom.xml
@@ -143,7 +143,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>3.0.1</version>
+                <version>3.3.0</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
@@ -165,7 +165,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.5.1</version>
+                <version>3.7.0</version>
                 <configuration>
                     <source>1.8</source>
                     <target>1.8</target>
@@ -174,7 +174,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-scr-plugin</artifactId>
-                <version>1.21.0</version>
+                <version>1.24.0</version>
                 <executions>
                     <execution>
                         <id>generate-scr-srcdescriptor</id>
@@ -193,7 +193,7 @@
             <plugin>
                 <groupId>org.onosproject</groupId>
                 <artifactId>onos-maven-plugin</artifactId>
-                <version>1.10</version>
+                <version>1.11</version>
                 <executions>
                     <execution>
                         <id>cfg</id>
diff --git a/tools/package/archetypes/ui/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/ui/src/main/resources/archetype-resources/pom.xml
index bd3ae6a..166a907 100644
--- a/tools/package/archetypes/ui/src/main/resources/archetype-resources/pom.xml
+++ b/tools/package/archetypes/ui/src/main/resources/archetype-resources/pom.xml
@@ -84,13 +84,13 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>3.0.1</version>
+                <version>3.3.0</version>
                 <extensions>true</extensions>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.5.1</version>
+                <version>3.7.0</version>
                 <configuration>
                     <source>1.8</source>
                     <target>1.8</target>
@@ -99,7 +99,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-scr-plugin</artifactId>
-                <version>1.21.0</version>
+                <version>1.24.0</version>
                 <executions>
                     <execution>
                         <id>generate-scr-srcdescriptor</id>
@@ -118,7 +118,7 @@
             <plugin>
                 <groupId>org.onosproject</groupId>
                 <artifactId>onos-maven-plugin</artifactId>
-                <version>1.10</version>
+                <version>1.11</version>
                 <executions>
                     <execution>
                         <id>cfg</id>
diff --git a/tools/package/archetypes/uitab/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/uitab/src/main/resources/archetype-resources/pom.xml
index e288950..057f21f 100644
--- a/tools/package/archetypes/uitab/src/main/resources/archetype-resources/pom.xml
+++ b/tools/package/archetypes/uitab/src/main/resources/archetype-resources/pom.xml
@@ -85,13 +85,13 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>3.0.1</version>
+                <version>3.3.0</version>
                 <extensions>true</extensions>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.5.1</version>
+                <version>3.7.0</version>
                 <configuration>
                     <source>1.8</source>
                     <target>1.8</target>
@@ -100,7 +100,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-scr-plugin</artifactId>
-                <version>1.21.0</version>
+                <version>1.24.0</version>
                 <executions>
                     <execution>
                         <id>generate-scr-srcdescriptor</id>
@@ -119,7 +119,7 @@
             <plugin>
                 <groupId>org.onosproject</groupId>
                 <artifactId>onos-maven-plugin</artifactId>
-                <version>1.10</version>
+                <version>1.11</version>
                 <executions>
                     <execution>
                         <id>cfg</id>
diff --git a/tools/package/archetypes/uitopo/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/uitopo/src/main/resources/archetype-resources/pom.xml
index 4cf99c5..bb859d9 100644
--- a/tools/package/archetypes/uitopo/src/main/resources/archetype-resources/pom.xml
+++ b/tools/package/archetypes/uitopo/src/main/resources/archetype-resources/pom.xml
@@ -85,13 +85,13 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>3.0.1</version>
+                <version>3.3.0</version>
                 <extensions>true</extensions>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.5.1</version>
+                <version>3.7.0</version>
                 <configuration>
                     <source>1.8</source>
                     <target>1.8</target>
@@ -100,7 +100,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-scr-plugin</artifactId>
-                <version>1.21.0</version>
+                <version>1.24.0</version>
                 <executions>
                     <execution>
                         <id>generate-scr-srcdescriptor</id>
@@ -119,7 +119,7 @@
             <plugin>
                 <groupId>org.onosproject</groupId>
                 <artifactId>onos-maven-plugin</artifactId>
-                <version>1.10</version>
+                <version>1.11</version>
                 <executions>
                     <execution>
                         <id>cfg</id>
diff --git a/tools/package/runtime/bin/onos-diagnostics b/tools/package/runtime/bin/onos-diagnostics
index 51b3f8c..442b1fd 100755
--- a/tools/package/runtime/bin/onos-diagnostics
+++ b/tools/package/runtime/bin/onos-diagnostics
@@ -51,6 +51,7 @@
 }
 
 CLI_COMMANDS=(
+    "feature:repo-list"
     "feature:list"
     "bundle:list"
     "scr:list"
diff --git a/utils/misc/src/main/java/org/onlab/packet/RIPngEntry.java b/utils/misc/src/main/java/org/onlab/packet/RIPngEntry.java
index cfe3b62..453f9f6 100644
--- a/utils/misc/src/main/java/org/onlab/packet/RIPngEntry.java
+++ b/utils/misc/src/main/java/org/onlab/packet/RIPngEntry.java
@@ -108,7 +108,6 @@
 
         return super.equals(that) &&
                 Objects.equals(metric, that.metric) &&
-                Objects.equals(routeTag, that.routeTag) &&
                 Objects.equals(prefixLen, that.prefixLen) &&
                 Arrays.equals(prefix, that.prefix) &&
                 Objects.equals(routeTag, that.routeTag);
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/CoreWebApplication.java b/web/api/src/main/java/org/onosproject/rest/resources/CoreWebApplication.java
index 4677844..f1ca75f 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/CoreWebApplication.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/CoreWebApplication.java
@@ -53,7 +53,8 @@
                 MastershipWebResource.class,
                 InvalidConfigExceptionMapper.class,
                 DpisWebResource.class,
-                DiagnosticsWebResource.class
+                DiagnosticsWebResource.class,
+                UiPreferencesWebResource.class
         );
     }
 }
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/UiPreferencesWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/UiPreferencesWebResource.java
new file mode 100644
index 0000000..e64ec24
--- /dev/null
+++ b/web/api/src/main/java/org/onosproject/rest/resources/UiPreferencesWebResource.java
@@ -0,0 +1,132 @@
+/*
+ * Copyright 2015-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.rest.resources;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import org.onosproject.rest.AbstractWebResource;
+import org.onosproject.ui.UiPreferencesService;
+
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.io.IOException;
+
+import static org.onlab.util.Tools.nullIsNotFound;
+
+/**
+ * Manage user preferences.
+ */
+@Path("ui/preferences")
+public class UiPreferencesWebResource extends AbstractWebResource {
+
+    /**
+     * Gets all user preferences.
+     *
+     * @return 200 OK with user preferences JSON
+     */
+    @GET
+    @Produces(MediaType.APPLICATION_JSON)
+    public Response download() {
+        UiPreferencesService service = get(UiPreferencesService.class);
+        ObjectMapper mapper = new ObjectMapper();
+        ObjectNode root = mapper.createObjectNode();
+
+        service.getUserNames().forEach(user -> {
+            ObjectNode prefs = mapper.createObjectNode();
+            root.set(user, prefs);
+            service.getPreferences(user).forEach(prefs::set);
+        });
+        return ok(root).build();
+    }
+
+    /**
+     * Gets user preferences for the given user.
+     *
+     * @param user user name
+     * @return 200 OK with user preferences JSON
+     */
+    @GET
+    @Path("{user}")
+    @Produces(MediaType.APPLICATION_JSON)
+    public Response download(@PathParam("user") String user) {
+        UiPreferencesService service = get(UiPreferencesService.class);
+        ObjectMapper mapper = new ObjectMapper();
+        ObjectNode prefs = mapper.createObjectNode();
+        service.getPreferences(user).forEach(prefs::set);
+        return ok(prefs).build();
+    }
+
+    /**
+     * Gets the specified user preferences for the given user.
+     *
+     * @param user user name
+     * @param pref preferences name
+     * @return 200 OK with user preferences JSON
+     */
+    @GET
+    @Path("{user}/{pref}")
+    @Produces(MediaType.APPLICATION_JSON)
+    public Response download(@PathParam("user") String user,
+                             @PathParam("pref") String pref) {
+        UiPreferencesService service = get(UiPreferencesService.class);
+        return ok(nullIsNotFound(service.getPreference(user, pref), "No such preference")).build();
+    }
+
+    /**
+     * Gets the specified user preferences for the given user.
+     *
+     * @param user    user name
+     * @param pref    preferences name
+     * @param request preferences JSON
+     * @return 200 OK
+     * @throws IOException if given JSON is invalid
+     */
+    @PUT
+    @Path("{user}/{pref}")
+    @Produces(MediaType.APPLICATION_JSON)
+    public Response upload(@PathParam("user") String user,
+                           @PathParam("pref") String pref,
+                           String request) throws IOException {
+        UiPreferencesService service = get(UiPreferencesService.class);
+        ObjectNode json = (ObjectNode) mapper().readTree(request);
+        service.setPreference(user, pref, json);
+        return Response.ok().build();
+    }
+
+    /**
+     * Removes the specified user preferences for the given user.
+     *
+     * @param user user name
+     * @param pref preferences name
+     * @return 204 no content
+     */
+    @DELETE
+    @Path("{user}/{pref}")
+    @Produces(MediaType.APPLICATION_JSON)
+    public Response remove(@PathParam("user") String user,
+                           @PathParam("pref") String pref) {
+        UiPreferencesService service = get(UiPreferencesService.class);
+        service.setPreference(user, pref, null);
+        return Response.noContent().build();
+    }
+
+}
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java b/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java
index f3afa1a..a50fd1b 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java
@@ -366,7 +366,11 @@
 
     @Override
     public void setPreference(String username, String key, ObjectNode value) {
-        prefs.put(key(username, key), value);
+        if (value != null) {
+            prefs.put(key(username, key), value);
+        } else {
+            prefs.remove(key(username, key));
+        }
     }
 
     // =====================================================================
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/cli/UiPreferencesListCommand.java b/web/gui/src/main/java/org/onosproject/ui/impl/cli/UiPreferencesListCommand.java
new file mode 100644
index 0000000..b79a116
--- /dev/null
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/cli/UiPreferencesListCommand.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2015-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.ui.impl.cli;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import org.apache.karaf.shell.commands.Command;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.ui.UiPreferencesService;
+
+/**
+ * Lists all UI user preferences.
+ */
+@Command(scope = "onos", name = "ui-prefs",
+        description = "Lists all UI user preferences")
+public class UiPreferencesListCommand extends AbstractShellCommand {
+
+    @Override
+    protected void execute() {
+        UiPreferencesService service = get(UiPreferencesService.class);
+        ObjectMapper mapper = new ObjectMapper();
+        ObjectNode root = mapper.createObjectNode();
+
+        service.getUserNames().forEach(user -> {
+            ObjectNode prefs = mapper.createObjectNode();
+            root.set(user, prefs);
+            service.getPreferences(user).forEach(prefs::set);
+        });
+
+        print("%s", root);
+    }
+}
diff --git a/cli/src/main/java/org/onosproject/cli/UiViewListCommand.java b/web/gui/src/main/java/org/onosproject/ui/impl/cli/UiViewListCommand.java
similarity index 95%
rename from cli/src/main/java/org/onosproject/cli/UiViewListCommand.java
rename to web/gui/src/main/java/org/onosproject/ui/impl/cli/UiViewListCommand.java
index 7e1f979..cea67a0 100644
--- a/cli/src/main/java/org/onosproject/cli/UiViewListCommand.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/cli/UiViewListCommand.java
@@ -13,12 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.cli;
+package org.onosproject.ui.impl.cli;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ArrayNode;
 import org.apache.karaf.shell.commands.Command;
+import org.onosproject.cli.AbstractShellCommand;
 import org.onosproject.ui.UiExtension;
 import org.onosproject.ui.UiExtensionService;
 
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/cli/package-info.java b/web/gui/src/main/java/org/onosproject/ui/impl/cli/package-info.java
new file mode 100644
index 0000000..9b0d604
--- /dev/null
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/cli/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Set of CLI commands for interacting with the UI services.
+ */
+package org.onosproject.ui.impl.cli;
\ No newline at end of file
diff --git a/web/gui/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/web/gui/src/main/resources/OSGI-INF/blueprint/shell-config.xml
index 0a82738..4bc2b55 100644
--- a/web/gui/src/main/resources/OSGI-INF/blueprint/shell-config.xml
+++ b/web/gui/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -18,6 +18,14 @@
 
     <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
         <command>
+            <action class="org.onosproject.ui.impl.cli.UiViewListCommand"/>
+        </command>
+
+        <command>
+            <action class="org.onosproject.ui.impl.cli.UiPreferencesListCommand"/>
+        </command>
+
+        <command>
             <action class="org.onosproject.ui.impl.topo.cli.UiCacheMembersCommand"/>
         </command>
         <command>