Tunnel Subsystem
Overview
Tunnel is a type of system resources in ONOS. Tunnel subsystem is built to support tunnel setup for applications. This subsystem is constructed in a processing approach based on the model of producer and consumer (P-C). The P-C model distinguishes two types of applications, tunnel producers and tunnel consumers. A tunnel producer is an application capable of creating, updating and deleting tunnels. Tunnel subsystem is responsible of storing and managing tunnels in ONOS store. A tunnel consumer is an application that can borrow tunnels from ONOS store and return tunnels to ONOS store. A consumer can communicate with producer via ONOS for creating tunnels.
The Model of Tunnel Producer and Consumer
The following figure depicts the tunnel subsystem architecture.
WorkFlow:
- Tunnels are firstly created by tunnel producers and then tunnel consumers can borrow tunnels from the tunnel store.
- When a tunnel a consumer is requesting is not available, the TunnelManager invoke the method of TunnelProvider to inform a producer what the consumer is requesting with tunnel attributes. After a producer creates a tunnel, the tunnel is stored in ONOS TunnelStore. Eventually TunnelStore will notify the consumer that the tunnel is available and the consumer can start to borrow again.
Featuring:
- A TunnelAdminService provides service for administrators to interact with the inventory of tunnels.
- A TunnelService provides services for consumers to borrow, return, and query tunnels.
- A TunnelManager manages interface with multiple Providers via a TunnelProviderService interface and multiple listeners via a TunnelService interface.
- TunnelProviders support their own network protocol libraries or ways to interface with the network.
- A TunnelStore tracks Tunnel model objects and generates TunnelEvent.