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
if (dh.isSupported(VlanHandlerFacet.class)) {
// use the Devcie Handler to get the Handler Facet
VlanHandler hf = dh.getFacet(VlanHandlerFacet.class);
// use the Handler Facet to get vlan information
vlans = hf.getVlans();
}
} catch (Exception e) {
e.printStackTrace();
}
return vlans;
}
/**
* Returns the IP address associated with the DeviceInfo object.
*
* @param di DeviceInfo object
* @return IP address for the DeviceInfo object
*/
private IpAddress getIp(DeviceInfo di) {
DeviceIdentity facet = di.getFacet(com.hp.device.DeviceIdentity.class);
return facet.getIpAddress();
}
The method above demonstrated how to get a Handler Facet and use the Handler Facet. This
method is used to obtain information about vlans that have been configured on a device. This
method is passed 3 parameters.
- ds: A reference to the Device Service. The Device Service is used to get the Device object
that contains information about a device.
- ddm: A reference to the Device Driver Service. The Device Driver Service is needed to
allocate a Device Handler. A Device Handler is needed to get a Handler Facet.
- dpid: This parameter contains the OpenFlow Data Path ID for the device. This is the
device that vlan information will be read from.
This method will return a Set of VlanInfo objects for the specified device. Each VlanInfo object
contains information about one vlan.
At line 15 the reference to the Device Service (ds) is used to get a Device object (dev) for the Data
Path ID.
At line 17 the Device object is used to get a DeviceInfo object (di). The DeviceInfo object is
needed to get a Device Handler and to get the IP address of the device. Both are needed to get a
Handler Facet.
At line 19 the Device Driver Service (dds) is used to get a Device Handler that is associated with
the DeviceInfo object. The device’s IP address is needed to create a Device Handler. The local
124