

def create_subtask(self, name, **kwargs):
    if (not name):
        raise ValueError('Subtask name not specified')
    task = Task(name=name, cluster=self.cluster, **kwargs)
    self.subtasks.append(task)
    db().flush()
    return task

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/db/sqlalchemy/models/task.py Task.create_subtask/original