alerion
alerion copied to clipboard
PYRO-87: Mock Client
Mock client for emulating the petro pannel todo:
- add a gui
- find out what the endpoints actually do
- ???
- profit
We're gonna need the mock client to request to the following alerion endpoints:
-
GET /api/servers/:uuid -
DELETE /api/servers/:uuid -
GET /api/servers/:uuid/logs -
POST /api/servers/:uuid/power -
POST /api/servers/:uuid/commands -
POST /api/servers/:uuid/install -
POST /api/servers/:uuid/reinstall -
POST /api/servers/:uuid/ws
Plus, an interface to interact with the full websocket API.
References: https://github.com/devnote-dev/ptero-notes/blob/main/wings/server.md https://github.com/devnote-dev/ptero-notes/blob/main/wings/websocket.md
IMO, mock_client should be a library for interacting with alerion, pretending you're a panel. It can then be used for real scenario benchmarking/testing, security testing, etc. We can then implement alerion_benchmark, alerion_ui_client, etc.
Few concerns for now:
- Why are there merge conflicts in
alerion_core? This shouldn't touch anything in core alerion. - Most
serde-related structs are going to be shared between core and mock and should be inalerion_datamodel. Please move those inalerion_datamodel; we can then integrate core with datamodel in a later PR.