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 = [ ...@@ -54,6 +54,7 @@ CORE = [
54 '//drivers/lumentum:onos-drivers-lumentum-oar', 54 '//drivers/lumentum:onos-drivers-lumentum-oar',
55 '//drivers/netconf:onos-drivers-netconf-oar', 55 '//drivers/netconf:onos-drivers-netconf-oar',
56 '//drivers/ovsdb:onos-drivers-ovsdb-oar', 56 '//drivers/ovsdb:onos-drivers-ovsdb-oar',
57 + '//drivers/optical:onos-drivers-optical-oar',
57 58
58 '//providers/netconf/device:onos-providers-netconf-device', 59 '//providers/netconf/device:onos-providers-netconf-device',
59 '//providers/openflow/device:onos-providers-openflow-device', 60 '//providers/openflow/device:onos-providers-openflow-device',
......
...@@ -54,16 +54,6 @@ ...@@ -54,16 +54,6 @@
54 <behaviour api="org.onosproject.net.behaviour.Pipeliner" 54 <behaviour api="org.onosproject.net.behaviour.Pipeliner"
55 impl="org.onosproject.driver.pipeline.SpringOpenTTPDell"/> 55 impl="org.onosproject.driver.pipeline.SpringOpenTTPDell"/>
56 </driver> 56 </driver>
57 - <driver name="linc-oe" extends="default"
58 - manufacturer="FlowForwarding.org" hwVersion="Unknown"
59 - swVersion="LINC-OE OpenFlow Software Switch 1.1">
60 - <behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
61 - impl="org.onosproject.driver.handshaker.OfOpticalSwitchImplLinc13"/>
62 - <behaviour api="org.onosproject.net.behaviour.LambdaQuery"
63 - impl="org.onosproject.driver.query.LincOELambdaQuery"/>
64 - <behaviour api="org.onosproject.net.optical.OpticalDevice"
65 - impl="org.onosproject.net.optical.DefaultOpticalDevice"/>
66 - </driver>
67 <driver name="ofdpa" extends="default" 57 <driver name="ofdpa" extends="default"
68 manufacturer="Broadcom Corp." hwVersion="OF-DPA.*" swVersion="OF-DPA.*"> 58 manufacturer="Broadcom Corp." hwVersion="OF-DPA.*" swVersion="OF-DPA.*">
69 <behaviour api="org.onosproject.net.behaviour.Pipeliner" 59 <behaviour api="org.onosproject.net.behaviour.Pipeliner"
...@@ -146,30 +136,11 @@ ...@@ -146,30 +136,11 @@
146 <behaviour api="org.onosproject.net.behaviour.Pipeliner" 136 <behaviour api="org.onosproject.net.behaviour.Pipeliner"
147 impl="org.onosproject.driver.pipeline.CpqdOfdpa2VlanPipeline"/> 137 impl="org.onosproject.driver.pipeline.CpqdOfdpa2VlanPipeline"/>
148 </driver> 138 </driver>
149 - <driver name="calient" extends="default"
150 - manufacturer="calient technologies inc" hwVersion="calient hardware.*"
151 - swVersion="ocs software version.*">
152 - <behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
153 - impl="org.onosproject.driver.handshaker.CalientFiberSwitchHandshaker"/>
154 - <behaviour api="org.onosproject.net.behaviour.LambdaQuery"
155 - impl="org.onosproject.driver.query.CalientLambdaQuery"/>
156 - </driver>
157 <driver name="onosfw" extends="ovs" 139 <driver name="onosfw" extends="ovs"
158 manufacturer="" hwVersion="" swVersion=""> 140 manufacturer="" hwVersion="" swVersion="">
159 <behaviour api="org.onosproject.net.behaviour.Pipeliner" 141 <behaviour api="org.onosproject.net.behaviour.Pipeliner"
160 impl="org.onosproject.driver.pipeline.OpenVSwitchPipeline"/> 142 impl="org.onosproject.driver.pipeline.OpenVSwitchPipeline"/>
161 </driver> 143 </driver>
162 - <driver name="eci" extends="default"
163 - manufacturer="ECI Telecom" hwVersion="Optical.*" swVersion="V_1_0">
164 - <behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
165 - impl="org.onosproject.driver.handshaker.OFOpticalSwitch13"/>
166 - <behaviour api="org.onosproject.net.behaviour.TributarySlotQuery"
167 - impl="org.onosproject.driver.query.DefaultTributarySlotQuery" />
168 - <behaviour api="org.onosproject.net.behaviour.LambdaQuery"
169 - impl="org.onosproject.driver.query.OFOpticalSwitch13LambdaQuery"/>
170 - <behaviour api="org.onosproject.net.optical.OpticalDevice"
171 - impl="org.onosproject.net.optical.DefaultOpticalDevice"/>
172 - </driver>
173 <driver name="aos" extends="ofdpa" 144 <driver name="aos" extends="ofdpa"
174 manufacturer="Accton" hwVersion=".*" swVersion="1.*"> 145 manufacturer="Accton" hwVersion=".*" swVersion="1.*">
175 </driver> 146 </driver>
...@@ -178,14 +149,6 @@ ...@@ -178,14 +149,6 @@
178 <behaviour api="org.onosproject.net.behaviour.Pipeliner" 149 <behaviour api="org.onosproject.net.behaviour.Pipeliner"
179 impl="org.onosproject.driver.pipeline.OpenstackPipeline"/> 150 impl="org.onosproject.driver.pipeline.OpenstackPipeline"/>
180 </driver> 151 </driver>
181 - <driver name="oplk-roadm" extends="default"
182 - manufacturer="Oplink a Molex company" hwVersion="ROADM"
183 - swVersion="of-agent">
184 - <behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
185 - impl="org.onosproject.driver.handshaker.OplinkRoadmHandshaker"/>
186 - <behaviour api="org.onosproject.net.optical.OpticalDevice"
187 - impl="org.onosproject.net.optical.DefaultOpticalDevice"/>
188 - </driver>
189 <driver name="hp" extends="default" 152 <driver name="hp" extends="default"
190 manufacturer="HP" hwVersion="Switch 3500yl-48G" swVersion="K.16.01.0004"> 153 manufacturer="HP" hwVersion="Switch 3500yl-48G" swVersion="K.16.01.0004">
191 <behaviour api="org.onosproject.net.behaviour.Pipeliner" 154 <behaviour api="org.onosproject.net.behaviour.Pipeliner"
......
1 +COMPILE_DEPS = [
2 + '//lib:CORE_DEPS',
3 + '//lib:openflowj',
4 + '//protocols/openflow/api:onos-protocols-openflow-api',
5 + '//drivers/default:onos-drivers-default',
6 +]
7 +
8 +osgi_jar_with_tests (
9 + deps = COMPILE_DEPS,
10 + resources_root = 'src/main/resources',
11 + resources = glob(['src/main/resources/**']),
12 +)
13 +
14 +onos_app (
15 + title = 'Other optical Device Drivers',
16 + category = 'Drivers',
17 + url = 'http://onosproject.org',
18 + description = 'ONOS other optical Device Drivers application.',
19 + required_apps = [ 'org.onosproject.drivers' ],
20 +)
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<!--
3 + ~ Copyright 2016-present Open Networking Laboratory
4 + ~
5 + ~ Licensed under the Apache License, Version 2.0 (the "License");
6 + ~ you may not use this file except in compliance with the License.
7 + ~ You may obtain a copy of the License at
8 + ~
9 + ~ http://www.apache.org/licenses/LICENSE-2.0
10 + ~
11 + ~ Unless required by applicable law or agreed to in writing, software
12 + ~ distributed under the License is distributed on an "AS IS" BASIS,
13 + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 + ~ See the License for the specific language governing permissions and
15 + ~ limitations under the License.
16 + -->
17 +
18 +<project xmlns="http://maven.apache.org/POM/4.0.0"
19 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21 + <parent>
22 + <artifactId>onos-drivers-general</artifactId>
23 + <groupId>org.onosproject</groupId>
24 + <version>1.6.0-SNAPSHOT</version>
25 + </parent>
26 + <modelVersion>4.0.0</modelVersion>
27 +
28 + <artifactId>onos-drivers-optical</artifactId>
29 + <packaging>bundle</packaging>
30 +
31 + <description>Other optical device drivers</description>
32 +
33 + <properties>
34 + <onos.app.name>org.onosproject.drivers.optical</onos.app.name>
35 + <onos.app.origin>ON.Lab</onos.app.origin>
36 + <onos.app.category>Drivers</onos.app.category>
37 + <onos.app.title>Other optical Device Drivers</onos.app.title>
38 + <onos.app.url>http://onosproject.org</onos.app.url>
39 + <onos.app.requires>
40 + org.onosproject.drivers
41 + </onos.app.requires>
42 + </properties>
43 +
44 + <dependencies>
45 +
46 + <dependency>
47 + <groupId>org.onosproject</groupId>
48 + <artifactId>onos-drivers</artifactId>
49 + <version>${project.version}</version>
50 + </dependency>
51 +
52 + <dependency>
53 + <groupId>org.onosproject</groupId>
54 + <artifactId>openflowj</artifactId>
55 + </dependency>
56 + <dependency>
57 + <groupId>org.onosproject</groupId>
58 + <artifactId>onos-of-api</artifactId>
59 + </dependency>
60 +
61 + </dependencies>
62 +
63 +</project>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.onosproject.driver.handshaker; 16 +package org.onosproject.driver.optical.handshaker;
17 17
18 import com.google.common.collect.ImmutableList; 18 import com.google.common.collect.ImmutableList;
19 import com.google.common.collect.ImmutableSet; 19 import com.google.common.collect.ImmutableSet;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.onosproject.driver.handshaker; 16 +package org.onosproject.driver.optical.handshaker;
17 17
18 import org.projectfloodlight.openflow.protocol.OFExpPort; 18 import org.projectfloodlight.openflow.protocol.OFExpPort;
19 import org.projectfloodlight.openflow.protocol.OFExpPortDescReply; 19 import org.projectfloodlight.openflow.protocol.OFExpPortDescReply;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.onosproject.driver.handshaker; 16 +package org.onosproject.driver.optical.handshaker;
17 17
18 import com.google.common.collect.ImmutableSet; 18 import com.google.common.collect.ImmutableSet;
19 import org.onosproject.net.Device; 19 import org.onosproject.net.Device;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.onosproject.driver.handshaker; 16 +package org.onosproject.driver.optical.handshaker;
17 17
18 import com.google.common.collect.ImmutableList; 18 import com.google.common.collect.ImmutableList;
19 import com.google.common.collect.ImmutableSet; 19 import com.google.common.collect.ImmutableSet;
......
1 +/*
2 + * Copyright 2016-present Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +/**
17 + * Implementations of the handshake driver behaviours for optical devices.
18 + */
19 +package org.onosproject.driver.optical.handshaker;
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.onosproject.driver.query; 16 +package org.onosproject.driver.optical.query;
17 17
18 import org.onlab.util.Spectrum; 18 import org.onlab.util.Spectrum;
19 import org.onosproject.net.ChannelSpacing; 19 import org.onosproject.net.ChannelSpacing;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.onosproject.driver.query; 16 +package org.onosproject.driver.optical.query;
17 17
18 import org.onlab.util.GuavaCollectors; 18 import org.onlab.util.GuavaCollectors;
19 import org.onosproject.net.OduSignalType; 19 import org.onosproject.net.OduSignalType;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.onosproject.driver.query; 16 +package org.onosproject.driver.optical.query;
17 17
18 import org.onosproject.net.ChannelSpacing; 18 import org.onosproject.net.ChannelSpacing;
19 import org.onosproject.net.GridType; 19 import org.onosproject.net.GridType;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.onosproject.driver.query; 16 +package org.onosproject.driver.optical.query;
17 17
18 import org.onosproject.net.ChannelSpacing; 18 import org.onosproject.net.ChannelSpacing;
19 import org.onosproject.net.OchSignal; 19 import org.onosproject.net.OchSignal;
......
1 +/*
2 + * Copyright 2016-present Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +/**
17 + * Implementations of the query driver behaviours for optical devices.
18 + */
19 +package org.onosproject.driver.optical.query;
1 +package org.onosproject.drivers.optical;
2 +/*
3 + * Copyright 2016-present Open Networking Laboratory
4 + *
5 + * Licensed under the Apache License, Version 2.0 (the "License");
6 + * you may not use this file except in compliance with the License.
7 + * You may obtain a copy of the License at
8 + *
9 + * http://www.apache.org/licenses/LICENSE-2.0
10 + *
11 + * Unless required by applicable law or agreed to in writing, software
12 + * distributed under the License is distributed on an "AS IS" BASIS,
13 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 + * See the License for the specific language governing permissions and
15 + * limitations under the License.
16 + */
17 +
18 +
19 +
20 +import org.apache.felix.scr.annotations.Component;
21 +import org.onosproject.net.driver.AbstractDriverLoader;
22 +import org.onosproject.net.optical.OpticalDevice;
23 +
24 +/**
25 + * Loader for other optical device drivers.
26 + */
27 +@Component(immediate = true)
28 +public class OpticalDriversLoader extends AbstractDriverLoader {
29 +
30 + // OSGI: help bundle plugin discover runtime package dependency.
31 + @SuppressWarnings("unused")
32 + private OpticalDevice optical;
33 +
34 + public OpticalDriversLoader() {
35 + super("/optical-drivers.xml");
36 + }
37 +}
1 +/*
2 + * Copyright 2016-present Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +/**
17 + * Package for other optical device drivers.
18 + */
19 +package org.onosproject.drivers.optical;
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<!--
3 + ~ Copyright 2016-present Open Networking Laboratory
4 + ~
5 + ~ Licensed under the Apache License, Version 2.0 (the "License");
6 + ~ you may not use this file except in compliance with the License.
7 + ~ You may obtain a copy of the License at
8 + ~
9 + ~ http://www.apache.org/licenses/LICENSE-2.0
10 + ~
11 + ~ Unless required by applicable law or agreed to in writing, software
12 + ~ distributed under the License is distributed on an "AS IS" BASIS,
13 + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 + ~ See the License for the specific language governing permissions and
15 + ~ limitations under the License.
16 + -->
17 +<drivers>
18 + <driver name="linc-oe" extends="default"
19 + manufacturer="FlowForwarding.org" hwVersion="Unknown"
20 + swVersion="LINC-OE OpenFlow Software Switch 1.1">
21 + <behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
22 + impl="org.onosproject.driver.optical.handshaker.OfOpticalSwitchImplLinc13"/>
23 + <behaviour api="org.onosproject.net.behaviour.LambdaQuery"
24 + impl="org.onosproject.driver.optical.query.LincOELambdaQuery"/>
25 + <behaviour api="org.onosproject.net.optical.OpticalDevice"
26 + impl="org.onosproject.net.optical.DefaultOpticalDevice"/>
27 + </driver>
28 +
29 + <driver name="calient" extends="default"
30 + manufacturer="calient technologies inc" hwVersion="calient hardware.*"
31 + swVersion="ocs software version.*">
32 + <behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
33 + impl="org.onosproject.driver.optical.handshaker.CalientFiberSwitchHandshaker"/>
34 + <behaviour api="org.onosproject.net.behaviour.LambdaQuery"
35 + impl="org.onosproject.driver.optical.query.CalientLambdaQuery"/>
36 + </driver>
37 +
38 + <driver name="eci" extends="default"
39 + manufacturer="ECI Telecom" hwVersion="Optical.*" swVersion="V_1_0">
40 + <behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
41 + impl="org.onosproject.driver.optical.handshaker.OFOpticalSwitch13"/>
42 + <behaviour api="org.onosproject.net.behaviour.TributarySlotQuery"
43 + impl="org.onosproject.driver.optical.query.DefaultTributarySlotQuery" />
44 + <behaviour api="org.onosproject.net.behaviour.LambdaQuery"
45 + impl="org.onosproject.driver.optical.query.OFOpticalSwitch13LambdaQuery"/>
46 + <behaviour api="org.onosproject.net.optical.OpticalDevice"
47 + impl="org.onosproject.net.optical.DefaultOpticalDevice"/>
48 + </driver>
49 +
50 + <driver name="oplk-roadm" extends="default"
51 + manufacturer="Oplink a Molex company" hwVersion="ROADM"
52 + swVersion="of-agent">
53 + <behaviour api="org.onosproject.openflow.controller.driver.OpenFlowSwitchDriver"
54 + impl="org.onosproject.driver.optical.handshaker.OplinkRoadmHandshaker"/>
55 + <behaviour api="org.onosproject.net.optical.OpticalDevice"
56 + impl="org.onosproject.net.optical.DefaultOpticalDevice"/>
57 + </driver>
58 +
59 +</drivers>
60 +
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
43 <module>bti</module> 43 <module>bti</module>
44 <module>bmv2</module> 44 <module>bmv2</module>
45 <module>corsa</module> 45 <module>corsa</module>
46 + <module>optical</module>
46 </modules> 47 </modules>
47 48
48 <!--<properties> 49 <!--<properties>
......
...@@ -4,4 +4,4 @@ export ONOS_NIC=192.168.56.* ...@@ -4,4 +4,4 @@ export ONOS_NIC=192.168.56.*
4 export OC1="192.168.56.101" 4 export OC1="192.168.56.101"
5 export OCN="192.168.56.103" 5 export OCN="192.168.56.103"
6 6
7 -export ONOS_APPS="drivers,openflow,fwd,proxyarp,mobility,optical" 7 +export ONOS_APPS="drivers,drivers.optical,openflow,fwd,proxyarp,mobility,optical"
......