Support install IntIntents to device with postcard mode

Include the following changes:
 - INT application now can install reuls/configs to the device based on the
   Int intent telemetry mode and the functionality supported by device.
 - Add "Telemetry Mode" option to INT app GUI

Change-Id: I1a9938b076030497a3b2984abe66fed09c190c7d
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntDeviceConfig.java b/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntDeviceConfig.java
index a21a2ae..92e5fa2 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntDeviceConfig.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntDeviceConfig.java
@@ -16,6 +16,7 @@
 package org.onosproject.net.behaviour.inbandtelemetry;
 
 import com.google.common.annotations.Beta;
+import com.google.common.base.Objects;
 import org.onlab.packet.IpAddress;
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.TpPort;
@@ -36,14 +37,14 @@
          * Embeds telemetry metadata according to the INT specification.
          *
          * @see <a href="https://github.com/p4lang/p4-applications/blob/master/docs/INT.pdf">
-         *     INT sepcification</a>
+         * INT sepcification</a>
          */
         INT,
         /**
          * Embeds telemetry metadata according to the OAM specification.
          *
          * @see <a href="https://tools.ietf.org/html/draft-ietf-ippm-ioam-data">
-         *     Data fields for In-situ OAM</a>
+         * Data fields for In-situ OAM</a>
          */
         IOAM
     }
@@ -166,6 +167,31 @@
         return new Builder();
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        IntDeviceConfig that = (IntDeviceConfig) o;
+        return enabled == that.enabled &&
+                hopLatencySensitivity == that.hopLatencySensitivity &&
+                Objects.equal(collectorIp, that.collectorIp) &&
+                Objects.equal(collectorPort, that.collectorPort) &&
+                Objects.equal(collectorNextHopMac, that.collectorNextHopMac) &&
+                Objects.equal(sinkIp, that.sinkIp) &&
+                Objects.equal(sinkMac, that.sinkMac) &&
+                spec == that.spec;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(collectorIp, collectorPort, collectorNextHopMac,
+                sinkIp, sinkMac, spec, enabled, hopLatencySensitivity);
+    }
+
     /**
      * An IntConfig object builder.
      */
@@ -280,7 +306,7 @@
             checkArgument(minFlowHopLatencyChangeNs >= 0, "Hop latency sensitivity must be positive or zero");
 
             return new IntDeviceConfig(collectorIp, collectorPort, collectorNextHopMac,
-                                 sinkIp, sinkMac, spec, enabled, minFlowHopLatencyChangeNs);
+                    sinkIp, sinkMac, spec, enabled, minFlowHopLatencyChangeNs);
         }
     }
 }
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntObjective.java b/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntObjective.java
index 8f036fe..4d94e62 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntObjective.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntObjective.java
@@ -15,6 +15,7 @@
  */
 package org.onosproject.net.behaviour.inbandtelemetry;
 
+import com.google.common.base.Objects;
 import com.google.common.collect.ImmutableSet;
 import org.onosproject.net.flow.DefaultTrafficSelector;
 import org.onosproject.net.flow.TrafficSelector;
@@ -75,6 +76,24 @@
         return new Builder();
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        IntObjective that = (IntObjective) o;
+        return Objects.equal(selector, that.selector) &&
+                Objects.equal(metadataTypes, that.metadataTypes);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(selector, metadataTypes);
+    }
+
     /**
      * An IntObjective builder.
      */
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntProgrammable.java b/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntProgrammable.java
index 5560e8c..8cbcae0 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntProgrammable.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntProgrammable.java
@@ -41,7 +41,11 @@
         /**
          * Transit functionality.
          */
-        TRANSIT
+        TRANSIT,
+        /**
+         * Postcard functionality.
+         */
+        POSTCARD
     }
 
     /**