Class TunnelHandler


  • public class TunnelHandler
    extends Object
    Tunnel Handler.
    • Field Detail

      • log

        protected final org.slf4j.Logger log
    • Constructor Detail

      • TunnelHandler

        public TunnelHandler​(org.onosproject.net.link.LinkService linkService,
                             DeviceConfiguration deviceConfiguration,
                             Map<org.onosproject.net.DeviceId,​DefaultGroupHandler> groupHandlerMap,
                             org.onosproject.store.service.EventuallyConsistentMap<String,​Tunnel> tunnelStore)
        Constructs tunnel handler.
        Parameters:
        linkService - link service
        deviceConfiguration - device configuration
        groupHandlerMap - group handler map
        tunnelStore - tunnel store
    • Method Detail

      • createTunnel

        public TunnelHandler.Result createTunnel​(Tunnel tunnel)
        Creates a tunnel.
        Parameters:
        tunnel - tunnel reference to create a tunnel
        Returns:
        WRONG_PATH if the tunnel path is wrong, ID_EXISTS if the tunnel ID exists already, TUNNEL_EXISTS if the same tunnel exists, INTERNAL_ERROR if the tunnel creation failed internally, SUCCESS if the tunnel is created successfully
      • removeTunnel

        public TunnelHandler.Result removeTunnel​(Tunnel tunnelInfo)
        Removes the tunnel with the tunnel ID given.
        Parameters:
        tunnelInfo - tunnel information to delete tunnels
        Returns:
        TUNNEL_NOT_FOUND if the tunnel to remove does not exists, INTERNAL_ERROR if the tunnel creation failed internally, SUCCESS if the tunnel is created successfully.
      • getTunnel

        public Tunnel getTunnel​(String tid)
        Returns the tunnel with the tunnel ID given.
        Parameters:
        tid - Tunnel ID
        Returns:
        Tunnel reference
      • getTunnels

        public List<Tunnel> getTunnels()
        Returns all tunnels.
        Returns:
        list of Tunnels