def vlan_range_to_list(vlans):
    """Converts single VLAN or range of VLANs into a list

    Example:
        Input (vlans):  2-4,8,10,12-14 OR 3, OR 2,5,10
        Returns: [2,3,4,8,10,12,13,14] OR [3] or [2,5,10]

    Args:
        vlans (str): User input parameter of a VLAN or range of VLANs

    Returns:
        list: ordered list of all VLAN(s) in range

    """
    final = []
    list_of_ranges = []
    if ',' in vlans:
        list_of_ranges = vlans.split(',')
    else:
        list_of_ranges.append(vlans)
    for each in list_of_ranges:
        # check to see if it's a single VLAN (not a range)
        if '-' not in each:
            final.append(each)
        else:
            low = int(each.split('-')[0])
            high = int(each.split('-')[1])
            for num in range(low, high+1):
                vlan = str(num)
                final.append(vlan)

    return final