

@logging.log_task_wrapper(LOG.info, _('Enter context: `Sahara Cluster`'))
def setup(self):
    utils.init_sahara_context(self)
    self.context['sahara']['clusters'] = {
        
    }
    wait_dict = {
        
    }
    for (user, tenant_id) in rutils.iterate_per_tenants(self.context['users']):
        image_id = self.context['tenants'][tenant_id]['sahara']['image']
        floating_ip_pool = self.config.get('floating_ip_pool')
        temporary_context = {
            'user': user,
            'tenant': self.context['tenants'][tenant_id],
            'task': self.context['task'],
        }
        scenario = utils.SaharaScenario(context=temporary_context)
        cluster = scenario._launch_cluster(plugin_name=self.config['plugin_name'], hadoop_version=self.config['hadoop_version'], flavor_id=self.config.get('flavor_id'), master_flavor_id=self.config['master_flavor_id'], worker_flavor_id=self.config['worker_flavor_id'], workers_count=self.config['workers_count'], image_id=image_id, floating_ip_pool=floating_ip_pool, volumes_per_node=self.config.get('volumes_per_node'), volumes_size=self.config.get('volumes_size', 1), auto_security_group=self.config.get('auto_security_group', True), security_groups=self.config.get('security_groups'), node_configs=self.config.get('node_configs'), cluster_configs=self.config.get('cluster_configs'), enable_anti_affinity=self.config.get('enable_anti_affinity', False), enable_proxy=self.config.get('enable_proxy', False), wait_active=False)
        self.context['tenants'][tenant_id]['sahara']['cluster'] = cluster.id
        wait_dict[cluster] = scenario.clients('sahara')
    bench_utils.wait_for(resource=wait_dict, update_resource=self.update_clusters_dict, is_ready=self.all_clusters_active, timeout=CONF.benchmark.sahara_cluster_create_timeout, check_interval=CONF.benchmark.sahara_cluster_check_interval)

dataset/ETHPy150Open openstack/rally/rally/plugins/openstack/context/sahara/sahara_cluster.py SaharaCluster.setup/original