Skip to content

RFC: new REST API entrypoints

Ana Guerrero requested to merge (removed):api_updates into master

This MR contains all the code from https://gitlab.freedesktop.org/mupuf/valve-infra/-/merge_requests/294 with some changes (see at the bottom) and a few additions.

The goal of all these REST API updates is to implement all the actions required by https://gitlab.freedesktop.org/mupuf/valve-infra/-/issues/76 (with the exception of ABORT).

The new API endpoints are:

  • /discover
  • minor update to /machines to show PDU/port_id
  • updates to /pdu (with POST method)
  • /activate
  • /retire

All the information related to the enpoints can be found in the commit messages and in the documentation update in executor/server/README.md

Other changes are:

  • When adding a new machine after a boot, if this machine has been booted after a discovery process, add the information of the pdu and pdu_port_id.
  • REST API /machines, add information about PDU/port_id
  • mars.py: add a new function to update fields
  • ansible/dashboard/machines: show PDU/pdu_port_id

And the documentation update mentioned above.


changes from the changeset at https://gitlab.freedesktop.org/mupuf/valve-infra/-/merge_requests/294

  • rename entrypoint to /discover
  • use method DELETE instead of discover(y)/cancel to remove discovery data
  • discover will turn on the port only, so not need to add key state
  • re-order the commits
  • when a port_id is off but it's assigned in marsdb, discover shouldn't be allowed

Merge request reports