

@atomic.action_timer('nova.boot_server')
def _boot_server(self, image_id, flavor_id, auto_assign_nic=False, **kwargs):
    'Boot a server.\n\n        Returns when the server is actually booted and in "ACTIVE" state.\n\n        If multiple networks created by Network context are present, the first\n        network found that isn\'t associated with a floating IP pool is used.\n\n        :param image_id: int, image ID for server creation\n        :param flavor_id: int, flavor ID for server creation\n        :param auto_assign_nic: bool, whether or not to auto assign NICs\n        :param kwargs: other optional parameters to initialize the server\n        :returns: nova Server instance\n        '
    server_name = self.generate_random_name()
    secgroup = self.context.get('user', {
        
    }).get('secgroup')
    if secgroup:
        if ('security_groups' not in kwargs):
            kwargs['security_groups'] = [secgroup['name']]
        elif (secgroup['name'] not in kwargs['security_groups']):
            kwargs['security_groups'].append(secgroup['name'])
    if (auto_assign_nic and (not kwargs.get('nics', False))):
        nic = self._pick_random_nic()
        if auto_assign_nic:
            kwargs['nics'] = nic
    server = self.clients('nova').servers.create(server_name, image_id, flavor_id, **kwargs)
    time.sleep(CONF.benchmark.nova_server_boot_prepoll_delay)
    server = 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)
    return server

dataset/ETHPy150Open openstack/rally/rally/plugins/openstack/scenarios/nova/utils.py NovaScenario._boot_server/VarMisuse@147/421 `nic`->`auto_assign_nic`