Class RouteRestController


  • public class RouteRestController
    extends RestController
    RestController for ip tables api. Implementing RestController. Is used for work with http ip-route rest api running in container.
    • Constructor Detail

      • RouteRestController

        public RouteRestController()
    • Method Detail

      • addRoute

        public String addRoute​(Route route,
                               String ip,
                               Integer port)
        Add route string.
        Parameters:
        route - the route
        ip - ip of route
        port - port
        Returns:
        the string
      • deleteRoute

        public String deleteRoute​(Route route,
                                  String ip,
                                  Integer port)
        Delete route string.
        Parameters:
        route - the route
        ip - the ip
        port - the port
        Returns:
        the string
      • getRoutes

        public List<Route> getRoutes​(String ip,
                                     Integer port)
        Gets routers.
        Parameters:
        ip - the ip
        port - the port
        Returns:
        the routers
      • addDefaultGW

        public String addDefaultGW​(Route defaultGW,
                                   String ip,
                                   Integer port)
        Add default gw string.
        Parameters:
        defaultGW - the default gw
        ip - the ip
        port - the port
        Returns:
        the string
      • delDefaultGW

        public String delDefaultGW​(Route defaultGW,
                                   String ip,
                                   Integer port)
        Del default gw string.
        Parameters:
        defaultGW - the default gw
        ip - the ip
        port - the port
        Returns:
        the string
      • delDefaultGw

        public String delDefaultGw​(String ip,
                                   Integer port)
        Remove default gateway
        Parameters:
        ip - ip of container
        port - control port of container
        Returns:
        result of executed action
      • getInterfaces

        public List<NetworkInterface> getInterfaces​(String ip,
                                                    Integer port)
        Gets interfaces.
        Parameters:
        ip - the ip
        port - the port
        Returns:
        the interfaces