'Convenience method for requesting instances with this cluster\'s
settings. All settings (kwargs) except force_flat default to cluster
settings if not provided. Passing force_flat=True ignores spot_bid
completely forcing a flat-rate instance to be requested.'

def create_nodes(self, aliases, image_id=None, instance_type=None, zone=None, placement_group=None, spot_bid=None, force_flat=False):

    spot_bid = (spot_bid or self.spot_bid)
    if force_flat:
        spot_bid = None
    cluster_sg = self.cluster_group.name
    instance_type = (instance_type or self.node_instance_type)
    if (placement_group or (instance_type in static.PLACEMENT_GROUP_TYPES)):
        region = self.ec2.region.name
        if (region not in static.PLACEMENT_GROUP_REGIONS):
            cluster_regions = ',    '.join(static.PLACEMENT_GROUP_REGIONS)
            log.warn(('Placement    groups    are    only    supported    in    the    following    regions:\n%s' % cluster_regions))
            log.warn('Instances    will    not    be    launched    in    a    placement    group')
            placement_group = None
        elif (not placement_group):
            placement_group = self.placement_group.name
    image_id = (image_id or self.node_image_id)
    count = (len(aliases) if (not spot_bid) else 1)
    user_data = self._get_cluster_userdata(aliases)
    kwargs = dict(price=spot_bid, instance_type=instance_type, min_count=count, max_count=count, count=count, key_name=self.keyname, availability_zone_group=cluster_sg, launch_group=cluster_sg, placement=(zone or getattr(self.zone, 'name', None)), user_data=user_data, placement_group=placement_group)
    if self.subnet_id:
        netif = self.ec2.get_network_spec(device_index=0, associate_public_ip_address=self.public_ips, subnet_id=self.subnet_id, groups=[self.cluster_group.id])
        kwargs.update(network_interfaces=self.ec2.get_network_collection(netif))
    else:
        kwargs.update(security_groups=[cluster_sg])
    resvs = []
    if spot_bid:
        security_group_id = self.cluster_group.id
        for alias in aliases:
            if (not self.subnet_id):
                kwargs['security_group_ids'] = [security_group_id]
            kwargs['user_data'] = self._get_cluster_userdata([alias])
            resvs.extend(self.ec2.request_instances(image_id, **kwargs))
    else:
        resvs.append(self.ec2.request_instances(image_id, **kwargs))
    for resv in resvs:
        log.info(str(resv), extra=dict(__raw__=True))
    return resvs
