Skip to content

Commit

Permalink
routes: new /suite/default endpoint
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
afrid18 committed Apr 2, 2024
1 parent f0a9d59 commit c5aee5c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/teuthology_api/routes/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"<config_yaml>": ["/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)

0 comments on commit c5aee5c

Please sign in to comment.