From b7eb131d224f36c53895733ccbf7f48ec113b566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= Date: Thu, 30 Jun 2016 10:54:24 +0200 Subject: [PATCH] Clean up TODOs and pretend the submission works MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Petr Ĺ abata --- rida.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rida.py b/rida.py index 892b9b8f..fdf3c7dd 100755 --- a/rida.py +++ b/rida.py @@ -29,12 +29,11 @@ This is the implementation of the orchestrator's public RESTful API. """ -# TODO: Handle GET and POST requests. # TODO; Validate the input modulemd & spec inputs. +# This requires SCM classes to be ready. # TODO: Update the PDC dependency graph. +# This is done via messaging and is closely related to the next point. # TODO: Emit messages about module submission. -# TODO: Set the build state to init once the module NVR is known. -# TODO: Set the build state to wait once we're done. from flask import Flask, request from rida import config, database @@ -91,7 +90,8 @@ def submit_build(): module.state = "wait" db.session.add(module) db.session.commit() - return "Not implemented yet.", 501 + # XXX: Okay, we're pretending here... + return json.dumps({"id": module.id}), 201 @app.route("/rida/module-builds/", methods=["GET"]) def query_builds():