Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Adding a new device to ONOS requires implementing aLumentumWaveReadyDiscoverya set of behaviors. For instance, to discover devices and their ports, implement the DeviceDescriptionDiscovery. If your device supports flow rules, implement the FlowRuleProgrammable. And so on. Go here for more information: Device Driver Subsystem.

In the following, let's take LumentumWaveReadyDiscovery as an example. Here you can see how the behavior interacts with the TL1 controller. This is how we fetch the device description:

Code Block
// Fetch device description
Tl1Command ddCmd = DefaultTl1Command.builder()
        .withVerb(RTRV)
        .withModifier(NETYPE)
        .withCtag(101)
        .build();
Future<String> dd = ctrl.sendMsg(deviceId, ddCmd);

try {
    String ddResponse = dd.get(TIMEOUT, TimeUnit.MILLISECONDS);

    return new DefaultDeviceDescription(defaultDescription, true, extractAnnotations(ddResponse));
} catch (InterruptedException | ExecutionException | TimeoutException e) {
    log.error("Device description not found", e);
    return defaultDescription;
}

 

After implementing your behaviors, ensure that ONOS knows about them. Here is an example of the lumentum-drivers.xml.

Code Block
<driver name="lumentum-waveready" manufacturer="Lumentum" hwVersion="WR*">
    <behaviour api="org.onosproject.net.device.DeviceDescriptionDiscovery"
               impl="org.onosproject.drivers.lumentum.LumentumWaveReadyDiscovery"/>
    <behaviour api="org.onosproject.net.optical.OpticalDevice"
               impl="org.onosproject.net.optical.DefaultOpticalDevice"/>
</driver>

 

Missing features / Help wanted

...