batiaev / provisioner

spring boot pet project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Run in Postman

Build

Provisioner

Build (gradle)

./gradlew clean build

Run

./gradlew bootRun

Unresolved tasks

  • custom exception handling
  • unit tests for vm provisioning
  • integration testing / wiremock
  • resilience failsafe/resiliencej
  • proper jwt management

API

  1. GET /api/v1/users/sign-in API for user signup - Fields: Name, email-address, mobile no, password, role. Email and mobile no, role must be unique. Role can be master and non-master. Master accounts can view details of all user VMs while the non-master accounts can view only their own vm details. Master account can delete other user accounts.
    • UserControllerTest#should_signUp
  2. GET /api/v1/users/sign-in API to obtain JWT token based on credentials
    • UserControllerTest#should_signIn
  3. POST /api/v1/vm/provision API for Requesting VM provisioning with following details: OS, RAM, Hard-disk and CPU cores.
    • VMControllerTest#should_provision
  4. GET /api/v1/vm?userId={id} API for displaying list of VMs requested by particular user.
    • VMControllerTest#should_getAllVMForUser
  5. GET /api/v1/vm?limit={n} API to list the top 'n' VMs by Memory for logged in user
    • VMControllerTest#should_getTopNVmByMemForCurrentUser
  6. DELETE /api/v1/users/{userId} API to delete the user account. If account gets deleted, all registered vms must be deleted also
    • UserControllerTest#should_deleteUser
  7. GET /api/v1/vm?limit={n}&all=true API to list the top 'n' VMs by memory across all users in system
    • VMControllerTest#should_getTopNVmByMemInTheSystem

Author

Anton Batiaev anton@batiaev.com

About

spring boot pet project

License:Apache License 2.0


Languages

Language:Java 99.4%Language:Dockerfile 0.6%