ONOS-3758 restructuring driver module with sub-modules for different drivers
Change-Id: I3c65d19be87066448655610abf9d8b89385a4141
diff --git a/drivers/fujitsu/pom.xml b/drivers/fujitsu/pom.xml
new file mode 100644
index 0000000..5ec9f1a
--- /dev/null
+++ b/drivers/fujitsu/pom.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2016 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.5.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <description>Fujitsu device drivers</description>
+
+ <artifactId>onos-drivers-fujitsu</artifactId>
+ <packaging>bundle</packaging>
+
+ <properties>
+ <onos.app.name>org.onosproject.drivers.fujitsu</onos.app.name>
+ </properties>
+
+</project>
\ No newline at end of file
diff --git a/drivers/fujitsu/src/main/java/org/onosproject/drivers/fujitsu/FujitsuDriversLoader.java b/drivers/fujitsu/src/main/java/org/onosproject/drivers/fujitsu/FujitsuDriversLoader.java
new file mode 100644
index 0000000..cb02af5
--- /dev/null
+++ b/drivers/fujitsu/src/main/java/org/onosproject/drivers/fujitsu/FujitsuDriversLoader.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2016 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.fujitsu;
+
+import org.apache.felix.scr.annotations.Component;
+import org.onosproject.net.driver.AbstractDriverLoader;
+
+import java.io.InputStream;
+
+/**
+ * Loader for Fujitsu device drivers from specific xml.
+ */
+@Component(immediate = true)
+public class FujitsuDriversLoader extends AbstractDriverLoader {
+
+ private static final String DRIVERS_XML = "/fujitsu-drivers.xml";
+
+ @Override
+ protected InputStream loadXMLDriversStream() {
+ return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML);
+ }
+
+ @Override
+ protected ClassLoader getClassLoaderInstance() {
+ return getClass().getClassLoader();
+ }
+}
diff --git a/drivers/fujitsu/src/main/java/org/onosproject/drivers/fujitsu/package-info.java b/drivers/fujitsu/src/main/java/org/onosproject/drivers/fujitsu/package-info.java
new file mode 100644
index 0000000..a7ab664
--- /dev/null
+++ b/drivers/fujitsu/src/main/java/org/onosproject/drivers/fujitsu/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2016 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 Ciena device drivers.
+ */
+package org.onosproject.drivers.fujitsu;
\ No newline at end of file
diff --git a/drivers/fujitsu/src/main/resources/onos-drivers.xml b/drivers/fujitsu/src/main/resources/onos-drivers.xml
new file mode 100644
index 0000000..ed74191
--- /dev/null
+++ b/drivers/fujitsu/src/main/resources/onos-drivers.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2016 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>
+ </driver>
+</drivers>
+