Writing a REST application is one of the quickest and perhaps easiest way for most people to start harnessing the power of an OpenFlow network.  

To write a REST application in any programming language of your choice, you will typically go through the following steps:

  1. Determine the "network services/information" your application needs
  2. Check out the Floodlight REST API pre-v1.0 page to find the REST APIs that provide these services
    1. If its found, take note of the REST API syntax, input arguments, and available options
    2. If its not found, the services/information may still be available in Floodlight but has not been exposed through a REST API yet.  In this case, you should: 1) email the floodlight-dev list to discuss what you need and 2) after consulting with the developer community, you may implement and contribute a REST API to expose the service.  (The Floodlight team at Big Switch is drafting a proposed syntax and set of REST APIs for Floodlight and will soon be available for community suggestions)
    3. if its not found and the service simply does not exist in Floodlight at this time, you should 1) 1) email the floodlight-dev list to discuss what you need and 2) after consulting with the developer community,based on whether it is more suitable as a controller module or an application module, you may implement and contribute the Java module.
  3. With all needed REST API calls, design and compose your application.
  4. Implement tests for it and contribute your application and/or added service modules/APIs back to Floodlight. 

An example of this can be found from the python Circuit Pusher application released with Floodlight under the floodlight/apps directory. 

The Circuit Pusher example demonstrates how to create a static single path circuit between two IP hosts A and B in a single OpenFlow cluster.  Following the design approach above:

  1. The needed network services/information:
  2. From the Floodlight REST API pre-v1.0s:
  3. Application design: (source)
  4. Complete integration test and submit code to floodlight!