ONOS dependency is changed from 1.13.1 to 1.13.6
SADIS interface is changed
AAA must use the updated version and interfaces

Change-Id: I14aeff6929eb1f7670fbe2071feaa5aeb9374da9
diff --git a/pom.xml b/pom.xml
index 75a4c07..03fd896 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,20 +22,20 @@
     <parent>
         <groupId>org.onosproject</groupId>
         <artifactId>onos-dependencies</artifactId>
-        <version>1.13.1</version>
+        <version>1.13.6</version>
         <relativePath></relativePath>
     </parent>
 
     <groupId>org.opencord</groupId>
     <artifactId>aaa</artifactId>
-    <version>1.8.0</version>
+    <version>1.9.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <description>ONOS authentication application</description>
 
     <properties>
         <onos.app.name>org.opencord.aaa</onos.app.name>
-        <onos.version>1.13.1</onos.version>
+        <onos.version>1.13.6</onos.version>
         <onos.app.title>AAA App</onos.app.title>
         <onos.app.category>Security</onos.app.category>
         <onos.app.url>http://opencord.org</onos.app.url>
@@ -43,7 +43,7 @@
         <onos.app.requires>
               org.opencord.sadis
         </onos.app.requires>
-        <sadis.api.version>2.1.0</sadis.api.version>
+        <sadis.api.version>3.0.0</sadis.api.version>
     </properties>
 
     <dependencies>
diff --git a/src/main/java/org/opencord/aaa/AaaManager.java b/src/main/java/org/opencord/aaa/AaaManager.java
index b6b417d..59784bb 100755
--- a/src/main/java/org/opencord/aaa/AaaManager.java
+++ b/src/main/java/org/opencord/aaa/AaaManager.java
@@ -58,7 +58,9 @@
 import org.onosproject.net.packet.PacketContext;
 import org.onosproject.net.packet.PacketProcessor;
 import org.onosproject.net.packet.PacketService;
-import org.opencord.sadis.SubscriberAndDeviceInformationService;
+import org.opencord.sadis.BaseInformationService;
+import org.opencord.sadis.SadisService;
+import org.opencord.sadis.SubscriberAndDeviceInformation;
 import org.osgi.service.component.annotations.Activate;
 import org.slf4j.Logger;
 
@@ -88,11 +90,13 @@
     protected DeviceService deviceService;
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
-    protected SubscriberAndDeviceInformationService subsService;
+    protected SadisService sadisService;
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
     protected MastershipService mastershipService;
 
+    protected BaseInformationService<SubscriberAndDeviceInformation> subsService;
+
     private final DeviceListener deviceListener = new InternalDeviceListener();
 
     // NAS IP address
@@ -192,6 +196,7 @@
         eventDispatcher.addSink(AuthenticationEvent.class, listenerRegistry);
         netCfgService.addListener(cfgListener);
         netCfgService.registerConfigFactory(factory);
+        subsService = sadisService.getSubscriberInfoService();
         customInfo = new CustomizationInfo(subsService, deviceService);
         cfgListener.reconfigureNetwork(netCfgService.getConfig(appId, AaaConfig.class));
         log.info("Starting with config {} {}", this, newCfg);
diff --git a/src/main/java/org/opencord/aaa/AaaShowUsersCommand.java b/src/main/java/org/opencord/aaa/AaaShowUsersCommand.java
index f05dd8a..95d407b 100644
--- a/src/main/java/org/opencord/aaa/AaaShowUsersCommand.java
+++ b/src/main/java/org/opencord/aaa/AaaShowUsersCommand.java
@@ -20,8 +20,8 @@
 import org.onosproject.net.AnnotationKeys;
 import org.onosproject.net.device.DeviceService;
 
+import org.opencord.sadis.SadisService;
 import org.opencord.sadis.SubscriberAndDeviceInformation;
