Class ConnectivityIntent

    • Constructor Detail

      • ConnectivityIntent

        protected ConnectivityIntent​(ApplicationId appId,
                                     Key key,
                                     Collection<NetworkResource> resources,
                                     TrafficSelector selector,
                                     TrafficTreatment treatment,
                                     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:
        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 List<Constraint> constraints()
        Returns the set of connectivity constraints.
        Returns:
        list of intent constraints
      • resources

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