Interface FabricPipeconfService


  • @Beta
    public interface FabricPipeconfService
    A service to build fabric.p4-related pipeconfs.

    This service is provided such that third-party apps can build vendor-specific versions of the fabric.p4 pipeconf, without needing to depend on fabric.p4 behaviour implementations at compile time.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.onosproject.net.pi.model.PiPipeconf buildFabricPipeconf​(org.onosproject.net.pi.model.DefaultPiPipeconf.Builder builder, java.lang.String profile, java.net.URL p4InfoUrl, java.net.URL cpuPortUrl)
      Builds a pipeconf for fabric.p4.
    • Method Detail

      • buildFabricPipeconf

        org.onosproject.net.pi.model.PiPipeconf buildFabricPipeconf​(org.onosproject.net.pi.model.DefaultPiPipeconf.Builder builder,
                                                                    java.lang.String profile,
                                                                    java.net.URL p4InfoUrl,
                                                                    java.net.URL cpuPortUrl)
        Builds a pipeconf for fabric.p4.

        This method expects as input a pipeconf builder already populated with the pipeconf ID (i.e., DefaultPiPipeconf.Builder.withId(org.onosproject.net.pi.model.PiPipeconfId)) and target-specific extensions (i.e., DefaultPiPipeconf.Builder.addExtension(org.onosproject.net.pi.model.PiPipeconf.ExtensionType, java.net.URL). The implementation takes care of adding all the necessary behavior implementations specific to fabric.p4, depending on the profile name, e.g., adding INT-related behaviors for fabric-int profile).

        Finally, the implementation takes care of parsing the given P4Info file (in text format) as pipeconf pipeline model, and setting the pipeconf CPU port to the one contained in the given file URL.

        Parameters:
        builder - pipeconf builder already populated with ID and target-specific extensions
        profile - fabric.p4 profile name
        p4InfoUrl - URL to P4Info file in text format
        cpuPortUrl - URL to txt file containing the CPU port
        Returns:
        pipeconf instance