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
Defining Model Objects
The application requires some standard data structures that act as transfer objects [31]. This
example uses a Switch data structure to hold all the information about the Open Flow Switch,
shown in the following listing (note that a better name would be OpenFlowSwitch, but a shorter
name was selected due space limitations illustrating code samples).
Switch.java:
package com.hp.hm.model;
import java.util.UUID;
import com.hp.api.Id;
import com.hp.api.Transportable;
import com.hp.sdn.BaseModel;
import com.hp.sdn.auditlog.AuditLogEntry;
import com.hp.sdn. Model;
public class Switch extends Model<Switch > {
...
private String name;
public Switch() {
super();
}
public Switch(String name) {
super();
this.name = name;
}
public Switch(Id<Switch UUID> id, String name) {
super(id);
this.name = name
}
// Implement setters and getters for mutable fields: name
// Good practice to override the following methods on transport objects:
// equals(Object), hashCode() and toString()
...
}
The Switch model object implements the Transportable interface which is part of the HP VAN SDN
Controller Framework; Model, which extends AbstractModel, offers a partial implementation of this
interface. In order to use such an interface and its partial implementation, the root POM file must
resolve the dependencies. The root POM file is used to resolve the dependencies because these
150