

def create(self, **kwargs):
    release_data = kwargs.pop('release_kwargs', {
        'api': False,
    })
    cluster_data = kwargs.pop('cluster_kwargs', {
        
    })
    if ('release_id' not in cluster_data):
        cluster_data['release_id'] = self.create_release(**release_data).id
    cluster = self.create_cluster(**cluster_data)
    for node_kwargs in kwargs.pop('nodes_kwargs', []):
        if ('cluster_id' not in node_kwargs):
            node_kwargs['cluster_id'] = cluster.id
        node_kwargs.setdefault('api', False)
        if ('pending_roles' not in node_kwargs):
            node_kwargs.setdefault('roles', ['controller'])
        self.create_node(**node_kwargs)
    return cluster

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/base.py EnvironmentManager.create/original