# Path: pyeapi/utils.py
# def make_iterable(value):
#     """Converts the supplied value to a list object
# 
#     This function will inspect the supplied value and return an
#     iterable in the form of a list.
# 
#     Args:
#         value (object): An valid Python object
# 
#     Returns:
#         An iterable object of type list
#     """
#     if sys.version_info <= (3, 0):
#         # Convert unicode values to strings for Python 2
#         if isinstance(value, unicode):
#             value = str(value)
#     if isinstance(value, str) or isinstance(value, dict):
#         value = [value]
# 
#     if sys.version_info <= (3, 3):
#         if not isinstance(value, collections.Iterable):
#             raise TypeError('value must be an iterable object')
#     else:
#         if not isinstance(value, collections.abc.Iterable):
#             raise TypeError('value must be an iterable object')
# 
#     return value


import re
from pyeapi.api import EntityCollection
from pyeapi.utils import make_iterable
            True if the create operation succeeds otherwise False.
        """
        string = 'switchport trunk allowed vlan'
        command = self.command_builder(string, value=value, default=default,
                                       disable=disable)
        return self.configure_interface(name, command)

    def set_trunk_groups(self, intf, value=None, default=False, disable=False):
        """Configures the switchport trunk group value

        Args:
            intf (str): The interface identifier to configure.
            value (str): The set of values to configure the trunk group
            default (bool): Configures the trunk group default value
            disable (bool): Negates all trunk group settings

        Returns:
            True if the config operation succeeds otherwise False
        """
        if default:
            cmd = 'default switchport trunk group'
            return self.configure_interface(intf, cmd)

        if disable:
            cmd = 'no switchport trunk group'
            return self.configure_interface(intf, cmd)

        current_value = self.get(intf)['trunk_groups']
        failure = False


# Path: pyeapi/utils.py
# def make_iterable(value):
#     """Converts the supplied value to a list object
# 
#     This function will inspect the supplied value and return an
#     iterable in the form of a list.
# 
#     Args:
#         value (object): An valid Python object
# 
#     Returns:
#         An iterable object of type list
#     """
#     if sys.version_info <= (3, 0):
#         # Convert unicode values to strings for Python 2
#         if isinstance(value, unicode):
#             value = str(value)
#     if isinstance(value, str) or isinstance(value, dict):
#         value = [value]
# 
#     if sys.version_info <= (3, 3):
#         if not isinstance(value, collections.Iterable):
#             raise TypeError('value must be an iterable object')
#     else:
#         if not isinstance(value, collections.abc.Iterable):
#             raise TypeError('value must be an iterable object')
# 
#     return value


# Path: pyeapi/api/switchports.py
import re
from pyeapi.api import EntityCollection
from pyeapi.utils import make_iterable

            True if the create operation succeeds otherwise False.
        """
        string = 'switchport trunk allowed vlan'
        command = self.command_builder(string, value=value, default=default,
                                       disable=disable)
        return self.configure_interface(name, command)

    def set_trunk_groups(self, intf, value=None, default=False, disable=False):
        """Configures the switchport trunk group value

        Args:
            intf (str): The interface identifier to configure.
            value (str): The set of values to configure the trunk group
            default (bool): Configures the trunk group default value
            disable (bool): Negates all trunk group settings

        Returns:
            True if the config operation succeeds otherwise False
        """
        if default:
            cmd = 'default switchport trunk group'
            return self.configure_interface(intf, cmd)

        if disable:
            cmd = 'no switchport trunk group'
            return self.configure_interface(intf, cmd)

        current_value = self.get(intf)['trunk_groups']
        failure = False


        value = make_iterable(value)