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
Figure 17 Message Factory Class Diagram
The other factories that a developer might use are:
•
MatchFactory—creates matches, used in FlowMods
•
FieldFactory—creates match fields, used in Matches
•
InstructionFactory—creates instructions for FlowMods
•
ActionFactory—creates actions for instructions, (1.0 flowmods), and group buckets
•
PortFactory—creates port descriptions
Note that there are “reserved” values (special port numbers) defined on the Port class
(MAX, IN_PORT, TABLE, NORMAL, FLOOD, ALL, CONTROLLER, LOCAL, ANY)—see
com.hp.of.lib.msg.Port Javadocs
•
QueueFactory—creates queue descriptions
•
MeterBandFactory—creates meter bands, used in MeterMod messages
•
BucketFactory—creates buckets, used in GroupMod messages
•
TableFeatureFactory—creates table feature descriptions
Note that application developers should not ever need to invoke “parse” or “encode” methods on
any of the factories; those methods are reserved for use by the Core Controller.
An example: creating a FlowMod message
The following listing shows an example of how to create a flowmod message:
Flowmod Message Example:
public class SampleFlowModMessageCreation {
private static final ProtocolVersion PV = ProtocolVersion.V_1_3;
private static final long COOKIE = 0x00002468;
private static final TableId TABLE_ID = TableId.valueOf(200);
31