Skip to content

Compute providers should be able to turn on and off their device's availability on the platform

Description

  • This MR features code that allows DMS users to pause and resume their devices for job deployments. New endpoints (and their docs) and handler functions were added to accommodate these two actions, as well as CLI commands that allow DMS users to interact with these routes. Additionally, a new Boolean field, 'IsAvailable', was added to an existing structure in the models directory to expand the DMS capability wherein the respective handler functions modify the field to mark a user as either available or unavailable. This updated status is then reflected by calling a DHT filtering function within the handler functions to filter users according to the value of the 'IsAvailable' Boolean field.
  • NOTE: There's a chance that the CLI commands may not return feedback messages from the API responses as intended, so feedback would be appreciated in that case, as I'm still struggling in understanding how to isolate and test individual components on the DMS. For more context, I primarily use nano on the terminal.

Checklist

  • I have update updated the @version string in main.go. See https://semver.org/
  • I have update CHANGELOG.md with a short description of changes.
  • I have run swag init to update the swagger docs.

Closes #9 (closed)

Edited by Dagim Sisay

Merge request reports