alerion icon indicating copy to clipboard operation
alerion copied to clipboard

PYRO-87: Mock Client

Open sargon64 opened this issue 1 year ago • 1 comments

Mock client for emulating the petro pannel todo:

  • add a gui
  • find out what the endpoints actually do
  • ???
  • profit

sargon64 avatar Apr 22 '24 07:04 sargon64

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 in alerion_datamodel. Please move those in alerion_datamodel; we can then integrate core with datamodel in a later PR.

fetchfern avatar May 02 '24 04:05 fetchfern