Version 12 (modified by ibaldin, 9 years ago)

--

Overview

As of Bella 2.1, network substrate drivers have been reorganized from a number of separate projects (one project per device family) into a single simple project that covers all network elements. Node Agent code has been removed, such that new network drivers and handlers no longer require the use of Node Agent and are invoked directly by the Site Authority.

The drivers are located under $ORCA_SRC/handlers/network and are organized into a number of packages:

orca.handlers.network.core - contains interfaces and classes common to multiple network element types (routers, DWDM platforms etc)

orca.handlers.network.os - implementation of the Polatis optical switch driver

orca.handlers.network.dtn - implementation of the Infinera DTN driver

orca.handlers.network.router - implementations for routers/switches (currently contains Cisco6509 and Juniper EX3200)

orca.handlers.network.tasks - common interfaces and classes for handler tasks that invoke driver actions. Also tasks for DTN and Polatis.

orca.handlers.network.tasks.Cisco6509 - handler tasks for Cisco 6509

orca.handlers.network.tasks.EX3200 - handler tasks for Juniper EX3200

These packages are spread over multiple directories under $ORCA_SRC/handlers/network/src/main/java and $ORCA_SRC/handlers/network/src/main/resources. The resources/ subtree contains XML and TXT scripts used by different device drivers that encode the commands that need to be sent.

The attached figure shows the UML diagram of the classes and interfaces that implement router drivers (not DTN or OS).

Implementing a new router driver

A basic router driver must either implement the basic IRouterDevice interface (if the device supports basic VLAN operations) or the IMappingRouterDevice (if the device supports VLAN tag remapping):

IRouterDevice:

public interface IRouterDevice extends INetworkDevice {
	
	// create VLAN with QoS
    public void createVLAN(String vlanTag, String qos) throws CommandException;

    // delete VLAN
    public void deleteVLAN(String vlanTag) throws CommandException;
    
    // add trunk ports to a VLAN
    public void addTrunkPortsToVLAN(String vlanTag, String ports) throws CommandException;
    
    // add access ports to a VLAN
    public void addAccessPortsToVLAN(String vlanTag, String ports) throws CommandException;

    // remove trunk ports from a VLAN
    public void removeTrunkPortsFromVLAN(String vlanTag, String ports) throws CommandException;
    
    // remove access ports from a VLAN
    public void removeAccessPortsFromVLAN(String vlanTag, String ports) throws CommandException;
       
}

IMappingRouterDevice:

public interface IMappingRouterDevice extends IRouterDevice {
	
    public void mapVLANs(String sourceTag, String destinationTag, String port) throws CommandException;

    public void unmapVLANs(String sourceTag, String destinationTag, String port) throws CommandException; 

}

The parameters are passed in as strings and their interpretation is left to the driver implementation. Developers are strongly encouraged to implement unit tests under handlers/network/src/test/java in the package orca.handlers.network. See existing tests for inspiration. Test procedures are described in this document below.

Once the interface is implemented, the next step is to implement a set of tasks (a class per task) corresponding to driver actions. A common way to implement them is to define a device-specific base task that is a child of NetworkBaseTask and subclass further tasks from it (see the orca.handlers.network.tasks.Cisco6509 as an example).

Testing

Unit tests

Task tests

Attachments