Changing DHCP allocation map key to account for VLAN-id.

This way different services for the same subscriber, which have the same macAddress
but different vlanIds, won't overwrite each other. Allocations will also show the vlanId.
Also allocations were previously done only for DHCPACK for messages from the server.
Now updating allocations on all messages from dhcp-server.
Finally, updating unit tests to check dhcp-allocations, and cleaning up the logs by ignoring port-stats.

Change-Id: Ib48039ddcea0de7d3a60a7a6c43df40b932c4811
diff --git a/api/src/main/java/org/opencord/dhcpl2relay/DhcpAllocationInfo.java b/api/src/main/java/org/opencord/dhcpl2relay/DhcpAllocationInfo.java
index 770b2f0..6b5e3cd 100755
--- a/api/src/main/java/org/opencord/dhcpl2relay/DhcpAllocationInfo.java
+++ b/api/src/main/java/org/opencord/dhcpl2relay/DhcpAllocationInfo.java
@@ -15,13 +15,14 @@
  */
 package org.opencord.dhcpl2relay;
 
+import java.time.Instant;
+
 import org.onlab.packet.DHCP;
 import org.onlab.packet.IpAddress;
 import org.onlab.packet.MacAddress;
+import org.onlab.packet.VlanId;
 import org.onosproject.net.ConnectPoint;
 
-import java.time.Instant;
-
 /**
  * Information about DHCP Allocations.
  */
@@ -34,6 +35,7 @@
     private Instant allocationTime;
     private DHCP.MsgType type;
     private String subscriberId;
+    private VlanId vlanId;
 
     /**
      * Creates a new DHCP allocation info record.
@@ -43,16 +45,20 @@
      * @param circuitId option 82 information
      * @param macAddress MAC address of client
      * @param ip IP of client if allocated
+     * @param vlanId VLAN id of subscriber or service
      * @param subscriberId Sadis ID of a subscriber
      */
     public DhcpAllocationInfo(ConnectPoint location, DHCP.MsgType type,
-                              String circuitId, MacAddress macAddress, IpAddress ip, String subscriberId) {
+                              String circuitId, MacAddress macAddress,
+                              IpAddress ip, VlanId vlanId,
+                              String subscriberId) {
         this.location = location;
         this.type = type;
         this.circuitId = circuitId;
         this.macAddress = macAddress;
         this.ip = ip;
         this.allocationTime = Instant.now();
+        this.vlanId = vlanId;
         this.subscriberId = subscriberId;
     }
 
@@ -102,6 +108,15 @@
     }
 
     /**
+     * VLAN id of client or service.
+     *
+     * @return vlan id
+     */
+    public VlanId vlanId() {
+        return vlanId;
+    }
+
+    /**
      * SubscriberId of client if it has one.
      *
      * @return SubscriberId
@@ -118,4 +133,18 @@
     public Instant allocationTime() {
         return allocationTime;
     }
+
+    @Override
+    public String toString() {
+        return com.google.common.base.MoreObjects.toStringHelper(this)
+                .add("subscriberId", subscriberId)
+                .add("location", location)
+                .add("state", type)
+                .add("macAddress", macAddress)
+                .add("vlanId", vlanId)
+                .add("circuitId", circuitId)
+                .add("allocatedIP", ip)
+                .add("timestamp", allocationTime)
+                .toString();
+    }
 }