[SEBA-593] Splitting aaa app in implementation and api bundles
Change-Id: Ib81650be0695258bdd1f4cd6131f2206760e0da6
diff --git a/api/pom.xml b/api/pom.xml
new file mode 100644
index 0000000..4b0c04a
--- /dev/null
+++ b/api/pom.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2015-present Open Networking Foundation
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>aaa</artifactId>
+ <groupId>org.opencord</groupId>
+ <version>1.9.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>aaa-api</artifactId>
+
+ <packaging>bundle</packaging>
+
+ <description>AAA application API</description>
+
+ <properties>
+ <sadis.api.version>3.1.0-SNAPSHOT</sadis.api.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onlab-junit</artifactId>
+ <version>${onos.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-core-serializers</artifactId>
+ <version>${onos.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opencord</groupId>
+ <artifactId>sadis-api</artifactId>
+ <version>${sadis.api.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
diff --git a/src/main/java/org/opencord/aaa/AaaConfig.java b/api/src/main/java/org/opencord/aaa/AaaConfig.java
similarity index 97%
rename from src/main/java/org/opencord/aaa/AaaConfig.java
rename to api/src/main/java/org/opencord/aaa/AaaConfig.java
index 4124e80..3072ff5 100644
--- a/src/main/java/org/opencord/aaa/AaaConfig.java
+++ b/api/src/main/java/org/opencord/aaa/AaaConfig.java
@@ -59,13 +59,13 @@
protected static final String DEFAULT_RADIUS_IP = "10.128.10.4";
// RADIUS MAC address
- protected static final String DEFAULT_RADIUS_MAC = "00:00:00:00:01:10";
+ public static final String DEFAULT_RADIUS_MAC = "00:00:00:00:01:10";
// NAS IP address
- protected static final String DEFAULT_NAS_IP = "10.128.9.244";
+ public static final String DEFAULT_NAS_IP = "10.128.9.244";
// NAS MAC address
- protected static final String DEFAULT_NAS_MAC = "00:00:00:00:10:01";
+ public static final String DEFAULT_NAS_MAC = "00:00:00:00:10:01";
// RADIUS server shared secret
protected static final String DEFAULT_RADIUS_SECRET = "ONOSecret";
diff --git a/src/main/java/org/opencord/aaa/AuthenticationEvent.java b/api/src/main/java/org/opencord/aaa/AuthenticationEvent.java
similarity index 100%
rename from src/main/java/org/opencord/aaa/AuthenticationEvent.java
rename to api/src/main/java/org/opencord/aaa/AuthenticationEvent.java
diff --git a/src/main/java/org/opencord/aaa/AuthenticationEventListener.java b/api/src/main/java/org/opencord/aaa/AuthenticationEventListener.java
similarity index 100%
rename from src/main/java/org/opencord/aaa/AuthenticationEventListener.java
rename to api/src/main/java/org/opencord/aaa/AuthenticationEventListener.java
diff --git a/src/main/java/org/opencord/aaa/AuthenticationService.java b/api/src/main/java/org/opencord/aaa/AuthenticationService.java
similarity index 100%
rename from src/main/java/org/opencord/aaa/AuthenticationService.java
rename to api/src/main/java/org/opencord/aaa/AuthenticationService.java
diff --git a/src/main/java/org/opencord/aaa/RadiusCommunicator.java b/api/src/main/java/org/opencord/aaa/RadiusCommunicator.java
similarity index 100%
rename from src/main/java/org/opencord/aaa/RadiusCommunicator.java
rename to api/src/main/java/org/opencord/aaa/RadiusCommunicator.java
diff --git a/src/main/java/org/opencord/aaa/StateMachineDelegate.java b/api/src/main/java/org/opencord/aaa/StateMachineDelegate.java
similarity index 100%
rename from src/main/java/org/opencord/aaa/StateMachineDelegate.java
rename to api/src/main/java/org/opencord/aaa/StateMachineDelegate.java
diff --git a/src/main/java/org/opencord/aaa/package-info.java b/api/src/main/java/org/opencord/aaa/package-info.java
similarity index 100%
rename from src/main/java/org/opencord/aaa/package-info.java
rename to api/src/main/java/org/opencord/aaa/package-info.java
diff --git a/app/app.xml b/app/app.xml
new file mode 100644
index 0000000..be7371b
--- /dev/null
+++ b/app/app.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2018-present Open Networking Foundation
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<app name="org.opencord.aaa" origin="ON.Lab" version="${project.version}"
+ category="Traffic Steering" url="http://onosproject.org" title="AAA application for CORD"
+ featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
+ features="${project.artifactId}" apps="org.opencord.sadis">
+ <description>${project.description}</description>
+ <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
+ <artifact>mvn:${project.groupId}/aaa-api/${project.version}</artifact>
+</app>
diff --git a/app/features.xml b/app/features.xml
new file mode 100644
index 0000000..b90eba4
--- /dev/null
+++ b/app/features.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ ~ Copyright 2018-present Open Networking Foundation
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${project.version}">
+ <feature name="${project.artifactId}" version="${project.version}"
+ description="${project.description}">
+ <feature>onos-api</feature>
+ <bundle>mvn:${project.groupId}/aaa-api/${project.version}</bundle>
+ <bundle>mvn:${project.groupId}/${project.artifactId}/${project.version}</bundle>
+ </feature>
+</features>
diff --git a/app/pom.xml b/app/pom.xml
new file mode 100644
index 0000000..d9e5e64
--- /dev/null
+++ b/app/pom.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2015-present Open Networking Foundation
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>aaa</artifactId>
+ <groupId>org.opencord</groupId>
+ <version>1.9.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>aaa-app</artifactId>
+
+ <packaging>bundle</packaging>
+ <description>AAA application for CORD</description>
+
+ <properties>
+ <onos.app.name>org.opencord.aaa</onos.app.name>
+ <onos.version>1.13.9-rc4</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>
+ <onos.app.readme>802.1x authentication service.</onos.app.readme>
+ <onos.app.requires>
+ org.opencord.sadis
+ </onos.app.requires>
+ <sadis.api.version>3.1.0-SNAPSHOT</sadis.api.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opencord</groupId>
+ <artifactId>sadis-api</artifactId>
+ <version>${sadis.api.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opencord</groupId>
+ <artifactId>aaa-api</artifactId>
+ <version>1.9.0-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-scr-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-maven-plugin</artifactId>
+ <version>1.11</version>
+ </plugin>
+ </plugins>
+ </build>
+
+
+</project>
\ No newline at end of file
diff --git a/src/main/java/org/opencord/aaa/AaaManager.java b/app/src/main/java/org/opencord/aaa/impl/AaaManager.java
similarity index 98%
rename from src/main/java/org/opencord/aaa/AaaManager.java
rename to app/src/main/java/org/opencord/aaa/impl/AaaManager.java
index 59784bb..3e75f17 100755
--- a/src/main/java/org/opencord/aaa/AaaManager.java
+++ b/app/src/main/java/org/opencord/aaa/impl/AaaManager.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
import static org.onosproject.net.config.basics.SubjectFactories.APP_SUBJECT_FACTORY;
import static org.slf4j.LoggerFactory.getLogger;
@@ -58,6 +58,12 @@
import org.onosproject.net.packet.PacketContext;
import org.onosproject.net.packet.PacketProcessor;
import org.onosproject.net.packet.PacketService;
+import org.opencord.aaa.AaaConfig;
+import org.opencord.aaa.AuthenticationEvent;
+import org.opencord.aaa.AuthenticationEventListener;
+import org.opencord.aaa.AuthenticationService;
+import org.opencord.aaa.RadiusCommunicator;
+import org.opencord.aaa.StateMachineDelegate;
import org.opencord.sadis.BaseInformationService;
import org.opencord.sadis.SadisService;
import org.opencord.sadis.SubscriberAndDeviceInformation;
diff --git a/src/main/java/org/opencord/aaa/AaaResetDeviceCommand.java b/app/src/main/java/org/opencord/aaa/impl/AaaResetDeviceCommand.java
similarity index 97%
rename from src/main/java/org/opencord/aaa/AaaResetDeviceCommand.java
rename to app/src/main/java/org/opencord/aaa/impl/AaaResetDeviceCommand.java
index 6655fec..14b0fe1 100644
--- a/src/main/java/org/opencord/aaa/AaaResetDeviceCommand.java
+++ b/app/src/main/java/org/opencord/aaa/impl/AaaResetDeviceCommand.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
import org.apache.karaf.shell.commands.Command;
import org.apache.karaf.shell.commands.Argument;
diff --git a/src/main/java/org/opencord/aaa/AaaShowUsersCommand.java b/app/src/main/java/org/opencord/aaa/impl/AaaShowUsersCommand.java
similarity index 98%
rename from src/main/java/org/opencord/aaa/AaaShowUsersCommand.java
rename to app/src/main/java/org/opencord/aaa/impl/AaaShowUsersCommand.java
index 95d407b..ed117ac 100644
--- a/src/main/java/org/opencord/aaa/AaaShowUsersCommand.java
+++ b/app/src/main/java/org/opencord/aaa/impl/AaaShowUsersCommand.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
import org.apache.karaf.shell.commands.Command;
import org.onosproject.cli.AbstractShellCommand;
diff --git a/src/main/java/org/opencord/aaa/AttPacketCustomizer.java b/app/src/main/java/org/opencord/aaa/impl/AttPacketCustomizer.java
similarity index 96%
rename from src/main/java/org/opencord/aaa/AttPacketCustomizer.java
rename to app/src/main/java/org/opencord/aaa/impl/AttPacketCustomizer.java
index f133466..1c23684 100644
--- a/src/main/java/org/opencord/aaa/AttPacketCustomizer.java
+++ b/app/src/main/java/org/opencord/aaa/impl/AttPacketCustomizer.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
/**
* AT&T specific RADIUS packet customization.
diff --git a/src/main/java/org/opencord/aaa/CustomizationInfo.java b/app/src/main/java/org/opencord/aaa/impl/CustomizationInfo.java
similarity index 97%
rename from src/main/java/org/opencord/aaa/CustomizationInfo.java
rename to app/src/main/java/org/opencord/aaa/impl/CustomizationInfo.java
index 22f575f..9277056 100755
--- a/src/main/java/org/opencord/aaa/CustomizationInfo.java
+++ b/app/src/main/java/org/opencord/aaa/impl/CustomizationInfo.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
import org.onosproject.net.device.DeviceService;
import org.opencord.sadis.BaseInformationService;
diff --git a/src/main/java/org/opencord/aaa/PacketCustomizer.java b/app/src/main/java/org/opencord/aaa/impl/PacketCustomizer.java
similarity index 97%
rename from src/main/java/org/opencord/aaa/PacketCustomizer.java
rename to app/src/main/java/org/opencord/aaa/impl/PacketCustomizer.java
index 5f48ba4..265edf7 100755
--- a/src/main/java/org/opencord/aaa/PacketCustomizer.java
+++ b/app/src/main/java/org/opencord/aaa/impl/PacketCustomizer.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
import org.onlab.packet.Ethernet;
import org.onlab.packet.RADIUS;
diff --git a/src/main/java/org/opencord/aaa/PortBasedRadiusCommunicator.java b/app/src/main/java/org/opencord/aaa/impl/PortBasedRadiusCommunicator.java
similarity index 98%
rename from src/main/java/org/opencord/aaa/PortBasedRadiusCommunicator.java
rename to app/src/main/java/org/opencord/aaa/impl/PortBasedRadiusCommunicator.java
index 67f161c..e1b8bb9 100755
--- a/src/main/java/org/opencord/aaa/PortBasedRadiusCommunicator.java
+++ b/app/src/main/java/org/opencord/aaa/impl/PortBasedRadiusCommunicator.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
import org.onlab.packet.ARP;
import org.onlab.packet.DeserializationException;
@@ -44,6 +44,8 @@
import org.onosproject.net.packet.PacketContext;
import org.onosproject.net.packet.PacketService;
+import org.opencord.aaa.AaaConfig;
+import org.opencord.aaa.RadiusCommunicator;
import org.opencord.sadis.BaseInformationService;
import org.opencord.sadis.SubscriberAndDeviceInformation;
diff --git a/src/main/java/org/opencord/aaa/SamplePacketCustomizer.java b/app/src/main/java/org/opencord/aaa/impl/SamplePacketCustomizer.java
similarity index 98%
rename from src/main/java/org/opencord/aaa/SamplePacketCustomizer.java
rename to app/src/main/java/org/opencord/aaa/impl/SamplePacketCustomizer.java
index f710e0d..d8dd486 100755
--- a/src/main/java/org/opencord/aaa/SamplePacketCustomizer.java
+++ b/app/src/main/java/org/opencord/aaa/impl/SamplePacketCustomizer.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
import static org.slf4j.LoggerFactory.getLogger;
diff --git a/src/main/java/org/opencord/aaa/SocketBasedRadiusCommunicator.java b/app/src/main/java/org/opencord/aaa/impl/SocketBasedRadiusCommunicator.java
similarity index 98%
rename from src/main/java/org/opencord/aaa/SocketBasedRadiusCommunicator.java
rename to app/src/main/java/org/opencord/aaa/impl/SocketBasedRadiusCommunicator.java
index e402aae..e2bce35 100755
--- a/src/main/java/org/opencord/aaa/SocketBasedRadiusCommunicator.java
+++ b/app/src/main/java/org/opencord/aaa/impl/SocketBasedRadiusCommunicator.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
import static org.onosproject.net.packet.PacketPriority.CONTROL;
import static org.slf4j.LoggerFactory.getLogger;
@@ -37,6 +37,8 @@
import org.onosproject.net.packet.InboundPacket;
import org.onosproject.net.packet.PacketContext;
import org.onosproject.net.packet.PacketService;
+import org.opencord.aaa.AaaConfig;
+import org.opencord.aaa.RadiusCommunicator;
import org.slf4j.Logger;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
diff --git a/src/main/java/org/opencord/aaa/StateMachine.java b/app/src/main/java/org/opencord/aaa/impl/StateMachine.java
similarity index 98%
rename from src/main/java/org/opencord/aaa/StateMachine.java
rename to app/src/main/java/org/opencord/aaa/impl/StateMachine.java
index d888c98..f9e5f25 100644
--- a/src/main/java/org/opencord/aaa/StateMachine.java
+++ b/app/src/main/java/org/opencord/aaa/impl/StateMachine.java
@@ -15,11 +15,13 @@
*
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
import com.google.common.collect.Maps;
import org.onlab.packet.MacAddress;
import org.onosproject.net.ConnectPoint;
+import org.opencord.aaa.AuthenticationEvent;
+import org.opencord.aaa.StateMachineDelegate;
import org.slf4j.Logger;
import java.util.Map;
@@ -122,8 +124,8 @@
identifierMap = null;
}
- public static void setDelegate(StateMachineDelegate delagate) {
- StateMachine.delegate = delagate;
+ public static void setDelegate(StateMachineDelegate delegate) {
+ StateMachine.delegate = delegate;
}
public static void unsetDelegate(StateMachineDelegate delegate) {
diff --git a/src/main/java/org/opencord/aaa/StateMachineException.java b/app/src/main/java/org/opencord/aaa/impl/StateMachineException.java
similarity index 95%
rename from src/main/java/org/opencord/aaa/StateMachineException.java
rename to app/src/main/java/org/opencord/aaa/impl/StateMachineException.java
index 7e2e3ca..6dd7bb4 100644
--- a/src/main/java/org/opencord/aaa/StateMachineException.java
+++ b/app/src/main/java/org/opencord/aaa/impl/StateMachineException.java
@@ -14,7 +14,7 @@
* limitations under the License.
*
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
/**
* Exception for the State Machine.
diff --git a/src/main/java/org/opencord/aaa/StateMachineInvalidTransitionException.java b/app/src/main/java/org/opencord/aaa/impl/StateMachineInvalidTransitionException.java
similarity index 96%
rename from src/main/java/org/opencord/aaa/StateMachineInvalidTransitionException.java
rename to app/src/main/java/org/opencord/aaa/impl/StateMachineInvalidTransitionException.java
index cfd949a..6ccd3fc 100644
--- a/src/main/java/org/opencord/aaa/StateMachineInvalidTransitionException.java
+++ b/app/src/main/java/org/opencord/aaa/impl/StateMachineInvalidTransitionException.java
@@ -14,7 +14,7 @@
* limitations under the License.
*
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
/**
* Exception raised when the transition from one state to another is invalid.
diff --git a/src/main/java/org/opencord/aaa/StateMachineException.java b/app/src/main/java/org/opencord/aaa/impl/package-info.java
similarity index 63%
copy from src/main/java/org/opencord/aaa/StateMachineException.java
copy to app/src/main/java/org/opencord/aaa/impl/package-info.java
index 7e2e3ca..7737b52 100644
--- a/src/main/java/org/opencord/aaa/StateMachineException.java
+++ b/app/src/main/java/org/opencord/aaa/impl/package-info.java
@@ -1,27 +1,20 @@
/*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2015-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
-package org.opencord.aaa;
/**
- * Exception for the State Machine.
+ * AAA implmentation.
*/
-class StateMachineException extends Exception {
- public StateMachineException(String message) {
- super(message);
-
- }
-}
+package org.opencord.aaa.impl;
diff --git a/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
similarity index 85%
rename from src/main/resources/OSGI-INF/blueprint/shell-config.xml
rename to app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
index 728aaf0..b83f750 100644
--- a/src/main/resources/OSGI-INF/blueprint/shell-config.xml
+++ b/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -17,10 +17,10 @@
<command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
<command>
- <action class="org.opencord.aaa.AaaShowUsersCommand"/>
+ <action class="org.opencord.aaa.impl.AaaShowUsersCommand"/>
</command>
<command>
- <action class="org.opencord.aaa.AaaResetDeviceCommand"/>
+ <action class="org.opencord.aaa.impl.AaaResetDeviceCommand"/>
</command>
</command-bundle>
</blueprint>
diff --git a/src/test/java/org/opencord/aaa/AaaIntegrationTest.java b/app/src/test/java/org/opencord/aaa/impl/AaaIntegrationTest.java
similarity index 98%
rename from src/test/java/org/opencord/aaa/AaaIntegrationTest.java
rename to app/src/test/java/org/opencord/aaa/impl/AaaIntegrationTest.java
index e646c30..8ded2f8 100644
--- a/src/test/java/org/opencord/aaa/AaaIntegrationTest.java
+++ b/app/src/test/java/org/opencord/aaa/impl/AaaIntegrationTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
import org.junit.Before;
import org.junit.Ignore;
@@ -24,6 +24,7 @@
import org.onosproject.core.CoreServiceAdapter;
import org.onosproject.net.config.Config;
import org.onosproject.net.config.NetworkConfigRegistryAdapter;
+import org.opencord.aaa.AaaConfig;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
diff --git a/src/test/java/org/opencord/aaa/AaaManagerTest.java b/app/src/test/java/org/opencord/aaa/impl/AaaManagerTest.java
similarity index 98%
rename from src/test/java/org/opencord/aaa/AaaManagerTest.java
rename to app/src/test/java/org/opencord/aaa/impl/AaaManagerTest.java
index 1ecfaea..8827c1a 100644
--- a/src/test/java/org/opencord/aaa/AaaManagerTest.java
+++ b/app/src/test/java/org/opencord/aaa/impl/AaaManagerTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
import com.google.common.base.Charsets;
import org.junit.After;
@@ -35,6 +35,7 @@
import org.onosproject.net.config.Config;
import org.onosproject.net.config.NetworkConfigRegistryAdapter;
import org.onosproject.net.packet.InboundPacket;
+import org.opencord.aaa.AaaConfig;
import java.lang.reflect.Field;
import java.net.InetAddress;
diff --git a/src/test/java/org/opencord/aaa/AaaTestBase.java b/app/src/test/java/org/opencord/aaa/impl/AaaTestBase.java
similarity index 99%
rename from src/test/java/org/opencord/aaa/AaaTestBase.java
rename to app/src/test/java/org/opencord/aaa/impl/AaaTestBase.java
index 728eba2..2e21ea3 100644
--- a/src/test/java/org/opencord/aaa/AaaTestBase.java
+++ b/app/src/test/java/org/opencord/aaa/impl/AaaTestBase.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
import org.onlab.packet.BasePacket;
import org.onlab.packet.EAP;
diff --git a/src/test/java/org/opencord/aaa/StateMachineTest.java b/app/src/test/java/org/opencord/aaa/impl/StateMachineTest.java
similarity index 99%
rename from src/test/java/org/opencord/aaa/StateMachineTest.java
rename to app/src/test/java/org/opencord/aaa/impl/StateMachineTest.java
index 5b0a62d..4053ff9 100644
--- a/src/test/java/org/opencord/aaa/StateMachineTest.java
+++ b/app/src/test/java/org/opencord/aaa/impl/StateMachineTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*
*/
-package org.opencord.aaa;
+package org.opencord.aaa.impl;
import org.junit.After;
import org.junit.Before;
diff --git a/pom.xml b/pom.xml
index 9810bee..46f11b7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,23 +29,18 @@
<groupId>org.opencord</groupId>
<artifactId>aaa</artifactId>
<version>1.9.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
-
- <description>ONOS authentication application</description>
+ <packaging>pom</packaging>
<properties>
- <onos.app.name>org.opencord.aaa</onos.app.name>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<onos.version>1.13.9-rc4</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>
- <onos.app.readme>802.1x authentication service.</onos.app.readme>
- <onos.app.requires>
- org.opencord.sadis
- </onos.app.requires>
- <sadis.api.version>3.1.0-SNAPSHOT</sadis.api.version>
</properties>
+ <modules>
+ <module>app</module>
+ <module>api</module>
+ </modules>
+
<dependencies>
<dependency>
<groupId>org.onosproject</groupId>
@@ -54,12 +49,6 @@
</dependency>
<dependency>
- <groupId>org.opencord</groupId>
- <artifactId>sadis-api</artifactId>
- <version>${sadis.api.version}</version>
- </dependency>
-
- <dependency>
<groupId>org.onosproject</groupId>
<artifactId>onos-api</artifactId>
<version>${onos.version}</version>
@@ -92,26 +81,6 @@
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-scr-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.onosproject</groupId>
- <artifactId>onos-maven-plugin</artifactId>
- <version>1.11</version>
- </plugin>
- </plugins>
- </build>
-
<repositories>
<repository>
<id>central</id>