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/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;