Class PwaasUtil


  • public final class PwaasUtil
    extends Object
    Utility class with static methods that help parse pseudowire related information and also verify that a pseudowire combination is valid.
    • Method Detail

      • parseVlan

        public static org.onlab.packet.VlanId parseVlan​(String vlan)
        Parses a vlan as a string. Returns the VlanId if provided String can be parsed as an integer or is '' / '*'
        Parameters:
        vlan - string as read from configuration
        Returns:
        VlanId null if error
      • parseMode

        public static L2Mode parseMode​(String mode)
        Parameters:
        mode - RAW or TAGGED
        Returns:
        the L2Mode if input is correct
      • parsePWLabel

        public static org.onlab.packet.MplsLabel parsePWLabel​(String label)
        Parameters:
        label - the mpls label of the pseudowire
        Returns:
        the MplsLabel
        Throws:
        IllegalArgumentException - if label is invalid
      • parsePwId

        public static Integer parsePwId​(String id)
        Parses a string as a pseudowire id - which is an integer.
        Parameters:
        id - The id of pw in string form
        Returns:
        The id of pw as an Integer or null if it failed the conversion.