-import org.opencord.sadis.SubscriberAndDeviceInformationService;
 
 /**
  * Shows the users in the aaa.
@@ -40,8 +40,8 @@
         };
 
         DeviceService devService = AbstractShellCommand.get(DeviceService.class);
-        SubscriberAndDeviceInformationService subsService =
-                AbstractShellCommand.get(SubscriberAndDeviceInformationService.class);
+        SadisService sadisService =
+                AbstractShellCommand.get(SadisService.class);
 
         for (StateMachine stateMachine : StateMachine.sessionIdMap().values()) {
             String deviceId = stateMachine.supplicantConnectpoint().deviceId().toString();
@@ -60,7 +60,7 @@
                     annotations().value(AnnotationKeys.PORT_NAME);
 
             String subsId = "UNKNOWN";
-            SubscriberAndDeviceInformation subscriber = subsService.get(nasPortId);
+            SubscriberAndDeviceInformation subscriber = sadisService.getSubscriberInfoService().get(nasPortId);
             if (subscriber != null) {
                 subsId = subscriber.nasPortId();
             }
diff --git a/src/main/java/org/opencord/aaa/CustomizationInfo.java b/src/main/java/org/opencord/aaa/CustomizationInfo.java
index d0709f2..22f575f 100755
--- a/src/main/java/org/opencord/aaa/CustomizationInfo.java
+++ b/src/main/java/org/opencord/aaa/CustomizationInfo.java
@@ -17,9 +17,8 @@
 package org.opencord.aaa;
 
 import org.onosproject.net.device.DeviceService;
-import org.opencord.sadis.SubscriberAndDeviceInformationService;
-
-//import java.util.Map;
+import org.opencord.sadis.BaseInformationService;
+import org.opencord.sadis.SubscriberAndDeviceInformation;
 
 /**
  * Info required to do customization to packets.
@@ -28,9 +27,10 @@
 
     private DeviceService devService;
 
-    private SubscriberAndDeviceInformationService subscriberService;
+    private BaseInformationService<SubscriberAndDeviceInformation> subscriberService;
 
-    public CustomizationInfo(SubscriberAndDeviceInformationService subsService, DeviceService devService) {
+    public CustomizationInfo(BaseInformationService<SubscriberAndDeviceInformation> subsService,
+                             DeviceService devService) {
         this.subscriberService = subsService;
         this.devService = devService;
     }
@@ -39,7 +39,7 @@
         return devService;
     }
 
-    public SubscriberAndDeviceInformationService subscriberService() {
+    public BaseInformationService<SubscriberAndDeviceInformation> subscriberService() {
         return subscriberService;
     }
 }
diff --git a/src/main/java/org/opencord/aaa/PortBasedRadiusCommunicator.java b/src/main/java/org/opencord/aaa/PortBasedRadiusCommunicator.java
index cf53b68..67f161c 100755
--- a/src/main/java/org/opencord/aaa/PortBasedRadiusCommunicator.java
+++ b/src/main/java/org/opencord/aaa/PortBasedRadiusCommunicator.java
@@ -44,8 +44,8 @@
 import org.onosproject.net.packet.PacketContext;
 import org.onosproject.net.packet.PacketService;
 
+import org.opencord.sadis.BaseInformationService;
 import org.opencord.sadis.SubscriberAndDeviceInformation;
-import org.opencord.sadis.SubscriberAndDeviceInformationService;
 
 import org.slf4j.Logger;
 
@@ -78,7 +78,7 @@
 
     MastershipService mastershipService;
 
-    SubscriberAndDeviceInformationService subsService;
+    BaseInformationService<SubscriberAndDeviceInformation> subsService;
 
     // to store local mapping of IP Address and Serial No of Device
     private Map<Ip4Address, String> ipToSnMap;
@@ -115,7 +115,7 @@
 
     PortBasedRadiusCommunicator(ApplicationId appId, PacketService pktService,
                                 MastershipService masService, DeviceService devService,
-                                SubscriberAndDeviceInformationService subsService,
+                                BaseInformationService<SubscriberAndDeviceInformation> subsService,
                                 PacketCustomizer pktCustomizer, AaaManager aaaManager) {
         this.appId = appId;
         this.packetService = pktService;
diff --git a/src/test/java/org/opencord/aaa/AaaManagerTest.java b/src/test/java/org/opencord/aaa/AaaManagerTest.java
index d615aee..1ecfaea 100644
--- a/src/test/java/org/opencord/aaa/AaaManagerTest.java
+++ b/src/test/java/org/opencord/aaa/AaaManagerTest.java
@@ -163,7 +163,7 @@
         aaaManager.coreService = new CoreServiceAdapter();
         aaaManager.packetService = new MockPacketService();
         aaaManager.deviceService = new TestDeviceService();
-        aaaManager.subsService = new MockSubService();
+        aaaManager.sadisService = new MockSadisService();
         TestUtils.setField(aaaManager, "eventDispatcher", new TestEventDispatcher());
         aaaManager.activate();
     }
diff --git a/src/test/java/org/opencord/aaa/AaaTestBase.java b/src/test/java/org/opencord/aaa/AaaTestBase.java
index cb2c5d1..728eba2 100644
--- a/src/test/java/org/opencord/aaa/AaaTestBase.java
+++ b/src/test/java/org/opencord/aaa/AaaTestBase.java
@@ -38,8 +38,10 @@
 import org.onosproject.net.packet.PacketProcessor;
 import org.onosproject.net.packet.PacketServiceAdapter;
 
+import org.opencord.sadis.BandwidthProfileInformation;
+import org.opencord.sadis.BaseInformationService;
+import org.opencord.sadis.SadisService;
 import org.opencord.sadis.SubscriberAndDeviceInformation;
-import org.opencord.sadis.SubscriberAndDeviceInformationService;
 
 import java.nio.ByteBuffer;
 import java.security.MessageDigest;
@@ -158,7 +160,20 @@
         }
     }
 
-    final class MockSubService implements SubscriberAndDeviceInformationService {
+    final class MockSadisService implements SadisService {
+
+        @Override
+        public BaseInformationService<SubscriberAndDeviceInformation> getSubscriberInfoService() {
+            return new MockSubService();
+        }
+
+        @Override
+        public BaseInformationService<BandwidthProfileInformation> getBandwidthProfileService() {
+            return null;
+        }
+    }
+
+    final class MockSubService implements BaseInformationService<SubscriberAndDeviceInformation> {
         private final VlanId clientCtag = VlanId.vlanId((short) 999);
         private final VlanId clientStag = VlanId.vlanId((short) 111);
         private final String clientNasPortId = "PON 1/1";