Add skeleton code of LISP driver
Change-Id: I0fcd0c97a6267fbf77ddc9b9b545817e6e6bd684
diff --git a/drivers/lisp/BUCK b/drivers/lisp/BUCK
new file mode 100644
index 0000000..b938b39
--- /dev/null
+++ b/drivers/lisp/BUCK
@@ -0,0 +1,30 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//protocols/lisp/api:onos-protocols-lisp-api',
+]
+
+TEST_DEPS = [
+ '//lib:TEST_ADAPTERS',
+ '//core/api:onos-api-tests',
+]
+
+BUNDLES = [
+ ':onos-drivers-lisp',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+ test_deps = TEST_DEPS,
+ resources_root = 'src/main/resources',
+ resources = glob(['src/main/resources/**']),
+)
+
+onos_app (
+ app_name = 'org.onosproject.drivers.lisp',
+ title = 'LISP Device Drivers',
+ category = 'Drivers',
+ url = 'https://wiki.onosproject.org/display/ONOS/LISP+as+SBI',
+ description = 'ONOS LISP Device Drivers application.',
+ included_bundles = BUNDLES,
+ required_apps = [ 'org.onosproject.lisp' ],
+)
diff --git a/drivers/lisp/features.xml b/drivers/lisp/features.xml
new file mode 100644
index 0000000..1b273b6
--- /dev/null
+++ b/drivers/lisp/features.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<!--
+ ~ Copyright 2017-present Open Networking Laboratory
+ ~
+ ~ 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}/${project.artifactId}/${project.version}</bundle>
+ <bundle>mvn:${project.groupId}/onos-lisp-api/${project.version}</bundle>
+ </feature>
+</features>
diff --git a/drivers/lisp/pom.xml b/drivers/lisp/pom.xml
new file mode 100644
index 0000000..30606b3
--- /dev/null
+++ b/drivers/lisp/pom.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2017-present Open Networking Laboratory
+ ~
+ ~ 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>onos-drivers-general</artifactId>
+ <groupId>org.onosproject</groupId>
+ <version>1.9.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>onos-drivers-lisp</artifactId>
+ <packaging>bundle</packaging>
+
+ <description>LISP device drivers</description>
+
+ <properties>
+ <onos.app.name>org.onosproject.drivers.lisp</onos.app.name>
+ <onos.app.origin>ON.Lab</onos.app.origin>
+ <onos.app.category>Drivers</onos.app.category>
+ <onos.app.title>LISP Device Drivers</onos.app.title>
+ <onos.app.url>https://wiki.onosproject.org/display/ONOS/LISP+as+SBI</onos.app.url>
+ <onos.app.requires>
+ org.onosproject.lisp
+ </onos.app.requires>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-lisp-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
diff --git a/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/LispDriversLoader.java b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/LispDriversLoader.java
new file mode 100644
index 0000000..c0086ac
--- /dev/null
+++ b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/LispDriversLoader.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * 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.drivers.lisp;
+
+import org.apache.felix.scr.annotations.Component;
+import org.onosproject.net.driver.AbstractDriverLoader;
+
+/**
+ * Loader for LISP device drivers.
+ */
+@Component(immediate = true)
+public class LispDriversLoader extends AbstractDriverLoader {
+ public LispDriversLoader() {
+ super("/lisp-drivers.xml");
+ }
+}
diff --git a/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/package-info.java b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/package-info.java
new file mode 100644
index 0000000..fc100ca
--- /dev/null
+++ b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * 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 for LISP device drivers.
+ */
+package org.onosproject.drivers.lisp;
\ No newline at end of file
diff --git a/drivers/lisp/src/main/resources/lisp-drivers.xml b/drivers/lisp/src/main/resources/lisp-drivers.xml
new file mode 100644
index 0000000..3595071
--- /dev/null
+++ b/drivers/lisp/src/main/resources/lisp-drivers.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2017-present Open Networking Laboratory
+ ~
+ ~ 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.
+ -->
+<drivers>
+ <driver name="lisp-sdn" manufacturer="LISP" hwVersion="LISP" swVersion="1.0">
+ </driver>
+</drivers>
+
diff --git a/drivers/pom.xml b/drivers/pom.xml
index d07c1f4..1d57c25 100644
--- a/drivers/pom.xml
+++ b/drivers/pom.xml
@@ -46,6 +46,7 @@
<module>optical</module>
<module>arista</module>
<module>juniper</module>
+ <module>lisp</module>
</modules>
<!--<properties>