Server types
Server types are an important concept in MetalSoft. They are server ‘profiles’ or SKUs that users will operate on. A user will ‘ask’ for a specific ‘server_type’ and the system will match the exact server type if available or suggest an alternative.
Server types are also used to verify a registration of a server. The server_type-to-server match is done at register time.
The label is auto-generated using the below:
{CLASS}.{CORES}.{RAM}[.{DISKS}][G][.v{VERSION}]| Part | Source | Notes |
|---|---|---|
| CLASS | serverClass enum → letter | M |
| CORES | processorCount × processorCoreCount | total logical cores |
| RAM | ramGbytes | integer GB |
| DISKS | diskCount | only appended if > 0 |
| G | gpuCount > 0 | suffix, no dot |
| v{N} | auto-increment | appended if label already exists (.v2, .v3, …) |
Examples: M.16.64 → M.16.64.4 (with 4 disks) → M.16.64.4G (with GPU) → M.16.64.4G.v2 (duplicate)
Creating a new server type
Section titled “Creating a new server type”This is typically not required as the server types are created automatically at server registration time. Click on a server and select the Add server type button.
Fill in the Server ID of the server you want to use as a template, click on Populate from server, fill in the other fields and click Create server type
Allocating a server type to a server
Section titled “Allocating a server type to a server”This is typically not required as the server types are created automatically at server registration time. If it is required to change the server type, click on the server in the admin interface, click on Advanced and click on the Change server type button and select the relevant server type.
Managing server types via the API
Section titled “Managing server types via the API”Listing server types
Section titled “Listing server types”curl "https://<your-server>/api/v2/server-types" \ -H "Authorization: Bearer <API_KEY>"Getting a specific server type
Section titled “Getting a specific server type”curl "https://<your-server>/api/v2/server-types/{serverTypeId}" \ -H "Authorization: Bearer <API_KEY>"Getting server type statistics
Section titled “Getting server type statistics”curl -X POST "https://<your-server>/api/v2/server-types/statistics" \ -H "Authorization: Bearer <API_KEY>"Cleaning unused server types
Section titled “Cleaning unused server types”Removes server types that are not assigned to any server:
curl -X POST "https://<your-server>/api/v2/server-types/actions/clean-unused" \ -H "Authorization: Bearer <API_KEY>"