示例#1
0
    def delete_by_uuid(cls, del_uuid):
        deployment = Deployment.query.filter_by(uuid=del_uuid)
        if deployment:
            from models.execution import Execution
            linked_executions = Execution.query.filter_by(deployment_uuid=del_uuid)
            for result in linked_executions:
                Execution.delete_by_uuid(result.uuid)

            deployment.delete()
            # rmtree(self.fq_storage_path)
            db_session.commit()
def delete_execution_by_uuid(execution_uuid):  # noqa: E501
    """Delete an execution

    Deletes the execution with the given UUID and all elements depending on it # noqa: E501

    :param execution_uuid: UUID of the execution to delete
    :type execution_uuid: str

    :rtype: Execution
    """
    execution = ExecutionImpl.delete_by_uuid(execution_uuid)
    return execution_schema.dump(execution)