Boavizta / datavizta

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create a form to characterize a server configuration (cpu, ram, ...)

da-ekchajzer opened this issue · comments

The impacts are retrieved from server configuration. We want users to be able to give a specific configuration through a form. The inputs will be used in the construction of a request to the API.

Specifications

Router

router : https://dev.api.boavizta.org/v1/server/
openapi spec : https://dev.api.boavizta.org/docs#/server/server_impact_from_configuration_v1_server__post
Explanation : https://doc.dev.api.boavizta.org/Explanations/devices/server/
Reference : https://doc.dev.api.boavizta.org/Reference/server_route/

RAM

see : https://doc.dev.api.boavizta.org/Explanations/components/ram/

Fields

API request

{
...
"configuration":{
     "ram":[{
          "units":2,           
          "capacity": 32,
          "manufacturer": "Samsung",
          "process": 30.0
      }],
...}
}

CPU

see : https://doc.dev.api.boavizta.org/Explanations/components/cpu/

Fields

API requests

{
...
"configuration":{
     "cpu":{
        "core_units": 24,
        "die_size_per_core": 0.245,
        "tdp":150
       },
     ...
     }
}
{
...
"configuration":{
     "cpu":{
        "name": "Intel Core i7-1065",
        "tdp":150
       },
      ...
     }
}

HDD

see HDD : https://doc.dev.api.boavizta.org/Explanations/components/hdd/

Field

  • units
  • type
  • capacity (not used)

API request

{
...
"configuration":{
     "disk":[{
        "type": "HDD"
       }]
     },
    ...
}

SSD

see SSD : https://doc.dev.api.boavizta.org/Explanations/components/ssd/

Field

API request

{
"configuration":{
     ...
     "disk":[{
        "type": "SSD",
        "capacity": 500,
         "manufacturer": "Samsung",
       }],
     ...
     }
}
{
...
"configuration":{
     "disk":[{
        "type": "SSD",
        "capacity": 500,
        "density": 50.6
       }],
     ...
     }
}

POWER SUPPLY

see : https://doc.dev.api.boavizta.org/Explanations/components/power_supply/

Field

  • units
  • unit_weight

API request

{
...
"configuration":{
         "power_supply":{
            "units": 2,
            "unit_weight": 2.99
        },
     ...
     }
}

CASE

see : https://doc.dev.api.boavizta.org/Explanations/components/case/

Field

API request

{
  "model": {
    "type": "rack",
  }, 
  "configuration":{...}
...
}

General exemple

{
    "configuration":
    {
        "cpu":
        {
            "units": 2,
            "core_units": 24,
            "die_size_per_core": 0.245
        },
        "ram":
        [
            {
                "units": 12,
                "capacity": 32,
                "density": 1.79
            }
        ],
        "disk":
        [
            {
                "units": 1,
                "type": "ssd",
                "capacity": 400,
                "density": 50.6
            }
        ],
        "power_supply":
        {
            "units": 2,
            "unit_weight": 2.99
        }
    }
}