Fixed main issues of SwitchManager
SwitchManager is feeded from listeners
FlowCapableNodeListener - FlowCapableNode from OPER DS on BASE scope of OF augmentation
OfOverlayNodeListener - OfOverlayNodeConfig from CONF DS on BASE scope of OF overlay augmentation
FlowCapableNodeConnectorListener - FlowCapableNodeConnector from OPER DS on BASE scope of OF augmentation
SwitchState is composed based on listeners' data:
FlowCapableNode, OfOverlayNodeConfig, and FlowCapableNodeConnector-s
SwitchManager keeps track of SwitcheState-s in Map.
SwitchState can have 3 types of status:
DISCONNECTED - SwitchState does not contain FlowCapableNode.
PREPARING - SwitchState contains FlowCapableNode but information about tunnel(tunnelPort, tunnelIp) is missing
READY - SwitchState contains FlowCapableNode, tunnelPort and tunnelIp
Even status of SwitchState is DISCONNECTED the SwitchManager still keeps track
until SwitchState contains configuration. This is because FlowCapableNode can disappear from OPER DS but
additional OfOverlayNodeConfig data are still in CONF DS.
Without this tracking we would loose OfOverlayNodeConfig data when SwitchState had been removed.
Change-Id: I7781fdfb0e306568587a1c69c2ab9f90e205180d
Signed-off-by: Martin Sunal <msunal@cisco.com>
12 files changed: