SDN Controller Programming Guide

66
BECOME_MEMBER to BECOME_SUSPENDNode is not part of the team now
BECOME_MEMBER to BECOME_LEADERRe-election occurred within the team and the local node
is elected the leader
BECOME_LEADER to BECOME_MEMBERRe-election occurred within the team and the local node
became a member. New leader detail are notified through NEW_LEADER event
BECOME_LEADER to BECOME_SUSPENDNode is not part of the team now
Init sequence
First event application receives on controller team join is BECOME_SUSPEND. If the local node is
not part of the team yet, until status change no nofifications are received by the application.
Otherwise one of the following events occur
If the local node is the leader in the controller team application receives BECOME_MEMBER
followed by BECOME_LEADER.
If the local node is the leader, application receives NEW_LEADER notification followed by
BECOME_MEMBER.
Controller applications need to register for health monitor through Application Service.
Application Service monitors the health status of all the mandatory applications and feeds the
information to teaming. If any of the application is unhealthy, node is pulled out of the team. All
the registered applications receive BECOME_SUSPENDED notification. Please refer to Application
Service” section for further detail.
Non mandatory applications are also allowed to join the team using teaming service interfaces.
Availability/non-availability of non mandatory applications doesnt make any difference to the
teaming state of the node. Like mandatory applications, non-mandatory applications also receive
the teaming state change notifications.
Refer to Application Service, for further detail on mandatory & non-mandatory applications.
TeamingService Interfaceprovides the methods to Join/Leave controller team, trigger election,
read the healthy member information etc., TeamingService runs as an OSGI service. Interested
applications need to reference it and consume its services.
Refer to the JavaDocs for TeamingService interface for the detailed explanation of the methods
provided and corresponding functionality.
TeamingService Example:
import com.hp.sdn.team.TeamingService;
import com.hp.sdn.team.TeamListener;
...
@Component
public class TeamingUser implements TeamListener {
static final String APP_ID = "TeamingUserApp";
@Reference(cardinality=ReferenceCardinality.MANDATORY_UNARY,
policy=ReferencePolicy.DYNAMIC)
private volatile TeamingService teamingService;
@Activate
public void activate() {