From c5aee5c1d79047f6492ba55b0878a3865d208db7 Mon Sep 17 00:00:00 2001 From: afrid18 Date: Tue, 2 Apr 2024 16:44:00 +0530 Subject: [PATCH] routes: new /suite/default endpoint Created a new /suite/default endpoint for scheduling default jobs. This work is done as a part of GSoC'24 pre-task Signed-off-by: afrid18 --- src/teuthology_api/routes/suite.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/teuthology_api/routes/suite.py b/src/teuthology_api/routes/suite.py index 13f1905..31f8e78 100644 --- a/src/teuthology_api/routes/suite.py +++ b/src/teuthology_api/routes/suite.py @@ -25,3 +25,24 @@ def create_run( args = args.model_dump(by_alias=True) args["--user"] = get_username(request) return run(args, logs, access_token) + + +@router.post("/default", status_code=200) +def create_run_default( + request: Request, + access_token: str = Depends(get_token), + logs: bool = False, +): + args = { + "--ceph": "wip-leonidc-20240331-00", # 'main' build not found on shaman + "--ceph-repo": "https://github.com/ceph/ceph-ci.git", + "--suite_repo": "https://github.com/ceph/ceph-ci.git", + "--suite": "teuthology:no-ceph", + "--machine-type": "testnode", + "--distro": "ubuntu", + "--distro-version": "20.04", + "": ["/teuthology/containerized_node.yaml"] + } + default_args = SuiteArgs(**args).model_dump(by_alias=True) + default_args["--user"] = get_username(request) + return run(default_args, logs, access_token)