Interface FlowObjectiveService


  • @Beta
    public interface FlowObjectiveService
    Service for programming data plane flow rules in manner independent of specific device table pipeline configuration.
    • Method Detail

      • filter

        void filter​(DeviceId deviceId,
                    FilteringObjective filteringObjective)
        Installs the filtering rules onto the specified device.
        Parameters:
        deviceId - device identifier
        filteringObjective - the filtering objective
      • forward

        void forward​(DeviceId deviceId,
                     ForwardingObjective forwardingObjective)
        Installs the forwarding rules onto the specified device.
        Parameters:
        deviceId - device identifier
        forwardingObjective - the forwarding objective
      • next

        void next​(DeviceId deviceId,
                  NextObjective nextObjective)
        Installs the next hop elements into the specified device.
        Parameters:
        deviceId - device identifier
        nextObjective - a next objective
      • allocateNextId

        int allocateNextId()
        Obtains a globally unique next objective.
        Returns:
        an integer
      • initPolicy

        void initPolicy​(java.lang.String policy)
        Provides a composition policy expression.

        WARNING: This method is a no-op in the default implementation.

        Parameters:
        policy - policy expression
      • apply

        default void apply​(DeviceId deviceId,
                           Objective objective)
        Installs the objective onto the specified device.
        Parameters:
        deviceId - device identifier
        objective - the objective
      • getNextMappingsChain

        java.util.Map<org.apache.commons.lang3.tuple.Pair<java.lang.Integer,​DeviceId>,​java.util.List<java.lang.String>> getNextMappingsChain()
        Retrieve all nextObjective to group mappings known to this onos instance, in a format meant for display via REST API, to help with debugging. Applications are only aware of next-Ids, while the group sub-system is only aware of group-ids. This method fills in the gap by providing information on the mapping between next-ids and group-ids done by device-drivers.
        Returns:
        a map of key as a pair of next-id and Device id to group-id mapping. Consumed by the REST API.
      • getNextMappings

        java.util.List<java.lang.String> getNextMappings()
        Retrieve all nextObjective to group mappings known to this onos instance, in a format meant for display on the CLI, to help with debugging. Applications are only aware of next-Ids, while the group sub-system is only aware of group-ids. This method fills in the gap by providing information on the mapping between next-ids and group-ids done by device-drivers.
        Returns:
        a list of strings preformatted by the device-drivers to provide information on next-id to group-id mapping. Consumed by the "obj-next-ids" command on the CLI.
      • getPendingFlowObjectives

        java.util.List<java.lang.String> getPendingFlowObjectives()
        Retrieve all nextObjectives that are waiting to hear back from device drivers, and the forwarding-objectives or next-objectives that are waiting on the successful completion of the original next-objectives. Consumed by the "obj-pending-nexts" command on the CLI.
        Returns:
        a list of strings preformatted to provide information on the next-ids awaiting confirmation from the device-drivers.
      • getFilteringObjQueue

        default com.google.common.collect.ListMultimap<FilteringObjQueueKey,​Objective> getFilteringObjQueue()
        Returns all filtering objective that are waiting for the completion of previous objective with the same FilteringObjQueueKey.
        Returns:
        Filtering objective queue as map
      • getForwardingObjQueue

        default com.google.common.collect.ListMultimap<ForwardingObjQueueKey,​Objective> getForwardingObjQueue()
        Returns all forwarding objective that are waiting for the completion of previous objective with the same ForwardingObjQueueKey.
        Returns:
        Forwarding objective queue as map
      • getNextObjQueue

        default com.google.common.collect.ListMultimap<NextObjQueueKey,​Objective> getNextObjQueue()
        Returns all next objective that are waiting for the completion of previous objective with the same NextObjQueueKey.
        Returns:
        Next objective queue as map
      • clearQueue

        default void clearQueue()