def get_ip_addresses(self, task):
    'Get IP addresses for all ports in `task`.\n\n        :param task: a TaskManager instance.\n        :returns: List of IP addresses associated with task.ports.\n        '
    client = _build_client(task.context.auth_token)
    failures = []
    ip_addresses = []
    for port in task.ports:
        try:
            port_ip_address = self._get_port_ip_address(task, port.uuid, client)
            ip_addresses.append(port_ip_address)
        except (exception.FailedToGetIPAddressOnPort, exception.InvalidIPv4Address):
            failures.append(port.uuid)
    if failures:
        LOG.warn(_LW('Some errors were encountered on node %(node)s while retrieving IP address on the following ports: %(ports)s.'), {'node': task.node.uuid, 'ports': failures})
    return ip_addresses
Get IP addresses for all ports in `task`.

:param task: a TaskManager instance.
:returns: List of IP addresses associated with task.ports.
def get_ip_addresses(self, task):
    'Get IP addresses for all ports in `task`.\n\n        :param task: a TaskManager instance.\n        :returns: List of IP addresses associated with task.ports.\n        '
    client = _build_client(task.context.auth_token)
    failures = []
    ip_addresses = []
    for port in task.ports:
        try:
            port_ip_address = self._get_port_ip_address(task, port.uuid, client)
            ip_addresses.append(port_ip_address)
        except (exception.FailedToGetIPAddressOnPort, exception.InvalidIPv4Address):
            failures.append(port.uuid)
    if failures:
        LOG.warn(_LW('Some errors were encountered on node %(node)s while retrieving IP address on the following ports: %(ports)s.'), {'node': task.node.uuid, 'ports': failures})
    return ip_addresses