

@atomic.action_timer('nova.boot_servers')
def _boot_servers(self, image_id, flavor_id, requests, instances_amount=1, auto_assign_nic=False, **kwargs):
    'Boot multiple servers.\n\n        Returns when all the servers are actually booted and are in the\n        "Active" state.\n\n        :param image_id: ID of the image to be used for server creation\n        :param flavor_id: ID of the flavor to be used for server creation\n        :param requests: Number of booting requests to perform\n        :param instances_amount: Number of instances to boot per each request\n        :param auto_assign_nic: bool, whether or not to auto assign NICs\n        :param kwargs: other optional parameters to initialize the servers\n\n        :returns: List of created server objects\n        '
    if (auto_assign_nic and (not kwargs.get('nics', False))):
        nic = self._pick_random_nic()
        if nic:
            kwargs['nics'] = nic
    name_prefix = self.generate_random_name()
    for i in range(requests):
        self.clients('nova').servers.create(('%s_%d' % (name_prefix, servers)), image_id, flavor_id, min_count=instances_amount, max_count=instances_amount, **kwargs)
    servers = [s for s in self.clients('nova').servers.list() if s.name.startswith(name_prefix)]
    time.sleep(CONF.benchmark.nova_server_boot_prepoll_delay)
    servers = [utils.wait_for(server, ready_statuses=['ACTIVE'], update_resource=utils.get_from_manager(), timeout=CONF.benchmark.nova_server_boot_timeout, check_interval=CONF.benchmark.nova_server_boot_poll_interval) for server in servers]
    return servers

dataset/ETHPy150Open openstack/rally/rally/plugins/openstack/scenarios/nova/utils.py NovaScenario._boot_servers/VarMisuse@113/388 `i`->`servers`