Reference Guide

Table Of Contents
private volatile ControllerService controllerService;
...
@Activate
public void activate() {
delegate = new SwitchManager(systemInformationService);
delegate.setAlertService(alertService);
delegate.setAuditLogService(auditLogService);
delegate.startHandlingControllerEvents(controllerService);
}
@Deactivate
public void deactivate() {
delegate.stopHandlingControllerEvents(controllerService);
delegate = null;
}
...
}
From the previous listings it can be seen that the MAC Address is used to relate connected devices
to the devices managed by the sample application.
Some dependencies need to resolved to use the OpenFlow controller services. Open the hm-
bl/pom.xml file and add the XML extract from the following listing to the <dependencies> node.
After updating the POM file update the Eclipse project dependencies (see Updating Project
Dependencies on page 146).
OpenFlow Controller Dependencies:
<dependency>
<groupId>com.hp.sdn</groupId>
<artifactId>sdn-of-lib</artifactId>
<version>${sdn.version}</version>
</dependency>
<dependency>
<groupId>com.hp.sdn</groupId>
<artifactId>sdn-of-ctl</artifactId>
<version>${sdn.version}</version>
</dependency>
Real OpenFlow devices connected to the HP VAN SDN Controller are needed to try the
monitoring capability added in this section. An alternative to real devices is using Mininet [45]
(Used in this example) to create a realistic virtual network.
1. Follow the steps from Posting Alerts on page 212 to add an OpenFlow switch using the HP VAN
SDN Controller’s Rsdoc. Just add the device, no need to modify it since the active state will be
automatically updated based on the device connectivity status. Make sure the MAC Address
used in the posted JSON document (illustrated in Figure 60) matches one of the devices that will
be later connected to the controller.
2. Connect at least one OpenFlow-capable device to the HP VAN SDN Controller’s with the MAC
Address used in previous step. Make sure the device is connected by checking the HP VAN
SDN Controller’s topology view as illustrated in Figure 64. In this example two OpenFlow-
225