Version 1 (modified by aydan, 11 years ago)


You can use the sample driver template to get started on writing a new Orca driver. The driver template consists of 3 projects:

  • core
    • specifies the API for all drivers of the given family, e.g., drivers for creating virtual machines
    • provides ANT tasks that invoke the driver API
  • specific device driver implementation
    • contains the implementation of a specific driver from the device family, e.g, a driver that creates Xen virtual machines
  • tests
    • contains tests for the driver and its ant taske

To use the template to generate a working skeleton for your driver do the following:

1. Make a work directory

mkdir scratch

2. Download the template

cd scratch
svn export template
mv template/ .

3. Edit the conversion script.

The following variables must be changed:

FAMILY_NAME='Orca Test Device'
INSTANCE_NAME='Orca Test Device Driver'
TESTS_NAME='Orca Test Device Driver Tests'
  • DEST - top level directory for your driver, e.g., mydriver
  • DEVICE_FAMILY - package name for the driver family. The full package name will become: orca.drivers.${DEVICE_FAMILY}, e.g, mydriver
  • DEVICE_FAMILY_PREFIX - prefix to use for class file names for the driver family, e.g., MyDriver?
  • VERSION - you can leave it as it is
  • FAMILY_NAME - name you want to use in the pom for the driver family
  • DEVICE_INSTANCE - package name for the specific device. The full package name will become: orca.drivers.${DEVICE_FAMILY}.${DEVICE_INSTANCE}, e.g, mydevice
  • DEVICE_INSTANCE_PREFIX - prefix to use for class file names for the specific device, e.g., MyDevice?
  • DEVICE_INSTANCE_GUID - guid for your device driver. NOTE: you must generate a new one.
  • INSTANCE_NAME - name you want to use in the pom for the specific device
  • TESTS_NAME - name you want to use in the pom for the device family tests

4. After you modify the template settings, invoke the script


5. The script will generate a new directory ($DEST). You can compile the generate code by doing:

cd ${DEST}
mvn install