Reference Guide
Table Of Contents
- 1 Introduction
- 2 Establishing Your Test and Development Environments
- 3 Developing Applications
- Introduction
- Authentication
- REST API
- Audit Logging
- Alert Logging
- Configuration
- High Availability
- OpenFlow
- Metrics Framework
- GUI
- SKI Framework - Overview
- SKI Framework - Navigation Tree
- SKI Framework - Hash Navigation
- SKI Framework - View Life-Cycle
- SKI Framework - Live Reference Application
- UI Extension
- Introduction
- Controller Teaming
- Distributed Coordination Service
- Persistence
- Backup and Restore
- Device Driver Framework
- 4 Application Security
- 5 Including Debian Packages with Applications
- 6 Sample Application
- Application Description
- Creating Application Development Workspace
- Application Generator (Automatic Workspace Creation)
- Creating Eclipse Projects
- Updating Project Dependencies
- Building the Application
- Installing the Application
- Application Code
- 7 Testing Applications
- 8 Built-In Applications
- Appendix A
- Appendix B
- Bibliography
In the following code examples, it is assumed that a reference to the controller service
implementation has been stored in the field
cs:
private ControllerService cs = ...;
Datapath Information
Information about datapaths that have connected to the controller is available; either all connected
datapaths, or a datapath with a given ID:
•
getAllDataPathInfo() : Set<DataPathInfo>
•
getDataPathInfo(DataPathId) : DataPathInfo
The DataPathInfo API provides information about a datapath:
•
the datapath ID
•
the negotiated protocol version
•
the time at which the datapath connected to the controller
•
the time at which the last message was received from the datapath
•
the list of OpenFlow-enabled ports
•
the reported number of buffers
•
the reported number of tables
•
the set of capabilities
•
the remote (IP) address of the connection
•
the remote (TCP) port of the connection
•
a textual description
•
the manufacturer
•
the hardware version
•
the software version
•
the serial number
•
a device type identifier
The following listing shows an example of how to use Datapath information:
Datapath Information Example:
DataPathId dpid = DataPathId.valueOf("00:00:00:00:00:00:00:01");
DataPathInfo dpi;
try {
dpi = cs.getDataPathInfo(dpid);
log.info("Datapath with ID {} is connected", dpid);
log.info("Negotiated protocol version is {}", dpi.negotiated());
for (Port p: dpi.ports()) {
...
}
} catch (NotFoundException e) {
log.warn("Datapath with ID {} is not connected", dpid);
}
35