'Create nodes with the given names.
:param reactor: The reactor.
:param name: The names of the nodes.
:type name: list of str
:param str distribution: The name of the distribution to
install on the nodes.
:param dict metadata: Metadata to associate with the nodes.
:return: A list of ``Deferred``s each firing with an INode
when the corresponding node is created.   The list has
the same order as :param:`names`.'

def create_nodes(self, reactor, names, distribution, metadata={}):

    size = self._default_size
    image_name = self._image_names[distribution]
    create_node_arguments = self._create_node_arguments()
    def handle_create_error(failure, name):
        Message.log(message_type='flocker:provision:libcloud:create_node:failed', node_name=name)
        write_failure(failure)
        d = self._async_cleanup_node_named(reactor, name)
        d.addCallback((lambda _: failure))
        return d
    def make_node(node):
        public_address = _filter_ipv4(node.public_ips)[0]
        if isinstance(public_address, unicode):
            public_address = public_address.encode('ascii')
        if self._use_private_addresses:
            private_address = _filter_ipv4(node.private_ips)[0]
        else:
            private_address = None
        if isinstance(private_address, unicode):
            private_address = private_address.encode('ascii')
        Message.log(message_type='flocker:provision:libcloud:node_created', name=node.name, id=node.id, public_address=public_address, private_address=private_address)
        return LibcloudNode(provisioner=self, node=node, address=public_address, private_address=private_address, distribution=distribution)
    action = start_action(action_type=u'flocker:provision:libcloud:create_nodes', instance_count=len(names), distribution=distribution, size=size, metadata=metadata)
    with action.context():
        results = []
        for name in names:
            Message.log(message_type=u'flocker:provision:libcloud:creating_node', node_name=name)
            d = maybeDeferred(self._driver.create_node, name=name, image=get_image(self._driver, image_name), size=get_size(self._driver, size), ex_keyname=self._keyname, ex_metadata=metadata, **create_node_arguments)
            d = DeferredContext(d)
            d.addCallbacks((lambda node: self._wait_until_running(reactor, node)), errback=handle_create_error, errbackArgs=(name,))
            d.addCallback(make_node)
            results.append(d.result)
        action_completion = DeferredContext(DeferredList(results))
        action_completion.addActionFinish()
        return results
