HIGUCHI Yuta
Committed by Yuta HIGUCHI

[ONOS-4588] Separate optical driver from "default" driver bundle

Note: If you're using optical devices currently in "default" driver bundle,
(LINC-OE, Calient fiber switch, ECI devices, OpLink ROADM)

you'll need to load the driver/app "drivers.optical" in adition to default drivers

e.g.,
a) Add to cell definition
 export ONOS_APPS=${ONOS_APPS},drivers.optical

b) Activate after starting ONOS
 onos> app activate org.onosproject.drivers.optical

Change-Id: I126c09bebc816d11b4700a80e7a36a8e6c3e1b49
Showing 19 changed files with 248 additions and 46 deletions
......@@ -54,6 +54,7 @@ CORE = [
'//drivers/lumentum:onos-drivers-lumentum-oar',
'//drivers/netconf:onos-drivers-netconf-oar',
'//drivers/ovsdb:onos-drivers-ovsdb-oar',
'//drivers/optical:onos-drivers-optical-oar',
'//providers/netconf/device:onos-providers-netconf-device',
'//providers/openflow/device:onos-providers-openflow-device',
......
......@@ -54,16 +54,6 @@
<behaviour api="org.onosproject.net.behaviour.Pipeliner"
impl="org.onosproject.driver.pipeline.SpringOpenTTPDell"/>
</driver>
<driver name="linc-oe" extends="default"
manufacturer="FlowForwarding.org" hwVersion="Unknown"
swVersion="LINC-OE OpenFlow Software Switch 1.1">
<behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
impl="org.onosproject.driver.handshaker.OfOpticalSwitchImplLinc13"/>
<behaviour api="org.onosproject.net.behaviour.LambdaQuery"
impl="org.onosproject.driver.query.LincOELambdaQuery"/>
<behaviour api="org.onosproject.net.optical.OpticalDevice"
impl="org.onosproject.net.optical.DefaultOpticalDevice"/>
</driver>
<driver name="ofdpa" extends="default"
manufacturer="Broadcom Corp." hwVersion="OF-DPA.*" swVersion="OF-DPA.*">
<behaviour api="org.onosproject.net.behaviour.Pipeliner"
......@@ -146,30 +136,11 @@
<behaviour api="org.onosproject.net.behaviour.Pipeliner"
impl="org.onosproject.driver.pipeline.CpqdOfdpa2VlanPipeline"/>
</driver>
<driver name="calient" extends="default"
manufacturer="calient technologies inc" hwVersion="calient hardware.*"
swVersion="ocs software version.*">
<behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
impl="org.onosproject.driver.handshaker.CalientFiberSwitchHandshaker"/>
<behaviour api="org.onosproject.net.behaviour.LambdaQuery"
impl="org.onosproject.driver.query.CalientLambdaQuery"/>
</driver>
<driver name="onosfw" extends="ovs"
manufacturer="" hwVersion="" swVersion="">
<behaviour api="org.onosproject.net.behaviour.Pipeliner"
impl="org.onosproject.driver.pipeline.OpenVSwitchPipeline"/>
</driver>
<driver name="eci" extends="default"
manufacturer="ECI Telecom" hwVersion="Optical.*" swVersion="V_1_0">
<behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
impl="org.onosproject.driver.handshaker.OFOpticalSwitch13"/>
<behaviour api="org.onosproject.net.behaviour.TributarySlotQuery"
impl="org.onosproject.driver.query.DefaultTributarySlotQuery" />
<behaviour api="org.onosproject.net.behaviour.LambdaQuery"
impl="org.onosproject.driver.query.OFOpticalSwitch13LambdaQuery"/>
<behaviour api="org.onosproject.net.optical.OpticalDevice"
impl="org.onosproject.net.optical.DefaultOpticalDevice"/>
</driver>
<driver name="aos" extends="ofdpa"
manufacturer="Accton" hwVersion=".*" swVersion="1.*">
</driver>
......@@ -178,14 +149,6 @@
<behaviour api="org.onosproject.net.behaviour.Pipeliner"
impl="org.onosproject.driver.pipeline.OpenstackPipeline"/>
</driver>
<driver name="oplk-roadm" extends="default"
manufacturer="Oplink a Molex company" hwVersion="ROADM"
swVersion="of-agent">
<behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
impl="org.onosproject.driver.handshaker.OplinkRoadmHandshaker"/>
<behaviour api="org.onosproject.net.optical.OpticalDevice"
impl="org.onosproject.net.optical.DefaultOpticalDevice"/>
</driver>
<driver name="hp" extends="default"
manufacturer="HP" hwVersion="Switch 3500yl-48G" swVersion="K.16.01.0004">
<behaviour api="org.onosproject.net.behaviour.Pipeliner"
......
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:openflowj',
'//protocols/openflow/api:onos-protocols-openflow-api',
'//drivers/default:onos-drivers-default',
]
osgi_jar_with_tests (
deps = COMPILE_DEPS,
resources_root = 'src/main/resources',
resources = glob(['src/main/resources/**']),
)
onos_app (
title = 'Other optical Device Drivers',
category = 'Drivers',
url = 'http://onosproject.org',
description = 'ONOS other optical Device Drivers application.',
required_apps = [ 'org.onosproject.drivers' ],
)
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2016-present Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>onos-drivers-general</artifactId>
<groupId>org.onosproject</groupId>
<version>1.6.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>onos-drivers-optical</artifactId>
<packaging>bundle</packaging>
<description>Other optical device drivers</description>
<properties>
<onos.app.name>org.onosproject.drivers.optical</onos.app.name>
<onos.app.origin>ON.Lab</onos.app.origin>
<onos.app.category>Drivers</onos.app.category>
<onos.app.title>Other optical Device Drivers</onos.app.title>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.requires>
org.onosproject.drivers
</onos.app.requires>
</properties>
<dependencies>
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>onos-drivers</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>openflowj</artifactId>
</dependency>
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>onos-of-api</artifactId>
</dependency>
</dependencies>
</project>
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.driver.handshaker;
package org.onosproject.driver.optical.handshaker;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.driver.handshaker;
package org.onosproject.driver.optical.handshaker;
import org.projectfloodlight.openflow.protocol.OFExpPort;
import org.projectfloodlight.openflow.protocol.OFExpPortDescReply;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.driver.handshaker;
package org.onosproject.driver.optical.handshaker;
import com.google.common.collect.ImmutableSet;
import org.onosproject.net.Device;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.driver.handshaker;
package org.onosproject.driver.optical.handshaker;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
......
/*
* Copyright 2016-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.
*/
/**
* Implementations of the handshake driver behaviours for optical devices.
*/
package org.onosproject.driver.optical.handshaker;
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.driver.query;
package org.onosproject.driver.optical.query;
import org.onlab.util.Spectrum;
import org.onosproject.net.ChannelSpacing;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.driver.query;
package org.onosproject.driver.optical.query;
import org.onlab.util.GuavaCollectors;
import org.onosproject.net.OduSignalType;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.driver.query;
package org.onosproject.driver.optical.query;
import org.onosproject.net.ChannelSpacing;
import org.onosproject.net.GridType;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.driver.query;
package org.onosproject.driver.optical.query;
import org.onosproject.net.ChannelSpacing;
import org.onosproject.net.OchSignal;
......
/*
* Copyright 2016-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.
*/
/**
* Implementations of the query driver behaviours for optical devices.
*/
package org.onosproject.driver.optical.query;
package org.onosproject.drivers.optical;
/*
* Copyright 2016-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.
*/
import org.apache.felix.scr.annotations.Component;
import org.onosproject.net.driver.AbstractDriverLoader;
import org.onosproject.net.optical.OpticalDevice;
/**
* Loader for other optical device drivers.
*/
@Component(immediate = true)
public class OpticalDriversLoader extends AbstractDriverLoader {
// OSGI: help bundle plugin discover runtime package dependency.
@SuppressWarnings("unused")
private OpticalDevice optical;
public OpticalDriversLoader() {
super("/optical-drivers.xml");
}
}
/*
* Copyright 2016-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 other optical device drivers.
*/
package org.onosproject.drivers.optical;
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2016-present Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<drivers>
<driver name="linc-oe" extends="default"
manufacturer="FlowForwarding.org" hwVersion="Unknown"
swVersion="LINC-OE OpenFlow Software Switch 1.1">
<behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
impl="org.onosproject.driver.optical.handshaker.OfOpticalSwitchImplLinc13"/>
<behaviour api="org.onosproject.net.behaviour.LambdaQuery"
impl="org.onosproject.driver.optical.query.LincOELambdaQuery"/>
<behaviour api="org.onosproject.net.optical.OpticalDevice"
impl="org.onosproject.net.optical.DefaultOpticalDevice"/>
</driver>
<driver name="calient" extends="default"
manufacturer="calient technologies inc" hwVersion="calient hardware.*"
swVersion="ocs software version.*">
<behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
impl="org.onosproject.driver.optical.handshaker.CalientFiberSwitchHandshaker"/>
<behaviour api="org.onosproject.net.behaviour.LambdaQuery"
impl="org.onosproject.driver.optical.query.CalientLambdaQuery"/>
</driver>
<driver name="eci" extends="default"
manufacturer="ECI Telecom" hwVersion="Optical.*" swVersion="V_1_0">
<behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
impl="org.onosproject.driver.optical.handshaker.OFOpticalSwitch13"/>
<behaviour api="org.onosproject.net.behaviour.TributarySlotQuery"
impl="org.onosproject.driver.optical.query.DefaultTributarySlotQuery" />
<behaviour api="org.onosproject.net.behaviour.LambdaQuery"
impl="org.onosproject.driver.optical.query.OFOpticalSwitch13LambdaQuery"/>
<behaviour api="org.onosproject.net.optical.OpticalDevice"
impl="org.onosproject.net.optical.DefaultOpticalDevice"/>
</driver>
<driver name="oplk-roadm" extends="default"
manufacturer="Oplink a Molex company" hwVersion="ROADM"
swVersion="of-agent">
<behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
impl="org.onosproject.driver.optical.handshaker.OplinkRoadmHandshaker"/>
<behaviour api="org.onosproject.net.optical.OpticalDevice"
impl="org.onosproject.net.optical.DefaultOpticalDevice"/>
</driver>
</drivers>
......@@ -43,6 +43,7 @@
<module>bti</module>
<module>bmv2</module>
<module>corsa</module>
<module>optical</module>
</modules>
<!--<properties>
......
......@@ -4,4 +4,4 @@ export ONOS_NIC=192.168.56.*
export OC1="192.168.56.101"
export OCN="192.168.56.103"
export ONOS_APPS="drivers,openflow,fwd,proxyarp,mobility,optical"
export ONOS_APPS="drivers,drivers.optical,openflow,fwd,proxyarp,mobility,optical"
......