ceph / teuthology-api

A REST API to execute teuthology commands.
MIT License
2 stars 10 forks source link

[feature] Add presets #62

Open Devansh3712 opened 5 months ago

Devansh3712 commented 5 months ago

Description

Presets allow users to save teuthology-suite command config with a custom name that can be used again.

This PR includes:

For testing this PR,

Workflow

The create, update and delete endpoints required a user to be logged in. Users can read any stored preset, but cannot modify or delete them.

Creating a Preset

Get a Preset

Get All Presets of a User

Update a Preset

Delete a Preset

A DELETE request to the endpoint /presets/delete/<preset_id>

Pulpito-ng Integration

Most of the teuthology commands have default parameters, only some such as suite and branch need to be changed according to the user's need. On the frontend, we can present default values for the command parameters and users can change them accordingly. Once the parameter values are confirmed, they can be sent as a JSON request body to the presets/add endpoint.

A form can be used for taking the input values, along with a checkbox to set the replace query parameter to true, which will delete the user's oldest preset if their count of stored presets is 10.

Checklist