Class ConnectivityIntent

    • Constructor Detail

      • ConnectivityIntent

        protected ConnectivityIntent​(ApplicationId appId,
                                     Key key,
                                     java.util.Collection<NetworkResource> resources,
                                     TrafficSelector selector,
                                     TrafficTreatment treatment,
                                     java.util.List<Constraint> constraints,
                                     int priority,
                                     ResourceGroup resourceGroup)
        Creates a connectivity intent that matches on the specified selector and applies the specified treatment.

        Path will be optimized based on the first constraint if one is given.

        Parameters:
        appId - application identifier
        key - explicit key to use for intent
        resources - required network resources (optional)
        selector - traffic selector
        treatment - treatment
        constraints - optional prioritized list of constraints
        priority - priority to use for flows generated by this intent
        resourceGroup - resource group for this intent
        Throws:
        java.lang.NullPointerException - if the selector or treatment is null
      • ConnectivityIntent

        protected ConnectivityIntent()
        Constructor for serializer.
    • Method Detail

      • selector

        public TrafficSelector selector()
        Returns the match specifying the type of traffic.
        Returns:
        traffic match
      • treatment

        public TrafficTreatment treatment()
        Returns the action applied to the traffic.
        Returns:
        applied action
      • constraints

        public java.util.List<Constraint> constraints()
        Returns the set of connectivity constraints.
        Returns:
        list of intent constraints
      • resources

        protected static java.util.Collection<NetworkResource> resources​(java.util.Collection<NetworkResource> resources,
                                                                         java.util.Collection<Link> links)
        Produces a collection of network resources from the given links.
        Parameters:
        resources - base resources
        links - collection of links
        Returns:
        collection of resources
      • resources

        protected static java.util.Collection<NetworkResource> resources​(java.util.Collection<Link> links)
        Produces a collection of network resources from the given links.
        Parameters:
        links - collection of links
        Returns:
        collection of link resources