The OF-DPA pipeline is a complex OpenFlow environment. The first tool you should use to develop an understanding of OF-DPA is the Ryu REST API.  This will provide you a way to probe the status of a switch and modify the switch’s behavior from a web browser. The REST API is a hands-on interactive environment that provides an initial learning environment that is much more productive that crafting python scripts to test basic concepts.

We advise using the REST API in conjunction with simple_switch_13 modified for OF-DPA to construct your first learning environment.

Ryu REST Requests

Here is a overview of the Ryu REST API. The details are in ryu.app.ofctl_rest documentation.

REST APIs to get information on switch status

REST APIs about the switch:

  • Get all switches
    controllerURL/stats/switches
  • Get the desc stats
    controllerURL/stats/desc/<switchID>

REST APIs about flows:

  • Get all flows stats
    controllerURL/stats/flow/<switchID>
  • Get flows stats filtered by fields
    controllerURL/stats/flow/<switchID>
    + body message (attributes)
  • Get aggregate flow stats
    controllerURL/stats/aggregateflow/<switchID>
    + body message (attributes)
  • Get aggregate flow stats filtered by fields
    controllerURL/stats/aggregateflow/<switchID>
    + body message (attributes)

REST APIs about ports:

  • Get ports stats
    controllerURL/stats/port/<switchID>
  • Get ports description
    controllerURL/stats/portdesc/<switchID>

REST APIs about queues:

  • Get queues stats
    controllerURL/stats/queue/<switchID>

REST APIs about groups:

  • Get groups stats
    controllerURL/stats/group/<switchID>
  • Get group description stats
    controllerURL/stats/groupdesc/<switchID>
  • Get group features stats
    controllerURL/stats/groupfeatures/<switchID>

REST APIs about meters:

  • Get meters stats
    controllerURL/stats/meter/<switchID>
  • Get meter config stats
    controllerURL/stats/meterconfig/<switchID>
  • Get meter features stats
    controllerURL/stats/meterfeatures/<switchID>

REST APIs to update switch status

REST APIs to update flows

  • Add a flow entry
    controllerURL/stats/flowentry/add
    + body message (attributes)
  • Modify all matching flow entries
    controllerURL/stats/flowentry/modify
    + body message (attributes)
  • Modify flow entry strictly
    controllerURL/stats/flowentry/modify_strict
    + body message (attributes)
  • Delete flow entry strictly
    controllerURL/stats/flowentry/delete_strict
    + body message (attributes)
  • Delete all flow entries
    controllerURL/stats/flowentry/clear/<switchID>
    + body message (attributes)

REST APIs to update group entries:

  • Add a group entry
    controllerURL/stats/groupentry/add
    + body message (attributes)
  • Modify a group entry
    controllerURL/stats/groupentry/modify
    + body message (attributes)
  • Delete a group entry
    controllerURL/stats/groupentry/delete
    + body message (attributes)

REST APIs to update ports:

  • Modify the behavior of the port
    controllerURL/stats/portdesc/modify
    + body message (attributes)

REST APIs to update meters:

  • Add a meter entry
    controllerURL/stats/meterentry/add
    + body message (attributes)
  • Modify a meter entry
    controllerURL/stats/meterentry/modify
    + body message (attributes)
  • Delete a meter entry
    controllerURL/stats/meterentry/delete
    + body message (attributes)