From b1ca1ea625f7d0607d6e4840e030941251dadc5b Mon Sep 17 00:00:00 2001 From: Jian Li Date: Mon, 23 Jan 2017 17:43:17 -0800 Subject: [PATCH] Add skeleton code of LISP driver Change-Id: I0fcd0c97a6267fbf77ddc9b9b545817e6e6bd684 --- drivers/lisp/BUCK | 30 +++++++++++ drivers/lisp/features.xml | 25 +++++++++ drivers/lisp/pom.xml | 52 +++++++++++++++++++ .../drivers/lisp/LispDriversLoader.java | 30 +++++++++++ .../drivers/lisp/package-info.java | 20 +++++++ .../lisp/src/main/resources/lisp-drivers.xml | 21 ++++++++ drivers/pom.xml | 1 + modules.defs | 1 + 8 files changed, 180 insertions(+) create mode 100644 drivers/lisp/BUCK create mode 100644 drivers/lisp/features.xml create mode 100644 drivers/lisp/pom.xml create mode 100644 drivers/lisp/src/main/java/org/onosproject/drivers/lisp/LispDriversLoader.java create mode 100644 drivers/lisp/src/main/java/org/onosproject/drivers/lisp/package-info.java create mode 100644 drivers/lisp/src/main/resources/lisp-drivers.xml diff --git a/drivers/lisp/BUCK b/drivers/lisp/BUCK new file mode 100644 index 0000000000..b938b39dca --- /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 0000000000..1b273b6829 --- /dev/null +++ b/drivers/lisp/features.xml @@ -0,0 +1,25 @@ + + + + + + onos-api + mvn:${project.groupId}/${project.artifactId}/${project.version} + mvn:${project.groupId}/onos-lisp-api/${project.version} + + diff --git a/drivers/lisp/pom.xml b/drivers/lisp/pom.xml new file mode 100644 index 0000000000..30606b318d --- /dev/null +++ b/drivers/lisp/pom.xml @@ -0,0 +1,52 @@ + + + + + + onos-drivers-general + org.onosproject + 1.9.0-SNAPSHOT + + 4.0.0 + + onos-drivers-lisp + bundle + + LISP device drivers + + + org.onosproject.drivers.lisp + ON.Lab + Drivers + LISP Device Drivers + https://wiki.onosproject.org/display/ONOS/LISP+as+SBI + + org.onosproject.lisp + + + + + + org.onosproject + onos-lisp-api + ${project.version} + + + + \ 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 0000000000..c0086ac2a5 --- /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 0000000000..fc100ca085 --- /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 0000000000..35950718a2 --- /dev/null +++ b/drivers/lisp/src/main/resources/lisp-drivers.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/drivers/pom.xml b/drivers/pom.xml index d07c1f4cc0..1d57c25156 100644 --- a/drivers/pom.xml +++ b/drivers/pom.xml @@ -46,6 +46,7 @@ optical arista juniper + lisp