...
Getting information about configured interfaces, the VPLS configuration and the hosts attached
Installation of the related intents (so of the flows) to let the hosts communicate
Information collection
Information collection is grouped in two main functions called in sequence, that represent the main steps that the application performs at each operational cycle:
getConfigCPoints(...): it parses the ONOS interfaces configuration, looking for two or more attachment points with interfaces configured with the same VLAN Id and with no IP addresses configured. Looking for interfaces without an IP addresses means looking for pure Layer 2 interfaces and it’s done to don’t conflict with Layer 3 ONOS applications that use the same configuration mechanism. The interfaces found are grouped by VLAN Id (in a HashMap) and returned to the next method, pairAvailableHosts(...) vplsConfigService.getVplsNetworks(): retrieves all VPLS information. Each VPLS information contains name of VPLS and interfaces from this VPLS.
pairAvailableHosts(...): it parses (if not null) the data structure received from getConfigCPoints(...) and for each interface found finds hosts in the Host Service matching with the interfaces configured. If hosts are found, the original data structure is modified: the MAC addresses of the hosts found is bound to the related interfaces discovered in the configuration. The final data structure is then returned.
Intent installation
VPLS relies the on the intent framework has and uses a stand-alone component called Intent Installer to communicate with it. The Intent Installer analyzes the data returned by pairAvailableHosts and creates the intent installation requests. VPLS installs:
...