

def set_members(self, name, members, mode=None):
    "Configures the array of member interfaces for the Port-Channel\n\n        Args:\n            name(str): The Port-Channel interface name to configure the member\n                interfaces\n\n            members(list): The list of Ethernet interfaces that should be\n                member interfaces\n\n            mode(str): The LACP mode to configure the member interfaces to.\n                Valid values are 'on, 'passive', 'active'. When there are\n                existing channel-group members and their lacp mode differs\n                from this attribute, all of those members will be removed and\n                then re-added using the specified lacp mode. If this attribute\n                is omitted, the existing lacp mode will be used for new\n                member additions.\n\n        Returns:\n            True if the operation succeeds otherwise False\n        "
    commands = list()
    grpid = re.search('(\\d+)', name).group()
    current_members = self.get_members(name)
    lacp_mode = self.get_lacp_mode(name)
    if (mode and (mode != lacp_mode)):
        lacp_mode = member
        self.set_lacp_mode(grpid, lacp_mode)
    for member in set(current_members).difference(members):
        commands.append(('interface %s' % member))
        commands.append(('no channel-group %s' % grpid))
    for member in set(members).difference(current_members):
        commands.append(('interface %s' % member))
        commands.append(('channel-group %s mode %s' % (grpid, lacp_mode)))
    return (self.configure(commands) if commands else True)

dataset/ETHPy150Open arista-eosplus/pyeapi/pyeapi/api/interfaces.py PortchannelInterface.set_members/VarMisuse@74/377 `mode`->`member`