def setUp(self):
        super(IntegrationClusterTests, self).setUp()
        self.env.create_nodes(self.NODES_NUM, api=True)
        self.cluster = self.env.create_cluster(api=True)
        controllers = 3
        created_controllers = 0
        nodes = []
        self.nodes_ids = []
        for node in self.env.nodes:
            if created_controllers < controllers:
                nodes.append({'id': node.id,
                              'pending_roles': ['controller'],
                              'cluster_id': self.cluster['id'],
                              'pending_addition': True})
                created_controllers += 1
            else:
                nodes.append({'id': node.id,
                              'pending_roles': ['compute'],
                              'cluster_id': self.cluster['id'],
                              'pending_addition': True})
            self.nodes_ids.append(str(node.id))
        self.put_handler('NodeCollectionHandler', nodes)
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/performance/integration/test_cluster.py/IntegrationClusterTests.setUp/original