ONOS-7399 ODTN OrangeBox ServiceApplication
Change-Id: I068c9c299bfa3dbed1d34df89f7a8b6512cefd96
diff --git a/apps/odtn/BUCK b/apps/odtn/BUCK
new file mode 100644
index 0000000..15eb273
--- /dev/null
+++ b/apps/odtn/BUCK
@@ -0,0 +1,39 @@
+APPS = [
+ 'org.onosproject.yang',
+ 'org.onosproject.config',
+ 'org.onosproject.configsync',
+ 'org.onosproject.models.tapi',
+ 'org.onosproject.models.openconfig',
+
+ # strictly speaking following are not mandatory
+ 'org.onosproject.restconf',
+ 'org.onosproject.drivers.netconf',
+ 'org.onosproject.netconf',
+ 'org.onosproject.configsync-netconf',
+]
+
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:onos-yang-model',
+ '//lib:onos-yang-runtime',
+ '//apps/config:onos-apps-config',
+ '//models/tapi:onos-models-tapi',
+ '//models/openconfig:onos-models-openconfig',
+]
+
+TEST_DEPS = [
+ '//lib:TEST_ADAPTERS',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+ test_deps = TEST_DEPS,
+)
+
+onos_app (
+ title = 'ODTN Service Application',
+ category = 'Traffic Steering',
+ url = 'http://onosproject.org',
+ description = 'ODTN Service Application',
+ required_apps = APPS,
+)
diff --git a/apps/odtn/pom.xml b/apps/odtn/pom.xml
new file mode 100644
index 0000000..8a7dc4e
--- /dev/null
+++ b/apps/odtn/pom.xml
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2018 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">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-apps</artifactId>
+ <version>1.13.0-SNAPSHOT</version>
+ </parent>
+
+
+ <artifactId>onos-apps-odtn</artifactId>
+ <packaging>bundle</packaging>
+
+ <description>ONOS ODTN service application</description>
+ <url>http://onosproject.org</url>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <onos.version>${project.version}</onos.version>
+ <onos.app.name>org.onosproject.odtn</onos.app.name>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-yang-runtime</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-apps-config</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-models-tapi</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-models-openconfig</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onlab-osgi</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-api</artifactId>
+ <scope>test</scope>
+ <classifier>tests</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.scr.annotations</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-scr-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-scr-srcdescriptor</id>
+ <goals>
+ <goal>scr</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <supportedProjectTypes>
+ <supportedProjectType>bundle</supportedProjectType>
+ <supportedProjectType>war</supportedProjectType>
+ </supportedProjectTypes>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>cfg</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>cfg</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>swagger</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>swagger</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>app</id>
+ <phase>package</phase>
+ <goals>
+ <goal>app</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/apps/odtn/src/main/java/org/onosproject/odtn/impl/ServiceApplicationComponent.java b/apps/odtn/src/main/java/org/onosproject/odtn/impl/ServiceApplicationComponent.java
new file mode 100644
index 0000000..1facc0c
--- /dev/null
+++ b/apps/odtn/src/main/java/org/onosproject/odtn/impl/ServiceApplicationComponent.java
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+package org.onosproject.odtn.impl;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.onosproject.config.DynamicConfigService;
+import org.onosproject.net.config.NetworkConfigService;
+import org.onosproject.yang.model.SchemaContextProvider;
+import org.onosproject.yang.runtime.YangRuntimeService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * OSGi Component for ODTN Service application.
+ */
+@Component(immediate = true)
+public class ServiceApplicationComponent {
+
+ private final Logger log = LoggerFactory.getLogger(getClass());
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ protected DynamicConfigService dynConfigService;
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ protected NetworkConfigService netcfgService;
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ protected YangRuntimeService yangRuntime;
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ protected SchemaContextProvider schemaContextProvider;
+
+ @Activate
+ protected void activate() {
+ log.info("Started");
+ }
+
+ @Deactivate
+ protected void deactivate() {
+ log.info("Stopped");
+ }
+
+}
diff --git a/apps/odtn/src/main/java/org/onosproject/odtn/impl/package-info.java b/apps/odtn/src/main/java/org/onosproject/odtn/impl/package-info.java
new file mode 100644
index 0000000..9cb2027
--- /dev/null
+++ b/apps/odtn/src/main/java/org/onosproject/odtn/impl/package-info.java
@@ -0,0 +1,19 @@
+/*
+ * 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.
+ */
+/**
+ * Package to place ODTN implementations.
+ */
+package org.onosproject.odtn.impl;
diff --git a/apps/odtn/src/main/java/org/onosproject/odtn/package-info.java b/apps/odtn/src/main/java/org/onosproject/odtn/package-info.java
new file mode 100644
index 0000000..4171daf
--- /dev/null
+++ b/apps/odtn/src/main/java/org/onosproject/odtn/package-info.java
@@ -0,0 +1,19 @@
+/*
+ * 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.
+ */
+/**
+ * ODTN (Open and Disaggregated Transport Networks).
+ */
+package org.onosproject.odtn;
diff --git a/apps/pom.xml b/apps/pom.xml
index deff2a6..714021f 100644
--- a/apps/pom.xml
+++ b/apps/pom.xml
@@ -100,6 +100,7 @@
<module>cfm</module>
<module>routeradvertisement</module>
<module>simplefabric</module>
+ <module>odtn</module>
</modules>
<properties>
diff --git a/modules.defs b/modules.defs
index fcea956..de29dc8 100644
--- a/modules.defs
+++ b/modules.defs
@@ -234,6 +234,7 @@
'//apps/simplefabric:onos-apps-simplefabric-oar',
'//apps/kafka-integration:onos-apps-kafka-integration-oar',
'//apps/rabbitmq:onos-apps-rabbitmq-oar',
+ '//apps/odtn:onos-apps-odtn-oar',
]
PROTOCOL_APPS = [