[VOL-4055][ONOS-8138] Adding annotations to meter to allow passing of associated information

This patch allows for adding key value elements in the meter request and in the meter generated from it.
An example is:
Annotations annotations = DefaultAnnotations.builder().set("MeterForDeviceType", "olt").build();
DefaultMeterRequest.builder().withAnnotations(annotations)
Generates:
 DefaultMeter{device=of:00000a0a0a0a0a0b, cellId=2, appId=org.opencord.olt, unit=KB_PER_SEC, isBurst=true, state=ADDED, bands=[DefaultBand{rate=100000, burst-size=5000, type=DROP, drop-precedence=null}, DefaultBand{rate=100000, burst-size=5000, type=DROP, drop-precedence=null}, DefaultBand{rate=100000, burst-size=0, type=DROP, drop-precedence=null}], annotations={MeterForDeviceType=olt}}

Change-Id: Ifaded96ebeb7956bc60cdf311180c984c3ba954e
diff --git a/core/api/src/main/java/org/onosproject/net/meter/DefaultMeterRequest.java b/core/api/src/main/java/org/onosproject/net/meter/DefaultMeterRequest.java
index d246534..e6e2d1b 100644
--- a/core/api/src/main/java/org/onosproject/net/meter/DefaultMeterRequest.java
+++ b/core/api/src/main/java/org/onosproject/net/meter/DefaultMeterRequest.java
@@ -17,6 +17,8 @@
 
 import com.google.common.collect.ImmutableSet;
 import org.onosproject.core.ApplicationId;
+import org.onosproject.net.AbstractAnnotated;
+import org.onosproject.net.Annotations;
 import org.onosproject.net.DeviceId;
 
 import java.util.Collection;
@@ -29,7 +31,7 @@
 /**
  * A default implementation of a meter.
  */
-public final class DefaultMeterRequest implements MeterRequest {
+public final class DefaultMeterRequest extends AbstractAnnotated implements MeterRequest {
 
 
 
@@ -44,7 +46,8 @@
     private DefaultMeterRequest(DeviceId deviceId, ApplicationId appId,
                                 Meter.Unit unit, boolean burst,
                                 Collection<Band> bands, MeterContext context,
-                                Type op) {
+                                Type op, Annotations... annotations) {
+        super(annotations);
         this.deviceId = deviceId;
         this.appId = appId;
         this.unit = unit;
@@ -98,7 +101,9 @@
                 .add("appId", appId.name())
                 .add("unit", unit)
                 .add("isBurst", burst)
-                .add("bands", bands).toString();
+                .add("bands", bands)
+                .add("annotations", annotations())
+                .toString();
     }
 
     public static final class Builder implements MeterRequest.Builder {
@@ -110,6 +115,7 @@
         private DeviceId deviceId;
         private MeterContext context;
         private Optional<MeterId> desiredId = Optional.empty();
+        private Annotations annotations;
 
 
         @Override
@@ -149,17 +155,23 @@
         }
 
         @Override
+        public MeterRequest.Builder withAnnotations(Annotations annotations) {
+            this.annotations = annotations;
+            return this;
+        }
+
+        @Override
         public MeterRequest add() {
             validate();
             return new DefaultMeterRequest(deviceId, appId, unit, burst, bands,
-                                           context, Type.ADD);
+                                           context, Type.ADD, annotations);
         }
 
         @Override
         public MeterRequest remove() {
             validate();
             return new DefaultMeterRequest(deviceId, appId, unit, burst, bands,
-                                           context, Type.REMOVE);
+                                           context, Type.REMOVE, annotations);
         }
 
         private void validate() {