Drop using BNG attachment IDs in favor or dynamically allocated line IDs

The current implementation of BngProgrammable for fabric.p4 uses
attachment IDs as line IDs, thus forcing apps such as bngc to be aware
of such implementation detail and to manage the allocation of such IDs.
Unfortunately, allocation of IDs is dependent on the device (P4 program)
implementation (e.g., line counter size), and so it should not be left
to apps.

This patch removes the need for attachment IDs at all and instead relies
on a driver-level service to dynamically allocate line IDs based on the
attachment attributes (currently s-tag, c-tag, mac address).

The current implementation of the allocation logic is a trivial one,
i.e. non-distributed and non-optimized.

Change-Id: Ie960936ee750cf565b8de41370085ecf9d49e931
(cherry picked from commit 6aa2a6ea743e8104ee3c62acb7d26acbd1452614)
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/BngProgrammable.java b/core/api/src/main/java/org/onosproject/net/behaviour/BngProgrammable.java
index 3f6f9e9..ccf9fb9 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/BngProgrammable.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/BngProgrammable.java
@@ -19,7 +19,6 @@
 import org.onlab.packet.IpAddress;
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.VlanId;
-import org.onlab.util.Identifier;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.net.driver.HandlerBehaviour;
 import org.onosproject.net.pi.runtime.PiCounterCellData;
@@ -194,43 +193,38 @@
      * identifies a L2/L2.5 tunnel line between the RG and the BNG.
      */
     interface Attachment {
-        /**
-         * Get the identifier of the attachment.
-         *
-         * @return The identifier of the attachment.
-         */
-        AttachmentId attachmentId();
 
         /**
-         * Get the application ID that generated the attachment.
+         * Returns the application that is responsible for managing the
+         * attachment.
          *
          * @return The application ID.
          */
         ApplicationId appId();
 
         /**
-         * Get the VLAN S-tag of the attachment.
+         * Returns the VLAN S-tag of the attachment.
          *
          * @return The VLAN S-tag of the attachment.
          */
         VlanId sTag();
 
         /**
-         * Get the VLAN C-tag of the attachment.
+         * Returns the VLAN C-tag of the attachment.
          *
          * @return The VLAN C-tag of the attachment.
          */
         VlanId cTag();
 
         /**
-         * Get the MAC address of the attachment.
+         * Returns the MAC address of the attachment.
          *
          * @return The MAC address of the attachment.
          */
         MacAddress macAddress();
 
         /**
-         * Get the IP address of the attachment.
+         * Returns the IP address of the attachment.
          *
          * @return The IP address of the attachment.
          */
@@ -244,28 +238,31 @@
         boolean lineActive();
 
         /**
-         * Get the type of attachment.
+         * Returns the type of attachment.
          *
          * @return type of attachment
          */
         AttachmentType type();
 
         /**
-         * Get the PPPoE session ID of the attachment. This method is meaningful
-         * only if the attachment type is PPPoE.
+         * Returns the PPPoE session ID of the attachment. This method is
+         * meaningful only if the attachment type is PPPoE.
          *
          * @return The PPPoE session ID.
          */
         short pppoeSessionId();
 
+        /**
+         * Types of attachment.
+         */
         enum AttachmentType {
             /**
-             * Implemented as PPPoE attachment.
+             * PPPoE attachment.
              */
             PPPoE,
 
             /**
-             * Implemented as IPoE attachment.
+             * IPoE attachment.
              */
             // TODO: unsupported.
             IPoE
@@ -273,20 +270,6 @@
     }
 
     /**
-     * The identifier of the attachment.
-     */
-    class AttachmentId extends Identifier<Long> {
-        /**
-         * Identifies the attachment at network level.
-         *
-         * @param id long value
-         */
-        public AttachmentId(long id) {
-            super(id);
-        }
-    }
-
-    /**
      * An exception indicating a an error happened in the BNG programmable
      * behaviour.
      */