Both the Upstream and Downstream Bandwidth Profiles can be 'named' and Referenced from a Subscriber Record in the SADIS DB on ONOS.

When the vOLT Appplication uses a Subscriber Record for OpenFlow message generation to VOLTHA the vOLT Application Must read the Bandwidth Profile name and be able to retrieve the Profile from a Database of Bandwidth Profiles. The Named Profile is converted to a Meter and Meter Band(s) and configured on the VOLTHA Instance, and the Flows will reference the Meter.

Note the code should be written to follow the SADIS DB model where it is designed to reference an external database but the DB records can be cached locally.

The Upstream Bandwidth Profile will consist of the following optional components:

EIR (Bits/Sec)

EBS (Bytes)

CIR (Bits/Sec)

CBS (Bits/Sec)

AIR (Bits/Sec)

The Downstream Bandwidth Profile will consist of the following optional components:

EIR (Bits/Sec)

EBS (Bytes)

CIR (Bits/Sec)

CBS (Bits/Sec)

 Each bandwidth component will be interpreted as defined in the Technology Profile Whitepaper ([^vOLTHA_Access_Tech_AugmentationV0.6.pdf]

)

Change-Id: Ie4edf4e9f27e9b5b9a84e6c733dc4f283a9996a7
diff --git a/app/src/test/java/org/opencord/olt/impl/OltTest.java b/app/src/test/java/org/opencord/olt/impl/OltTest.java
index 1878c74..a925aa3 100644
--- a/app/src/test/java/org/opencord/olt/impl/OltTest.java
+++ b/app/src/test/java/org/opencord/olt/impl/OltTest.java
@@ -38,8 +38,10 @@
 import org.onosproject.net.PortNumber;
 import org.onosproject.net.device.DeviceServiceAdapter;
 import org.onosproject.net.provider.ProviderId;
+import org.opencord.sadis.BandwidthProfileInformation;
+import org.opencord.sadis.BaseInformationService;
 import org.opencord.sadis.SubscriberAndDeviceInformation;
-import org.opencord.sadis.SubscriberAndDeviceInformationService;
+import org.opencord.sadis.SadisService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -62,7 +64,9 @@
     public void setUp() {
         olt = new Olt();
         olt.deviceService = new MockDeviceService();
-        olt.subsService = new MockSubService();
+        olt.sadisService = new MockSadisService();
+        olt.subsService = olt.sadisService.getSubscriberInfoService();
+
     }
 
     /**
@@ -166,7 +170,21 @@
         }
     }
 
-    private class MockSubService implements SubscriberAndDeviceInformationService {
+    private class MockSadisService implements SadisService {
+
+
+        @Override
+        public BaseInformationService<SubscriberAndDeviceInformation> getSubscriberInfoService() {
+            return new MockSubService();
+        }
+
+        @Override
+        public BaseInformationService<BandwidthProfileInformation> getBandwidthProfileService() {
+            return null;
+        }
+    }
+
+    private class MockSubService implements BaseInformationService<SubscriberAndDeviceInformation> {
         MockSubscriberAndDeviceInformation sub =
                 new MockSubscriberAndDeviceInformation(CLIENT_NAS_PORT_ID, CLIENT_C_TAG,
                                                        CLIENT_S_TAG, CLIENT_NAS_PORT_ID, CLIENT_CIRCUIT_ID, null, null);