'Block until the provided nodes are considered running.
Node is considered running when it\'s state is "running" and when it has
at least one IP address assigned.
:param nodes: List of nodes to wait for.
:type nodes: ``list`` of :class:`.Node`
:param wait_period: How many seconds to wait between each loop
iteration. (default is 3)
:type wait_period: ``int``
:param timeout: How many seconds to wait before giving up.
(default is 600)
:type timeout: ``int``
:param ssh_interface: Which attribute on the node to use to obtain
an IP address. Valid options: public_ips,
private_ips. Default is public_ips.
:type ssh_interface: ``str``
:param force_ipv4: Ignore IPv6 addresses (default is True).
:type force_ipv4: ``bool``
:param ex_list_nodes_kwargs: Optional driver-specific keyword arguments
which are passed to the ``list_nodes``
method.
:type ex_list_nodes_kwargs: ``dict``
:return: ``[(Node, ip_addresses)]`` list of tuple of Node instance and
list of ip_address on success.
:rtype: ``list`` of ``tuple``'

def wait_until_running(self, nodes, wait_period=3, timeout=600, ssh_interface='public_ips', force_ipv4=True, ex_list_nodes_kwargs=None):

    ex_list_nodes_kwargs = (ex_list_nodes_kwargs or {})
    def is_supported(address):
        '\n                                                Return    True    for    supported    address.\n                                                '
        if (force_ipv4 and (not is_valid_ip_address(address=address, family=socket.AF_INET))):
            return False
        return True
    def filter_addresses(addresses):
        '\n                                                Return    list    of    supported    addresses.\n                                                '
        return [address for address in addresses if is_supported(address)]
    if (ssh_interface not in ['public_ips', 'private_ips']):
        raise ValueError(('ssh_interface    argument    must    either    be' + 'public_ips    or    private_ips'))
    start = time.time()
    end = (start + timeout)
    uuids = set([node.uuid for node in nodes])
    while (time.time() < end):
        all_nodes = self.list_nodes(**ex_list_nodes_kwargs)
        matching_nodes = list([node for node in all_nodes if (node.uuid in uuids)])
        if (len(matching_nodes) > len(uuids)):
            found_uuids = [node.uuid for node in matching_nodes]
            msg = (('Unable    to    match    specified    uuids    ' + ('(%s)    with    existing    nodes.    Found    ' % uuids)) + ('multiple    nodes    with    same    uuid:    (%s)' % found_uuids))
            raise LibcloudError(value=msg, driver=self)
        running_nodes = [node for node in matching_nodes if (node.state == NodeState.RUNNING)]
        addresses = [filter_addresses(getattr(node, ssh_interface)) for node in running_nodes]
        if (len(running_nodes) == len(uuids) == len(addresses)):
            return list(zip(running_nodes, addresses))
        else:
            time.sleep(wait_period)
            continue
    raise LibcloudError(value=('Timed    out    after    %s    seconds' % timeout), driver=self)
