Changes between Version 24 and Version 25 of Network driver development HOWTO

Show
Ignore:
Timestamp:
05/21/10 12:16:00 (9 years ago)
Author:
ibaldin (IP: 152.54.9.131)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Network driver development HOWTO

    v24 v25  
    66The drivers are located under $ORCA_SRC/handlers/network and are organized into a number of packages: 
    77 
    8 orca.handlers.network.core - contains interfaces and classes common to multiple network element types (routers, DWDM platforms etc) 
     8 * orca.handlers.network.core - contains interfaces and classes common to multiple network element types (routers, DWDM platforms etc) 
    99 
    10 orca.handlers.network.os - implementation of the Polatis optical switch driver 
     10 * orca.handlers.network.os - implementation of the Polatis optical switch driver 
    1111 
    12 orca.handlers.network.dtn - implementation of the Infinera DTN driver 
     12 * orca.handlers.network.dtn - implementation of the Infinera DTN driver 
    1313 
    14 orca.handlers.network.router - implementations for routers/switches (currently contains Cisco6509 and Juniper EX3200) 
     14 * orca.handlers.network.router - implementations for routers/switches (currently contains Cisco6509 and Juniper EX3200) 
    1515 
    16 orca.handlers.network.tasks - common interfaces and classes for handler tasks that invoke driver actions. Also tasks for DTN and Polatis. 
     16 * orca.handlers.network.tasks - common interfaces and classes for handler tasks that invoke driver actions. Also tasks for DTN and Polatis. 
    1717 
    18 orca.handlers.network.tasks.Cisco6509 - handler tasks for Cisco 6509 
     18 * orca.handlers.network.tasks.Cisco6509 - handler tasks for Cisco 6509 
    1919 
    20 orca.handlers.network.tasks.EX3200 - handler tasks for Juniper EX3200 
     20 * orca.handlers.network.tasks.EX3200 - handler tasks for Juniper EX3200 
    2121 
    2222These 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. 
     
    122122 
    123123'''NOTE:''' by default ant/tests.properties has emulation and test.mode properties set to '''true''' which means drivers will not execute actual tasks on real hardware (this depends on the implementation, you should look at the code of Cisco 6509 and EX3200 drivers and the use of IDevice.enableEmulation() and IDevice.isEmulationEnabled() methods). 
     124 
     125== Additional Notes == 
     126 
     127=== Developing another Cisco driver === 
     128 
     129Developing a driver for another Cisco device (let's call it 'NewCiscoDevice' here, you should come up with a better name) that is trivial: 
     130 
     131 1. Create a new class for the device that extends CiscoRouterDevice and implements IRouterDevice or directly extends Cisco6509Device if it is capable of VLAN translation.  Its constructor is trivial: 
     132{{{ 
     133    public NewCiscoDevice(String deviceAddress, String uid, String password, String adminPassword) { 
     134        super(deviceAddress, uid, password, adminPassword); 
     135        basepath = "/orca/handlers/network/router/cisco/NewCiscoDevice"; 
     136    } 
     137}}} 
     138 2. Create a new directory 
     139{{{ 
     140   $ORCA_SRC/handlers/network/src/main/resources/orca/handlers/network/router/cisco/NewCiscoDevice 
     141}}} 
     142 3. Copy the XML scripts from $ORCA_SRC/handlers/network/src/main/resources/orca/handlers/network/router/cisco/6509 to this folder and modify them for the syntax of the new device 
     143 4. Create a new package under $ORCA_SRC/handlers/network/src/main/java called orca.handlers.network.tasks.NewCiscoDevice and copy into it all the tasks from package orca.handlers.network.tasks.Cisco6509. Modify the tasks if necessary 
     144 5. Declare the new driver and update the meta-information as described above.  
     145 6. Test