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
Open the hm-root/pom.xml file and add the XML extract from the following list to the
<dependencies> node. After updating the POM file update the Eclipse project dependencies (see
Updating Project Dependencies on page 146).
HP SDN Controller Framework Common Dependencies:
<dependency>
<groupId>com.hp.util</groupId>
<artifactId>hp-util-misc</artifactId>
<version>${hp-util.version}</version>
</dependency>
<dependency>
<groupId>com.hp.util</groupId>
<artifactId>hp-util-api</artifactId>
<version>${hp-util.version}</version>
</dependency>
<dependency>
<groupId>com.hp.util</groupId>
<artifactId>hp-util-ip</artifactId>
<version>${hp-util.version}</version>
</dependency>
<dependency>
<groupId>com.hp.sdn</groupId>
<artifactId>sdn-common-model</artifactId>
<version>${sdn.version}</version>
</dependency>
If the application offers, and this sample application does, a way to retrieve model objects—in this
example Open Flow switches—based on some kind of filter, then it is a good practice to create a
POJO class [19] that represents the filter. Creating such a class will help decoupling the service
consumer from the way filtering is implemented in lower level layers (like the data store service or
database). The HP VAN SDN Controller Framework provides a set of classes that represent filter
conditions which can be used to compose a filter.
These classes include:
•
Comparable Condition—Used to represent the following conditions: Less than, less than or
equal to, equal, greater than or equal to and greater than.
•
Equality Condition—Used to represent the following conditions: Equal and unequal.
•
Interval Condition—Used to represent the following conditions: In and not in.
•
Set Condition—Used to represent the following conditions: In and not in.
•
String Condition—Used to represent the following conditions: Equal, unequal, starts with,
contains and ends with.
Based on these conditions we will create a filter for the Open Flow switch class as illustrated in the
following listing.
SwitchFilter.java:
package com.hp.hm.model;
153