'Enumerates the interfaces.'

@flow.StateHandler()
def EnumerateInterfaces(self, responses):

    if (not (responses.success and responses)):
        self.Log(('Could    not    enumerate    interfaces:    %s' % responses.status))
        return
    with self._CreateClient() as client:
        interface_list = client.Schema.INTERFACES()
        mac_addresses = []
        ip_addresses = []
        for response in responses:
            interface_list.Append(response)
            if (response.mac_address and (response.mac_address != ('\x00' * len(response.mac_address)))):
                mac_addresses.append(response.mac_address.human_readable_address)
            for address in response.addresses:
                if (address.human_readable_address not in self.FILTERED_IPS):
                    ip_addresses.append(address.human_readable_address)
        client.Set(client.Schema.MAC_ADDRESS('\n'.join(mac_addresses)))
        client.Set(client.Schema.HOST_IPS('\n'.join(ip_addresses)))
        client.Set(client.Schema.INTERFACES(interface_list))
