

def get_lacp_mode(self, name):
    "Returns the LACP mode for the specified Port-Channel interface\n\n        Args:\n            name(str): The Port-Channel interface name to return the LACP\n                mode for from the configuration\n\n        Returns:\n            The configured LACP mode for the interface.  Valid mode values\n                are 'on', 'passive', 'active'\n\n        "
    members = self.get_members(name)
    if (not members):
        return DEFAULT_LACP_MODE
    for member in self.get_members(name):
        match = re.search('channel-group\\s\\d+\\smode\\s(?P<value>.+)', self.get_block(('^interface %s' % member)))
        return match.group('value')

dataset/ETHPy150Open arista-eosplus/pyeapi/pyeapi/api/interfaces.py PortchannelInterface.get_lacp_mode/original