ONOS-3758 restructuring driver module with sub-modules for different drivers
Change-Id: I3c65d19be87066448655610abf9d8b89385a4141
diff --git a/drivers/src/main/java/org/onosproject/driver/DefaultDrivers.java b/core/api/src/main/java/org/onosproject/net/driver/AbstractDriverLoader.java
similarity index 68%
rename from drivers/src/main/java/org/onosproject/driver/DefaultDrivers.java
rename to core/api/src/main/java/org/onosproject/net/driver/AbstractDriverLoader.java
index 83adcde..4065c13 100644
--- a/drivers/src/main/java/org/onosproject/driver/DefaultDrivers.java
+++ b/core/api/src/main/java/org/onosproject/net/driver/AbstractDriverLoader.java
@@ -13,18 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.driver;
+package org.onosproject.net.driver;
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.apache.felix.scr.annotations.Service;
-import org.onosproject.net.driver.DefaultDriverProviderService;
-import org.onosproject.net.driver.DriverAdminService;
-import org.onosproject.net.driver.DriverProvider;
-import org.onosproject.net.driver.XmlDriverLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -33,13 +28,12 @@
/**
* Bootstrap for built in drivers.
*/
-@Service
-@Component(immediate = false)
-public class DefaultDrivers implements DefaultDriverProviderService {
+@Component
+public abstract class AbstractDriverLoader {
private final Logger log = LoggerFactory.getLogger(getClass());
- private static final String DRIVERS_XML = "/onos-drivers.xml";
+ //private static final String DRIVERS_XML = "/onos-drivers.xml";
private DriverProvider provider;
@@ -48,11 +42,9 @@
@Activate
protected void activate() {
- ClassLoader classLoader = getClass().getClassLoader();
try {
- InputStream stream = classLoader.getResourceAsStream(DRIVERS_XML);
- provider = new XmlDriverLoader(classLoader)
- .loadDrivers(stream, driverAdminService);
+ provider = new XmlDriverLoader(getClassLoaderInstance())
+ .loadDrivers(loadXMLDriversStream(), driverAdminService);
driverAdminService.registerProvider(provider);
} catch (Exception e) {
log.error("Unable to load default drivers", e);
@@ -66,4 +58,8 @@
log.info("Stopped");
}
+ protected abstract InputStream loadXMLDriversStream();
+
+ protected abstract ClassLoader getClassLoaderInstance();
+
}
diff --git a/core/api/src/main/java/org/onosproject/net/driver/DefaultDriver.java b/core/api/src/main/java/org/onosproject/net/driver/DefaultDriver.java
index f1d1fb4..781faf9 100644
--- a/core/api/src/main/java/org/onosproject/net/driver/DefaultDriver.java
+++ b/core/api/src/main/java/org/onosproject/net/driver/DefaultDriver.java
@@ -101,7 +101,6 @@
public Driver merge(Driver other) {
checkArgument(parents == null || Objects.equals(parent(), other.parent()),
"Parent drivers are not the same");
-
// Merge the behaviours.
Map<Class<? extends Behaviour>, Class<? extends Behaviour>>
behaviours = Maps.newHashMap();
@@ -261,4 +260,23 @@
.toString();
}
+ @Override
+ public boolean equals(Object driverToBeCompared) {
+ if (this == driverToBeCompared) {
+ return true;
+ }
+ if (driverToBeCompared == null || getClass() != driverToBeCompared.getClass()) {
+ return false;
+ }
+
+ DefaultDriver driver = (DefaultDriver) driverToBeCompared;
+
+ return name.equals(driver.name());
+
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(name);
+ }
}
diff --git a/drivers/features.xml b/drivers/ciena/features.xml
similarity index 74%
copy from drivers/features.xml
copy to drivers/ciena/features.xml
index 0c08678..4dbf1a8 100644
--- a/drivers/features.xml
+++ b/drivers/ciena/features.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
- ~ Copyright 2015 Open Networking Laboratory
+ ~ 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.
@@ -19,13 +19,9 @@
description="${project.description}">
<feature>onos-api</feature>
<bundle>mvn:${project.groupId}/${project.artifactId}/${project.version}</bundle>
- <bundle>mvn:${project.groupId}/onos-of-api/${project.version}</bundle>
-
- <bundle>mvn:${project.groupId}/onos-ovsdb-api/${project.version}</bundle>
- <bundle>mvn:${project.groupId}/onos-ovsdb-rfc/${project.version}</bundle>
-
- <bundle>mvn:${project.groupId}/onos-netconf-api/${project.version}</bundle>
<bundle>mvn:${project.groupId}/onos-restsb-api/${project.version}</bundle>
+
+ <bundle>mvn:${project.groupId}/onos-drivers-utilities/${project.version}</bundle>
</feature>
</features>
diff --git a/drivers/ciena/pom.xml b/drivers/ciena/pom.xml
new file mode 100644
index 0000000..b774f84
--- /dev/null
+++ b/drivers/ciena/pom.xml
@@ -0,0 +1,50 @@
+<?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>
+
+ <artifactId>onos-drivers-ciena</artifactId>
+ <packaging>bundle</packaging>
+
+ <description>Ciena device drivers</description>
+
+ <properties>
+ <onos.app.name>org.onosproject.drivers.ciena</onos.app.name>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-drivers-utilities</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-restsb-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
diff --git a/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/CienaDriversLoader.java b/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/CienaDriversLoader.java
new file mode 100644
index 0000000..13a6d93
--- /dev/null
+++ b/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/CienaDriversLoader.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.ciena;
+
+import org.apache.felix.scr.annotations.Component;
+import org.onosproject.net.driver.AbstractDriverLoader;
+
+import java.io.InputStream;
+
+/**
+ * Loader for Ciena device drivers from specific xml.
+ */
+@Component(immediate = true)
+public class CienaDriversLoader extends AbstractDriverLoader {
+
+ private static final String DRIVERS_XML = "/ciena-drivers.xml";
+
+ @Override
+ protected InputStream loadXMLDriversStream() {
+ return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML);
+ }
+
+ @Override
+ protected ClassLoader getClassLoaderInstance() {
+ return getClass().getClassLoader();
+ }
+}
diff --git a/drivers/src/main/java/org/onosproject/driver/rest/PortDiscoveryCienaWaveserverImpl.java b/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/PortDiscoveryCienaWaveserverImpl.java
similarity index 97%
rename from drivers/src/main/java/org/onosproject/driver/rest/PortDiscoveryCienaWaveserverImpl.java
rename to drivers/ciena/src/main/java/org/onosproject/drivers/ciena/PortDiscoveryCienaWaveserverImpl.java
index fa4abfb..affebe5 100644
--- a/drivers/src/main/java/org/onosproject/driver/rest/PortDiscoveryCienaWaveserverImpl.java
+++ b/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/PortDiscoveryCienaWaveserverImpl.java
@@ -16,11 +16,11 @@
*
*/
-package org.onosproject.driver.rest;
+package org.onosproject.drivers.ciena;
import com.google.common.collect.Lists;
import org.apache.commons.configuration.HierarchicalConfiguration;
-import org.onosproject.driver.XmlConfigParser;
+import org.onosproject.drivers.utilities.XmlConfigParser;
import org.onosproject.net.AnnotationKeys;
import org.onosproject.net.CltSignalType;
import org.onosproject.net.DefaultAnnotations;
diff --git a/drivers/src/main/java/org/onosproject/driver/rest/package-info.java b/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/package-info.java
similarity index 87%
copy from drivers/src/main/java/org/onosproject/driver/rest/package-info.java
copy to drivers/ciena/src/main/java/org/onosproject/drivers/ciena/package-info.java
index 1fd813d..e0d97c2 100644
--- a/drivers/src/main/java/org/onosproject/driver/rest/package-info.java
+++ b/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/package-info.java
@@ -15,6 +15,6 @@
*/
/**
- * Implementations of the REST driver behaviours.
+ * Package for Ciena device drivers.
*/
-package org.onosproject.driver.rest;
\ No newline at end of file
+package org.onosproject.drivers.ciena;
\ No newline at end of file
diff --git a/drivers/ciena/src/main/resources/ciena-drivers.xml b/drivers/ciena/src/main/resources/ciena-drivers.xml
new file mode 100644
index 0000000..fa3a0f0
--- /dev/null
+++ b/drivers/ciena/src/main/resources/ciena-drivers.xml
@@ -0,0 +1,23 @@
+<?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 name="restCiena" manufacturer="Ciena" hwVersion="1.0.0" swVersion="1.0.0">
+ <behaviour api="org.onosproject.net.behaviour.PortDiscovery"
+ impl="org.onosproject.drivers.ciena.PortDiscoveryCienaWaveserverImpl"/>
+ </driver>
+</drivers>
+
diff --git a/drivers/features.xml b/drivers/default/features.xml
similarity index 77%
copy from drivers/features.xml
copy to drivers/default/features.xml
index 0c08678..1dc6b2a 100644
--- a/drivers/features.xml
+++ b/drivers/default/features.xml
@@ -19,13 +19,8 @@
description="${project.description}">
<feature>onos-api</feature>
<bundle>mvn:${project.groupId}/${project.artifactId}/${project.version}</bundle>
+
<bundle>mvn:${project.groupId}/onos-of-api/${project.version}</bundle>
- <bundle>mvn:${project.groupId}/onos-ovsdb-api/${project.version}</bundle>
- <bundle>mvn:${project.groupId}/onos-ovsdb-rfc/${project.version}</bundle>
-
- <bundle>mvn:${project.groupId}/onos-netconf-api/${project.version}</bundle>
-
- <bundle>mvn:${project.groupId}/onos-restsb-api/${project.version}</bundle>
</feature>
</features>
diff --git a/drivers/default/pom.xml b/drivers/default/pom.xml
new file mode 100644
index 0000000..c77688a
--- /dev/null
+++ b/drivers/default/pom.xml
@@ -0,0 +1,42 @@
+<?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>Default device drivers</description>
+ <!--should be onos-drivers-default for clarity but left as onos-drivers for compatibility-->
+ <artifactId>onos-drivers</artifactId>
+ <packaging>bundle</packaging>
+
+ <properties>
+ <onos.app.name>org.onosproject.drivers</onos.app.name>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-of-api</artifactId>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
diff --git a/drivers/default/src/main/java/org/onosproject/driver/DefaultDriversLoader.java b/drivers/default/src/main/java/org/onosproject/driver/DefaultDriversLoader.java
new file mode 100644
index 0000000..ad7d4a8
--- /dev/null
+++ b/drivers/default/src/main/java/org/onosproject/driver/DefaultDriversLoader.java
@@ -0,0 +1,44 @@
+/*
+ * 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.driver;
+
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;
+import org.onosproject.net.driver.AbstractDriverLoader;
+import org.onosproject.net.driver.DefaultDriverProviderService;
+
+import java.io.InputStream;
+
+/**
+ * Loader for default device drivers from specific xml.
+ */
+@Service
+@Component(immediate = true)
+public class DefaultDriversLoader extends AbstractDriverLoader implements DefaultDriverProviderService {
+
+ private static final String DRIVERS_XML = "/onos-drivers.xml";
+
+ @Override
+ protected InputStream loadXMLDriversStream() {
+ return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML);
+ }
+
+ @Override
+ protected ClassLoader getClassLoaderInstance() {
+ return getClass().getClassLoader();
+ }
+}
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/DefaultMoveExtensionTreatment.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/DefaultMoveExtensionTreatment.java
similarity index 99%
rename from drivers/src/main/java/org/onosproject/driver/extensions/DefaultMoveExtensionTreatment.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/DefaultMoveExtensionTreatment.java
index 140a816..b86b771 100644
--- a/drivers/src/main/java/org/onosproject/driver/extensions/DefaultMoveExtensionTreatment.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/extensions/DefaultMoveExtensionTreatment.java
@@ -15,15 +15,14 @@
*/
package org.onosproject.driver.extensions;
-import java.util.Map;
-import java.util.Objects;
-
+import com.google.common.base.MoreObjects;
+import com.google.common.collect.Maps;
import org.onlab.util.KryoNamespace;
import org.onosproject.net.flow.AbstractExtension;
import org.onosproject.net.flow.instructions.ExtensionTreatmentType;
-import com.google.common.base.MoreObjects;
-import com.google.common.collect.Maps;
+import java.util.Map;
+import java.util.Objects;
/**
* Default implementation of Move treatment.
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/MoveExtensionTreatment.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/MoveExtensionTreatment.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/extensions/MoveExtensionTreatment.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/MoveExtensionTreatment.java
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraExtensionSelectorInterpreter.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraExtensionSelectorInterpreter.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/extensions/NiciraExtensionSelectorInterpreter.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraExtensionSelectorInterpreter.java
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraExtensionTreatmentInterpreter.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraExtensionTreatmentInterpreter.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/extensions/NiciraExtensionTreatmentInterpreter.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraExtensionTreatmentInterpreter.java
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraMatchNshContextHeader.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraMatchNshContextHeader.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/extensions/NiciraMatchNshContextHeader.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraMatchNshContextHeader.java
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraMatchNshSi.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraMatchNshSi.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/extensions/NiciraMatchNshSi.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraMatchNshSi.java
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraMatchNshSpi.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraMatchNshSpi.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/extensions/NiciraMatchNshSpi.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraMatchNshSpi.java
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraMoveTreatmentFactory.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraMoveTreatmentFactory.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/extensions/NiciraMoveTreatmentFactory.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraMoveTreatmentFactory.java
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraResubmit.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraResubmit.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/extensions/NiciraResubmit.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraResubmit.java
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraResubmitTable.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraResubmitTable.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/extensions/NiciraResubmitTable.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraResubmitTable.java
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraSetNshContextHeader.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraSetNshContextHeader.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/extensions/NiciraSetNshContextHeader.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraSetNshContextHeader.java
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraSetNshSi.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraSetNshSi.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/extensions/NiciraSetNshSi.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraSetNshSi.java
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraSetNshSpi.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraSetNshSpi.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/extensions/NiciraSetNshSpi.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraSetNshSpi.java
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraSetTunnelDst.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraSetTunnelDst.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/extensions/NiciraSetTunnelDst.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraSetTunnelDst.java
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/package-info.java b/drivers/default/src/main/java/org/onosproject/driver/extensions/package-info.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/extensions/package-info.java
rename to drivers/default/src/main/java/org/onosproject/driver/extensions/package-info.java
diff --git a/drivers/src/main/java/org/onosproject/driver/handshaker/CalientFiberSwitchHandshaker.java b/drivers/default/src/main/java/org/onosproject/driver/handshaker/CalientFiberSwitchHandshaker.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/handshaker/CalientFiberSwitchHandshaker.java
rename to drivers/default/src/main/java/org/onosproject/driver/handshaker/CalientFiberSwitchHandshaker.java
diff --git a/drivers/src/main/java/org/onosproject/driver/handshaker/CorsaSwitchHandshaker.java b/drivers/default/src/main/java/org/onosproject/driver/handshaker/CorsaSwitchHandshaker.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/handshaker/CorsaSwitchHandshaker.java
rename to drivers/default/src/main/java/org/onosproject/driver/handshaker/CorsaSwitchHandshaker.java
diff --git a/drivers/src/main/java/org/onosproject/driver/handshaker/DefaultSwitchHandshaker.java b/drivers/default/src/main/java/org/onosproject/driver/handshaker/DefaultSwitchHandshaker.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/handshaker/DefaultSwitchHandshaker.java
rename to drivers/default/src/main/java/org/onosproject/driver/handshaker/DefaultSwitchHandshaker.java
diff --git a/drivers/src/main/java/org/onosproject/driver/handshaker/NiciraSwitchHandshaker.java b/drivers/default/src/main/java/org/onosproject/driver/handshaker/NiciraSwitchHandshaker.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/handshaker/NiciraSwitchHandshaker.java
rename to drivers/default/src/main/java/org/onosproject/driver/handshaker/NiciraSwitchHandshaker.java
diff --git a/drivers/src/main/java/org/onosproject/driver/handshaker/OFOpticalSwitch13.java b/drivers/default/src/main/java/org/onosproject/driver/handshaker/OFOpticalSwitch13.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/handshaker/OFOpticalSwitch13.java
rename to drivers/default/src/main/java/org/onosproject/driver/handshaker/OFOpticalSwitch13.java
diff --git a/drivers/src/main/java/org/onosproject/driver/handshaker/OfOpticalSwitchImplLinc13.java b/drivers/default/src/main/java/org/onosproject/driver/handshaker/OfOpticalSwitchImplLinc13.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/handshaker/OfOpticalSwitchImplLinc13.java
rename to drivers/default/src/main/java/org/onosproject/driver/handshaker/OfOpticalSwitchImplLinc13.java
diff --git a/drivers/src/main/java/org/onosproject/driver/handshaker/OplinkRoadmHandshaker.java b/drivers/default/src/main/java/org/onosproject/driver/handshaker/OplinkRoadmHandshaker.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/handshaker/OplinkRoadmHandshaker.java
rename to drivers/default/src/main/java/org/onosproject/driver/handshaker/OplinkRoadmHandshaker.java
diff --git a/drivers/src/main/java/org/onosproject/driver/handshaker/package-info.java b/drivers/default/src/main/java/org/onosproject/driver/handshaker/package-info.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/handshaker/package-info.java
rename to drivers/default/src/main/java/org/onosproject/driver/handshaker/package-info.java
diff --git a/drivers/src/main/java/org/onosproject/driver/package-info.java b/drivers/default/src/main/java/org/onosproject/driver/package-info.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/package-info.java
rename to drivers/default/src/main/java/org/onosproject/driver/package-info.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/CentecV350Pipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/CentecV350Pipeline.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/CentecV350Pipeline.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/CentecV350Pipeline.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/CorsaPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/CorsaPipeline.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/CorsaPipeline.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/CorsaPipeline.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/CorsaPipelineV3.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/CorsaPipelineV3.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/CorsaPipelineV3.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/CorsaPipelineV3.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/CpqdOFDPA2Pipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/CpqdOFDPA2Pipeline.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/CpqdOFDPA2Pipeline.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/CpqdOFDPA2Pipeline.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/OFDPA2GroupHandler.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/OFDPA2GroupHandler.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/OFDPA2GroupHandler.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/OFDPA2GroupHandler.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/OFDPA2Pipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/OFDPA2Pipeline.java
similarity index 99%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/OFDPA2Pipeline.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/OFDPA2Pipeline.java
index e4b7ef5..1cfb937 100644
--- a/drivers/src/main/java/org/onosproject/driver/pipeline/OFDPA2Pipeline.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/OFDPA2Pipeline.java
@@ -34,7 +34,6 @@
import org.onlab.util.KryoNamespace;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.CoreService;
-import org.onosproject.driver.pipeline.OFDPA2GroupHandler.OfdpaNextGroup;
import org.onosproject.net.DeviceId;
import org.onosproject.net.Port;
import org.onosproject.net.PortNumber;
@@ -113,7 +112,7 @@
.register(KryoNamespaces.API)
.register(GroupKey.class)
.register(DefaultGroupKey.class)
- .register(OfdpaNextGroup.class)
+ .register(OFDPA2GroupHandler.OfdpaNextGroup.class)
.register(byte[].class)
.register(ArrayDeque.class)
.build();
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/OVSCorsaPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/OVSCorsaPipeline.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/OVSCorsaPipeline.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/OVSCorsaPipeline.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/OltPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/OltPipeline.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/OltPipeline.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/OltPipeline.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/OpenVSwitchPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/OpenVSwitchPipeline.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/OpenVSwitchPipeline.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/OpenVSwitchPipeline.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/OpenstackPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/OpenstackPipeline.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/OpenstackPipeline.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/OpenstackPipeline.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/PicaPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/PicaPipeline.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/PicaPipeline.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/PicaPipeline.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/SoftRouterPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SoftRouterPipeline.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/SoftRouterPipeline.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/SoftRouterPipeline.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTPDell.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTPDell.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTPDell.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTPDell.java
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/package-info.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/package-info.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/pipeline/package-info.java
rename to drivers/default/src/main/java/org/onosproject/driver/pipeline/package-info.java
diff --git a/drivers/src/main/java/org/onosproject/driver/query/CalientLambdaQuery.java b/drivers/default/src/main/java/org/onosproject/driver/query/CalientLambdaQuery.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/query/CalientLambdaQuery.java
rename to drivers/default/src/main/java/org/onosproject/driver/query/CalientLambdaQuery.java
diff --git a/drivers/src/main/java/org/onosproject/driver/query/DefaultTributarySlotQuery.java b/drivers/default/src/main/java/org/onosproject/driver/query/DefaultTributarySlotQuery.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/query/DefaultTributarySlotQuery.java
rename to drivers/default/src/main/java/org/onosproject/driver/query/DefaultTributarySlotQuery.java
diff --git a/drivers/src/main/java/org/onosproject/driver/query/FullMplsAvailable.java b/drivers/default/src/main/java/org/onosproject/driver/query/FullMplsAvailable.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/query/FullMplsAvailable.java
rename to drivers/default/src/main/java/org/onosproject/driver/query/FullMplsAvailable.java
diff --git a/drivers/src/main/java/org/onosproject/driver/query/FullVlanAvailable.java b/drivers/default/src/main/java/org/onosproject/driver/query/FullVlanAvailable.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/query/FullVlanAvailable.java
rename to drivers/default/src/main/java/org/onosproject/driver/query/FullVlanAvailable.java
diff --git a/drivers/src/main/java/org/onosproject/driver/query/LincOELambdaQuery.java b/drivers/default/src/main/java/org/onosproject/driver/query/LincOELambdaQuery.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/query/LincOELambdaQuery.java
rename to drivers/default/src/main/java/org/onosproject/driver/query/LincOELambdaQuery.java
diff --git a/drivers/src/main/java/org/onosproject/driver/query/OFOpticalSwitch13LambdaQuery.java b/drivers/default/src/main/java/org/onosproject/driver/query/OFOpticalSwitch13LambdaQuery.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/query/OFOpticalSwitch13LambdaQuery.java
rename to drivers/default/src/main/java/org/onosproject/driver/query/OFOpticalSwitch13LambdaQuery.java
diff --git a/drivers/src/main/java/org/onosproject/driver/query/package-info.java b/drivers/default/src/main/java/org/onosproject/driver/query/package-info.java
similarity index 100%
rename from drivers/src/main/java/org/onosproject/driver/query/package-info.java
rename to drivers/default/src/main/java/org/onosproject/driver/query/package-info.java
diff --git a/drivers/src/main/resources/onos-drivers.xml b/drivers/default/src/main/resources/onos-drivers.xml
similarity index 86%
rename from drivers/src/main/resources/onos-drivers.xml
rename to drivers/default/src/main/resources/onos-drivers.xml
index fbc9662..eb6075d 100644
--- a/drivers/src/main/resources/onos-drivers.xml
+++ b/drivers/default/src/main/resources/onos-drivers.xml
@@ -21,17 +21,11 @@
impl="org.onosproject.driver.pipeline.DefaultSingleTablePipeline"/>
<behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
impl="org.onosproject.driver.handshaker.DefaultSwitchHandshaker"/>
- <behaviour api="org.onosproject.net.behaviour.TunnelConfig"
- impl="org.onosproject.driver.ovsdb.OvsdbTunnelConfig"/>
- <behaviour api="org.onosproject.net.behaviour.BridgeConfig"
- impl="org.onosproject.driver.ovsdb.OvsdbBridgeConfig"/>
</driver>
<driver name="ovs" extends="default"
manufacturer="Nicira, Inc\." hwVersion="Open vSwitch" swVersion="2\..*">
<behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
impl="org.onosproject.driver.handshaker.NiciraSwitchHandshaker"/>
- <behaviour api="org.onosproject.net.behaviour.ControllerConfig"
- impl="org.onosproject.driver.ovsdb.OvsdbControllerConfig"/>
<behaviour api="org.onosproject.openflow.controller.ExtensionTreatmentInterpreter"
impl="org.onosproject.driver.extensions.NiciraExtensionTreatmentInterpreter" />
<behaviour api="org.onosproject.net.behaviour.ExtensionTreatmentResolver"
@@ -45,20 +39,6 @@
<behaviour api="org.onosproject.net.behaviour.MplsQuery"
impl="org.onosproject.driver.query.FullMplsAvailable" />
</driver>
- <!--This driver is for simulated NETCONF devices through of-config tool on top og OVSDB-->
- <driver name="ovs-netconf" extends="default,ovs"
- manufacturer="" hwVersion="" swVersion="">
- <behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
- impl="org.onosproject.driver.handshaker.NiciraSwitchHandshaker"/>
- <behaviour api="org.onosproject.net.behaviour.ControllerConfig"
- impl="org.onosproject.driver.netconf.NetconfControllerConfig"/>
- <behaviour api="org.onosproject.net.behaviour.ConfigGetter"
- impl="org.onosproject.driver.netconf.NetconfConfigGetter"/>
- </driver>
- <driver name="netconf" extends="default">
- <behaviour api="org.onosproject.net.behaviour.ConfigGetter"
- impl="org.onosproject.driver.netconf.NetconfConfigGetter"/>
- </driver>
<driver name="ovs-corsa" extends="ovs"
manufacturer="Corsa" hwVersion="emulation" swVersion="0.0.0">
<behaviour api="org.onosproject.net.behaviour.Pipeliner"
@@ -128,10 +108,6 @@
<behaviour api="org.onosproject.net.behaviour.Pipeliner"
impl="org.onosproject.driver.pipeline.OltPipeline"/>
</driver>
- <driver name="restCiena" manufacturer="Ciena" hwVersion="1.0.0" swVersion="1.0.0">
- <behaviour api="org.onosproject.net.behaviour.PortDiscovery"
- impl="org.onosproject.driver.rest.PortDiscoveryCienaWaveserverImpl"/>
- </driver>
<!-- The SoftRouter driver is meant to be used by any software/NPU based
~ switch that wishes to implement a simple 2-table router. To use this
~ driver, configure ONOS with the dpid of the device, or extend the
diff --git a/drivers/src/test/java/org/onosproject/driver/extensions/NiciraSetNshContextHeaderTest.java b/drivers/default/src/test/java/org/onosproject/driver/extensions/NiciraSetNshContextHeaderTest.java
similarity index 100%
rename from drivers/src/test/java/org/onosproject/driver/extensions/NiciraSetNshContextHeaderTest.java
rename to drivers/default/src/test/java/org/onosproject/driver/extensions/NiciraSetNshContextHeaderTest.java
diff --git a/drivers/src/test/java/org/onosproject/driver/extensions/NiciraSetNshSiTest.java b/drivers/default/src/test/java/org/onosproject/driver/extensions/NiciraSetNshSiTest.java
similarity index 100%
rename from drivers/src/test/java/org/onosproject/driver/extensions/NiciraSetNshSiTest.java
rename to drivers/default/src/test/java/org/onosproject/driver/extensions/NiciraSetNshSiTest.java
diff --git a/drivers/src/test/java/org/onosproject/driver/extensions/NiciraSetNshSpiTest.java b/drivers/default/src/test/java/org/onosproject/driver/extensions/NiciraSetNshSpiTest.java
similarity index 100%
rename from drivers/src/test/java/org/onosproject/driver/extensions/NiciraSetNshSpiTest.java
rename to drivers/default/src/test/java/org/onosproject/driver/extensions/NiciraSetNshSpiTest.java
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/src/main/java/org/onosproject/driver/rest/package-info.java b/drivers/fujitsu/src/main/java/org/onosproject/drivers/fujitsu/package-info.java
similarity index 87%
copy from drivers/src/main/java/org/onosproject/driver/rest/package-info.java
copy to drivers/fujitsu/src/main/java/org/onosproject/drivers/fujitsu/package-info.java
index 1fd813d..a7ab664 100644
--- a/drivers/src/main/java/org/onosproject/driver/rest/package-info.java
+++ b/drivers/fujitsu/src/main/java/org/onosproject/drivers/fujitsu/package-info.java
@@ -15,6 +15,6 @@
*/
/**
- * Implementations of the REST driver behaviours.
+ * Package for Ciena device drivers.
*/
-package org.onosproject.driver.rest;
\ No newline at end of file
+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>
+
diff --git a/drivers/features.xml b/drivers/netconf/features.xml
similarity index 74%
copy from drivers/features.xml
copy to drivers/netconf/features.xml
index 0c08678..ed1f431 100644
--- a/drivers/features.xml
+++ b/drivers/netconf/features.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
<!--
- ~ Copyright 2015 Open Networking Laboratory
+ ~ 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.
@@ -19,13 +20,9 @@
description="${project.description}">
<feature>onos-api</feature>
<bundle>mvn:${project.groupId}/${project.artifactId}/${project.version}</bundle>
- <bundle>mvn:${project.groupId}/onos-of-api/${project.version}</bundle>
- <bundle>mvn:${project.groupId}/onos-ovsdb-api/${project.version}</bundle>
- <bundle>mvn:${project.groupId}/onos-ovsdb-rfc/${project.version}</bundle>
+ <bundle>mvn:${project.groupId}/onos-drivers-utilities/${project.version}</bundle>
<bundle>mvn:${project.groupId}/onos-netconf-api/${project.version}</bundle>
-
- <bundle>mvn:${project.groupId}/onos-restsb-api/${project.version}</bundle>
</feature>
</features>
diff --git a/drivers/netconf/pom.xml b/drivers/netconf/pom.xml
new file mode 100644
index 0000000..0235eaa
--- /dev/null
+++ b/drivers/netconf/pom.xml
@@ -0,0 +1,50 @@
+<?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>
+
+ <artifactId>onos-drivers-netconf</artifactId>
+ <packaging>bundle</packaging>
+
+ <description>Netconf device drivers</description>
+
+ <properties>
+ <onos.app.name>org.onosproject.drivers.netconf</onos.app.name>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-netconf-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-drivers-utilities</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
diff --git a/drivers/src/main/java/org/onosproject/driver/netconf/NetconfConfigGetter.java b/drivers/netconf/src/main/java/org/onosproject/drivers/netconf/NetconfConfigGetter.java
similarity index 97%
rename from drivers/src/main/java/org/onosproject/driver/netconf/NetconfConfigGetter.java
rename to drivers/netconf/src/main/java/org/onosproject/drivers/netconf/NetconfConfigGetter.java
index f15b58c..4f42a96 100644
--- a/drivers/src/main/java/org/onosproject/driver/netconf/NetconfConfigGetter.java
+++ b/drivers/netconf/src/main/java/org/onosproject/drivers/netconf/NetconfConfigGetter.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.driver.netconf;
+package org.onosproject.drivers.netconf;
import com.google.common.base.Preconditions;
import org.onosproject.net.DeviceId;
@@ -31,7 +31,6 @@
/**
* Gets the configuration of the specified type from the specified device. If a
* failure occurs it returns the error string found in UNABLE_TO_READ_CONFIG.
- *
* This is a temporary development tool for use until yang integration is complete.
* This is not a properly specified behavior implementation. DO NOT USE AS AN EXAMPLE.
*/
diff --git a/drivers/src/main/java/org/onosproject/driver/netconf/NetconfControllerConfig.java b/drivers/netconf/src/main/java/org/onosproject/drivers/netconf/NetconfControllerConfig.java
similarity index 97%
rename from drivers/src/main/java/org/onosproject/driver/netconf/NetconfControllerConfig.java
rename to drivers/netconf/src/main/java/org/onosproject/drivers/netconf/NetconfControllerConfig.java
index 4b81069..85a0dd8 100644
--- a/drivers/src/main/java/org/onosproject/driver/netconf/NetconfControllerConfig.java
+++ b/drivers/netconf/src/main/java/org/onosproject/drivers/netconf/NetconfControllerConfig.java
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-package org.onosproject.driver.netconf;
+package org.onosproject.drivers.netconf;
import com.google.common.base.Preconditions;
-import org.onosproject.driver.XmlConfigParser;
+import org.onosproject.drivers.utilities.XmlConfigParser;
import org.onosproject.net.DeviceId;
import org.onosproject.net.behaviour.ControllerConfig;
import org.onosproject.net.behaviour.ControllerInfo;
diff --git a/drivers/netconf/src/main/java/org/onosproject/drivers/netconf/NetconfDriversLoader.java b/drivers/netconf/src/main/java/org/onosproject/drivers/netconf/NetconfDriversLoader.java
new file mode 100644
index 0000000..30c8758
--- /dev/null
+++ b/drivers/netconf/src/main/java/org/onosproject/drivers/netconf/NetconfDriversLoader.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.netconf;
+
+import org.apache.felix.scr.annotations.Component;
+import org.onosproject.net.driver.AbstractDriverLoader;
+
+import java.io.InputStream;
+
+/**
+ * Loader for NETCONF device drivers from specific xml.
+ */
+@Component(immediate = true)
+public class NetconfDriversLoader extends AbstractDriverLoader {
+
+ private static final String DRIVERS_XML = "/netconf-drivers.xml";
+
+ @Override
+ protected InputStream loadXMLDriversStream() {
+ return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML);
+ }
+
+ @Override
+ protected ClassLoader getClassLoaderInstance() {
+ return getClass().getClassLoader();
+ }
+}
diff --git a/drivers/src/main/java/org/onosproject/driver/rest/package-info.java b/drivers/netconf/src/main/java/org/onosproject/drivers/netconf/package-info.java
similarity index 87%
rename from drivers/src/main/java/org/onosproject/driver/rest/package-info.java
rename to drivers/netconf/src/main/java/org/onosproject/drivers/netconf/package-info.java
index 1fd813d..1ff58b5 100644
--- a/drivers/src/main/java/org/onosproject/driver/rest/package-info.java
+++ b/drivers/netconf/src/main/java/org/onosproject/drivers/netconf/package-info.java
@@ -15,6 +15,6 @@
*/
/**
- * Implementations of the REST driver behaviours.
+ * Package for NETCONF device drivers.
*/
-package org.onosproject.driver.rest;
\ No newline at end of file
+package org.onosproject.drivers.netconf;
\ No newline at end of file
diff --git a/drivers/netconf/src/main/resources/netconf-drivers.xml b/drivers/netconf/src/main/resources/netconf-drivers.xml
new file mode 100644
index 0000000..dc54612
--- /dev/null
+++ b/drivers/netconf/src/main/resources/netconf-drivers.xml
@@ -0,0 +1,31 @@
+<?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>
+ <!--This driver is for simulated NETCONF devices through of-config tool on top og OVSDB-->
+ <driver name="ovs-netconf" extends="default,ovs"
+ manufacturer="" hwVersion="" swVersion="">
+ <behaviour api="org.onosproject.net.behaviour.ControllerConfig"
+ impl="org.onosproject.drivers.netconf.NetconfControllerConfig"/>
+ <behaviour api="org.onosproject.net.behaviour.ConfigGetter"
+ impl="org.onosproject.drivers.netconf.NetconfConfigGetter"/>
+ </driver>
+ <driver name="netconf" extends="default">
+ <behaviour api="org.onosproject.net.behaviour.ConfigGetter"
+ impl="org.onosproject.drivers.netconf.NetconfConfigGetter"/>
+ </driver>
+</drivers>
+
diff --git a/drivers/src/main/resources/org/onosproject/driver/controllers.xml b/drivers/netconf/src/main/resources/org/onosproject/drivers/netconf/controllers.xml
similarity index 100%
copy from drivers/src/main/resources/org/onosproject/driver/controllers.xml
copy to drivers/netconf/src/main/resources/org/onosproject/drivers/netconf/controllers.xml
diff --git a/drivers/features.xml b/drivers/ovsdb/features.xml
similarity index 80%
rename from drivers/features.xml
rename to drivers/ovsdb/features.xml
index 0c08678..981a24d 100644
--- a/drivers/features.xml
+++ b/drivers/ovsdb/features.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
<!--
- ~ Copyright 2015 Open Networking Laboratory
+ ~ 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.
@@ -14,18 +15,14 @@
~ 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-of-api/${project.version}</bundle>
<bundle>mvn:${project.groupId}/onos-ovsdb-api/${project.version}</bundle>
<bundle>mvn:${project.groupId}/onos-ovsdb-rfc/${project.version}</bundle>
-
- <bundle>mvn:${project.groupId}/onos-netconf-api/${project.version}</bundle>
-
- <bundle>mvn:${project.groupId}/onos-restsb-api/${project.version}</bundle>
</feature>
</features>
diff --git a/drivers/ovsdb/pom.xml b/drivers/ovsdb/pom.xml
new file mode 100644
index 0000000..fcff99d
--- /dev/null
+++ b/drivers/ovsdb/pom.xml
@@ -0,0 +1,51 @@
+<?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>
+
+ <artifactId>onos-drivers-ovsdb</artifactId>
+ <packaging>bundle</packaging>
+
+ <description>ovsdb device drivers</description>
+
+ <properties>
+ <onos.app.name>org.onosproject.drivers.ovsdb</onos.app.name>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-ovsdb-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-ovsdb-api</artifactId>
+ <version>${project.version}</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
diff --git a/drivers/src/main/java/org/onosproject/driver/ovsdb/OvsdbBridgeConfig.java b/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbBridgeConfig.java
similarity index 98%
rename from drivers/src/main/java/org/onosproject/driver/ovsdb/OvsdbBridgeConfig.java
rename to drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbBridgeConfig.java
index 9a2a1a8..e692eeb 100644
--- a/drivers/src/main/java/org/onosproject/driver/ovsdb/OvsdbBridgeConfig.java
+++ b/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbBridgeConfig.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Open Networking Laboratory
+ * 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.
@@ -13,13 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.driver.ovsdb;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
+package org.onosproject.drivers.ovsdb;
import org.onlab.packet.IpAddress;
import org.onosproject.net.DefaultAnnotations;
@@ -40,6 +35,12 @@
import org.onosproject.ovsdb.controller.OvsdbNodeId;
import org.onosproject.ovsdb.controller.OvsdbPort;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
/**
* The implementation of BridageConfig.
*/
diff --git a/drivers/src/main/java/org/onosproject/driver/ovsdb/OvsdbControllerConfig.java b/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbControllerConfig.java
similarity index 97%
rename from drivers/src/main/java/org/onosproject/driver/ovsdb/OvsdbControllerConfig.java
rename to drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbControllerConfig.java
index f116ab8..b04d566 100644
--- a/drivers/src/main/java/org/onosproject/driver/ovsdb/OvsdbControllerConfig.java
+++ b/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbControllerConfig.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Open Networking Laboratory
+ * 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.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.driver.ovsdb;
+package org.onosproject.drivers.ovsdb;
import com.google.common.collect.ImmutableSet;
import org.onlab.packet.IpAddress;
diff --git a/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbDriversLoader.java b/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbDriversLoader.java
new file mode 100644
index 0000000..d3b127a
--- /dev/null
+++ b/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbDriversLoader.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.ovsdb;
+
+import org.apache.felix.scr.annotations.Component;
+import org.onosproject.net.driver.AbstractDriverLoader;
+
+import java.io.InputStream;
+
+/**
+ * Loader for OVSDB device drivers from specific xml.
+ */
+@Component(immediate = true)
+public class OvsdbDriversLoader extends AbstractDriverLoader {
+
+ private static final String DRIVERS_XML = "/ovsdb-drivers.xml";
+
+ @Override
+ protected InputStream loadXMLDriversStream() {
+ return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML);
+ }
+
+ @Override
+ protected ClassLoader getClassLoaderInstance() {
+ return getClass().getClassLoader();
+ }
+}
diff --git a/drivers/src/main/java/org/onosproject/driver/ovsdb/OvsdbTunnelConfig.java b/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbTunnelConfig.java
similarity index 98%
rename from drivers/src/main/java/org/onosproject/driver/ovsdb/OvsdbTunnelConfig.java
rename to drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbTunnelConfig.java
index ad90ca4..455c3ab 100644
--- a/drivers/src/main/java/org/onosproject/driver/ovsdb/OvsdbTunnelConfig.java
+++ b/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbTunnelConfig.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Open Networking Laboratory
+ * 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.
@@ -13,12 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.driver.ovsdb;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-import java.util.stream.Collectors;
+package org.onosproject.drivers.ovsdb;
import org.onlab.packet.IpAddress;
import org.onosproject.net.DefaultAnnotations;
@@ -36,6 +32,11 @@
import org.onosproject.ovsdb.controller.OvsdbNodeId;
import org.onosproject.ovsdb.controller.OvsdbTunnel;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
/**
* OVSDB-based implementation of tunnel config behaviour.
*/
diff --git a/drivers/src/main/java/org/onosproject/driver/rest/package-info.java b/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/package-info.java
similarity index 87%
copy from drivers/src/main/java/org/onosproject/driver/rest/package-info.java
copy to drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/package-info.java
index 1fd813d..8d81f54 100644
--- a/drivers/src/main/java/org/onosproject/driver/rest/package-info.java
+++ b/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/package-info.java
@@ -15,6 +15,6 @@
*/
/**
- * Implementations of the REST driver behaviours.
+ * Package for OVSDB device drivers.
*/
-package org.onosproject.driver.rest;
\ No newline at end of file
+package org.onosproject.drivers.ovsdb;
\ No newline at end of file
diff --git a/drivers/ovsdb/src/main/resources/ovsdb-drivers.xml b/drivers/ovsdb/src/main/resources/ovsdb-drivers.xml
new file mode 100644
index 0000000..a32c614
--- /dev/null
+++ b/drivers/ovsdb/src/main/resources/ovsdb-drivers.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2015 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="default"
+ manufacturer="ON.Lab" hwVersion="0.0.1" swVersion="0.0.1">
+ <behaviour api="org.onosproject.net.behaviour.TunnelConfig"
+ impl="org.onosproject.drivers.ovsdb.OvsdbTunnelConfig"/>
+ <behaviour api="org.onosproject.net.behaviour.BridgeConfig"
+ impl="org.onosproject.drivers.ovsdb.OvsdbBridgeConfig"/>
+ </driver>
+ <driver name="ovs" extends="default"
+ manufacturer="Nicira, Inc\." hwVersion="Open vSwitch" swVersion="2\..*">
+ <behaviour api="org.onosproject.net.behaviour.ControllerConfig"
+ impl="org.onosproject.drivers.ovsdb.OvsdbControllerConfig"/>
+ </driver>
+</drivers>
+
diff --git a/drivers/src/test/java/org/onosproject/driver/ovsdb/OvsdbControllerConfigTest.java b/drivers/ovsdb/src/test/java/org/onosproject/drivers/ovsdb/OvsdbControllerConfigTest.java
similarity index 98%
rename from drivers/src/test/java/org/onosproject/driver/ovsdb/OvsdbControllerConfigTest.java
rename to drivers/ovsdb/src/test/java/org/onosproject/drivers/ovsdb/OvsdbControllerConfigTest.java
index 74aae4c..c943a41 100644
--- a/drivers/src/test/java/org/onosproject/driver/ovsdb/OvsdbControllerConfigTest.java
+++ b/drivers/ovsdb/src/test/java/org/onosproject/drivers/ovsdb/OvsdbControllerConfigTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.driver.ovsdb;
+package org.onosproject.drivers.ovsdb;
import com.google.common.collect.ImmutableMap;
import org.junit.Before;
diff --git a/drivers/pom.xml b/drivers/pom.xml
index c09b657..03514ff 100644
--- a/drivers/pom.xml
+++ b/drivers/pom.xml
@@ -19,7 +19,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.onosproject</groupId>
<artifactId>onos</artifactId>
@@ -27,14 +26,23 @@
<relativePath>../pom.xml</relativePath>
</parent>
- <artifactId>onos-drivers</artifactId>
- <packaging>bundle</packaging>
+ <artifactId>onos-drivers-general</artifactId>
+ <packaging>pom</packaging>
- <description>Builtin device drivers</description>
+ <description>Builtin device drivers general module</description>
- <properties>
+ <modules>
+ <module>default</module>
+ <module>ciena</module>
+ <module>fujitsu</module>
+ <module>netconf</module>
+ <module>ovsdb</module>
+ <module>utilities</module>
+ </modules>
+
+ <!--<properties>
<onos.app.name>org.onosproject.drivers</onos.app.name>
- </properties>
+ </properties>-->
<dependencies>
<dependency>
@@ -49,36 +57,15 @@
<dependency>
<groupId>org.onosproject</groupId>
- <artifactId>onos-of-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.onosproject</groupId>
<artifactId>onos-core-serializers</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onosproject</groupId>
- <artifactId>onos-ovsdb-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.onosproject</groupId>
- <artifactId>onos-restsb-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onosproject</groupId>
- <artifactId>onos-netconf-api</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.annotations</artifactId>
</dependency>
@@ -94,13 +81,6 @@
<artifactId>onlab-junit</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.onosproject</groupId>
- <artifactId>onos-ovsdb-api</artifactId>
- <version>${project.version}</version>
- <classifier>tests</classifier>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
diff --git a/drivers/src/main/java/org/onosproject/driver/netconf/package-info.java b/drivers/src/main/java/org/onosproject/driver/netconf/package-info.java
deleted file mode 100644
index 200312b..0000000
--- a/drivers/src/main/java/org/onosproject/driver/netconf/package-info.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2015 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.
- */
-
-/**
- * Implementations of the Netconf driver behaviours.
- */
-package org.onosproject.driver.netconf;
\ No newline at end of file
diff --git a/drivers/src/main/java/org/onosproject/driver/ovsdb/package-info.java b/drivers/src/main/java/org/onosproject/driver/ovsdb/package-info.java
deleted file mode 100644
index 8d878a5..0000000
--- a/drivers/src/main/java/org/onosproject/driver/ovsdb/package-info.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2015 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.
- */
-
-/**
- * Implementations of OVSDB protocol configurations.
- */
-package org.onosproject.driver.ovsdb;
\ No newline at end of file
diff --git a/drivers/src/test/java/org/onosproject/driver/XmlConfigParserTest.java b/drivers/src/test/java/org/onosproject/driver/XmlConfigParserTest.java
deleted file mode 100644
index 40a3b51..0000000
--- a/drivers/src/test/java/org/onosproject/driver/XmlConfigParserTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2015 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.driver;
-
-import org.junit.Test;
-import org.onlab.packet.IpAddress;
-import org.onosproject.net.behaviour.ControllerInfo;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import static org.junit.Assert.assertTrue;
-import static org.onosproject.driver.XmlConfigParser.*;
-
-/**
- * Test the XML document Parsing for netconf configuration.
- */
-public class XmlConfigParserTest {
-
-
- @Test
- public void basics() throws IOException {
- InputStream stream = getClass().getResourceAsStream("testConfig.xml");
- List<ControllerInfo> controllers = parseStreamControllers(loadXml(stream));
- assertTrue(controllers.get(0).equals(new ControllerInfo(
- IpAddress.valueOf("10.128.12.1"), 6653, "tcp")));
- assertTrue(controllers.get(1).equals(new ControllerInfo(
- IpAddress.valueOf("10.128.12.2"), 6654, "tcp")));
-
- }
-
- @Test
- public void switchId() {
- InputStream stream = getClass().getResourceAsStream("testConfig.xml");
- String switchId = parseSwitchId(loadXml(stream));
- assertTrue(switchId.equals("ofc-bridge"));
- }
-
- @Test
- public void capableSwitchId() {
- InputStream stream = getClass().getResourceAsStream("testConfig.xml");
- String capableSwitchId = parseCapableSwitchId(loadXml(stream));
- assertTrue(capableSwitchId.equals("openvswitch"));
- }
-
- @Test
- public void controllersConfig() {
- InputStream streamOrig = getClass().getResourceAsStream("testConfig.xml");
- InputStream streamCFG = XmlConfigParser.class
- .getResourceAsStream("controllers.xml");
- String config = createControllersConfig(loadXml(streamCFG),
- loadXml(streamOrig), "running", "merge",
- "create", new ArrayList<>(Arrays.asList(
- new ControllerInfo(IpAddress.valueOf("192.168.1.1"),
- 5000, "tcp"))));
- assertTrue(config.contains("192.168.1.1"));
- assertTrue(config.contains("tcp"));
- assertTrue(config.contains("5000"));
-
- }
-}
\ No newline at end of file
diff --git a/drivers/features.xml b/drivers/utilities/features.xml
similarity index 69%
copy from drivers/features.xml
copy to drivers/utilities/features.xml
index 0c08678..fc2e905 100644
--- a/drivers/features.xml
+++ b/drivers/utilities/features.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
<!--
- ~ Copyright 2015 Open Networking Laboratory
+ ~ 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.
@@ -14,18 +15,11 @@
~ 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-of-api/${project.version}</bundle>
-
- <bundle>mvn:${project.groupId}/onos-ovsdb-api/${project.version}</bundle>
- <bundle>mvn:${project.groupId}/onos-ovsdb-rfc/${project.version}</bundle>
-
- <bundle>mvn:${project.groupId}/onos-netconf-api/${project.version}</bundle>
-
- <bundle>mvn:${project.groupId}/onos-restsb-api/${project.version}</bundle>
</feature>
</features>
diff --git a/drivers/utilities/pom.xml b/drivers/utilities/pom.xml
new file mode 100644
index 0000000..f498a47
--- /dev/null
+++ b/drivers/utilities/pom.xml
@@ -0,0 +1,33 @@
+<?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>Device drivers utilities</description>
+
+ <artifactId>onos-drivers-utilities</artifactId>
+ <packaging>bundle</packaging>
+
+</project>
\ No newline at end of file
diff --git a/drivers/src/main/java/org/onosproject/driver/XmlConfigParser.java b/drivers/utilities/src/main/java/org/onosproject/drivers/utilities/XmlConfigParser.java
similarity index 99%
rename from drivers/src/main/java/org/onosproject/driver/XmlConfigParser.java
rename to drivers/utilities/src/main/java/org/onosproject/drivers/utilities/XmlConfigParser.java
index a5a05953..5541461 100644
--- a/drivers/src/main/java/org/onosproject/driver/XmlConfigParser.java
+++ b/drivers/utilities/src/main/java/org/onosproject/drivers/utilities/XmlConfigParser.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.driver;
+package org.onosproject.drivers.utilities;
import com.google.common.collect.Lists;
import org.apache.commons.configuration.ConfigurationException;
diff --git a/drivers/src/main/java/org/onosproject/driver/rest/package-info.java b/drivers/utilities/src/main/java/org/onosproject/drivers/utilities/package-info.java
similarity index 87%
copy from drivers/src/main/java/org/onosproject/driver/rest/package-info.java
copy to drivers/utilities/src/main/java/org/onosproject/drivers/utilities/package-info.java
index 1fd813d..a4fc8a1 100644
--- a/drivers/src/main/java/org/onosproject/driver/rest/package-info.java
+++ b/drivers/utilities/src/main/java/org/onosproject/drivers/utilities/package-info.java
@@ -15,6 +15,6 @@
*/
/**
- * Implementations of the REST driver behaviours.
+ * Package for device drivers utilities.
*/
-package org.onosproject.driver.rest;
\ No newline at end of file
+package org.onosproject.drivers.utilities;
\ No newline at end of file
diff --git a/drivers/src/main/resources/org/onosproject/driver/controllers.xml b/drivers/utilities/src/main/resources/controllers.xml
similarity index 100%
rename from drivers/src/main/resources/org/onosproject/driver/controllers.xml
rename to drivers/utilities/src/main/resources/controllers.xml
diff --git a/drivers/utilities/src/test/java/org/onosproject/drivers/utilities/XmlConfigParserTest.java b/drivers/utilities/src/test/java/org/onosproject/drivers/utilities/XmlConfigParserTest.java
new file mode 100644
index 0000000..9c2735c
--- /dev/null
+++ b/drivers/utilities/src/test/java/org/onosproject/drivers/utilities/XmlConfigParserTest.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2015 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.utilities;
+
+import org.junit.Test;
+import org.onlab.packet.IpAddress;
+import org.onosproject.net.behaviour.ControllerInfo;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import static org.junit.Assert.assertTrue;
+
+/**
+ * Test the XML document Parsing for netconf configuration.
+ */
+public class XmlConfigParserTest {
+
+
+ @Test
+ public void basics() throws IOException {
+ InputStream stream = getClass().getResourceAsStream("/testConfig.xml");
+ List<ControllerInfo> controllers = XmlConfigParser
+ .parseStreamControllers(XmlConfigParser.loadXml(stream));
+ assertTrue(controllers.get(0).equals(new ControllerInfo(
+ IpAddress.valueOf("10.128.12.1"), 6653, "tcp")));
+ assertTrue(controllers.get(1).equals(new ControllerInfo(
+ IpAddress.valueOf("10.128.12.2"), 6654, "tcp")));
+
+ }
+
+ @Test
+ public void switchId() {
+ InputStream stream = getClass().getResourceAsStream("/testConfig.xml");
+ String switchId = XmlConfigParser.parseSwitchId(XmlConfigParser
+ .loadXml(stream));
+ assertTrue(switchId.equals("ofc-bridge"));
+ }
+
+ @Test
+ public void capableSwitchId() {
+ InputStream stream = getClass().getResourceAsStream("/testConfig.xml");
+ String capableSwitchId = XmlConfigParser
+ .parseCapableSwitchId(XmlConfigParser.loadXml(stream));
+ assertTrue(capableSwitchId.equals("openvswitch"));
+ }
+
+ @Test
+ public void controllersConfig() {
+ InputStream streamOrig = getClass().getResourceAsStream("/testConfig.xml");
+ InputStream streamCFG = XmlConfigParser.class.getResourceAsStream("/controllers.xml");
+ String config = XmlConfigParser
+ .createControllersConfig(XmlConfigParser.loadXml(streamCFG),
+ XmlConfigParser.loadXml(streamOrig),
+ "running", "merge", "create",
+ new ArrayList<>(
+ Arrays.asList(
+ new ControllerInfo(
+ IpAddress.valueOf(
+ "192.168.1.1"),
+ 5000, "tcp"))));
+ assertTrue(config.contains("192.168.1.1"));
+ assertTrue(config.contains("tcp"));
+ assertTrue(config.contains("5000"));
+
+ }
+}
\ No newline at end of file
diff --git a/drivers/src/test/resources/org/onosproject/driver/testConfig.xml b/drivers/utilities/src/test/resources/testConfig.xml
similarity index 100%
rename from drivers/src/test/resources/org/onosproject/driver/testConfig.xml
rename to drivers/utilities/src/test/resources/testConfig.xml
diff --git a/providers/netconf/app/app.xml b/providers/netconf/app/app.xml
index 2b1ef1a..4d63a4a 100644
--- a/providers/netconf/app/app.xml
+++ b/providers/netconf/app/app.xml
@@ -15,16 +15,13 @@
~ limitations under the License.
-->
<app name="org.onosproject.netconf" origin="ON.Lab" version="${project.version}"
- category="default" url="http://onosproject.org"
+ category="default" url="http://onosproject.org" apps="org.onosproject.drivers.netconf"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<artifact>mvn:${project.groupId}/onos-netconf-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-netconf-ctl/${project.version}</artifact>
- <artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-netconf-provider-device/${project.version}</artifact>
- <!--<artifact>mvn:${project.groupId}/onos-netconf-provider-device/${project.version}</artifact>-->
- <!-- Question: should there be the jnc stuff here? Or is it just for testing -->
</app>
diff --git a/providers/netconf/app/features.xml b/providers/netconf/app/features.xml
index e032f4d..de810a8 100644
--- a/providers/netconf/app/features.xml
+++ b/providers/netconf/app/features.xml
@@ -23,7 +23,6 @@
<bundle>mvn:${project.groupId}/onos-netconf-ctl/${project.version}</bundle>
<bundle>mvn:${project.groupId}/onos-netconf-provider-device/${project.version}</bundle>
- <!-- Question: should there be the jnc stuff here? Or is it just for testing -->
</feature>
</features>
diff --git a/providers/ovsdb/base/app.xml b/providers/ovsdb/base/app.xml
index 8e77959..c8dbc09 100644
--- a/providers/ovsdb/base/app.xml
+++ b/providers/ovsdb/base/app.xml
@@ -22,7 +22,7 @@
<artifact>mvn:${project.groupId}/onos-ovsdb-rfc/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-ovsdb-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-ovsdb-ctl/${project.version}</artifact>
- <artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact>
+ <artifact>mvn:${project.groupId}/onos-drivers-ovsdb/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-ovsdb-provider-device/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-ovsdb-provider-tunnel/${project.version}</artifact>
diff --git a/providers/ovsdb/base/features.xml b/providers/ovsdb/base/features.xml
index 8f5a01a..a4b61f2 100644
--- a/providers/ovsdb/base/features.xml
+++ b/providers/ovsdb/base/features.xml
@@ -27,6 +27,8 @@
<bundle>mvn:${project.groupId}/onos-ovsdb-api/${project.version}</bundle>
<bundle>mvn:${project.groupId}/onos-ovsdb-ctl/${project.version}</bundle>
+ <bundle>mvn:${project.groupId}/onos-drivers-ovsdb/${project.version}</bundle>
+
<bundle>mvn:${project.groupId}/onos-ovsdb-provider-device/${project.version}</bundle>
<bundle>mvn:${project.groupId}/onos-ovsdb-provider-tunnel/${project.version}</bundle>
</feature>
diff --git a/providers/ovsdb/base/pom.xml b/providers/ovsdb/base/pom.xml
index 9b53ca8..6f019e9 100644
--- a/providers/ovsdb/base/pom.xml
+++ b/providers/ovsdb/base/pom.xml
@@ -49,7 +49,7 @@
</dependency>
<dependency>
<groupId>org.onosproject</groupId>
- <artifactId>onos-drivers</artifactId>
+ <artifactId>onos-drivers-ovsdb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
diff --git a/providers/rest/app/app.xml b/providers/rest/app/app.xml
index a97d44b..b24cd36 100644
--- a/providers/rest/app/app.xml
+++ b/providers/rest/app/app.xml
@@ -15,13 +15,12 @@
~ limitations under the License.
-->
<app name="org.onosproject.restsb" origin="ON.Lab" version="${project.version}"
- category="default" url="http://onosproject.org"
+ category="default" url="http://onosproject.org" apps="org.onosproject.drivers.ciena"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<artifact>mvn:${project.groupId}/onos-restsb-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-restsb-ctl/${project.version}</artifact>
- <artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-restsb-provider-device/${project.version}</artifact>