...
This commit is contained in:
@@ -6,99 +6,99 @@ This module defines data models for nodes, groups, slices in a cloud/grid infras
|
|||||||
|
|
||||||
Represents a single node in the grid with slices, devices, and capacity.
|
Represents a single node in the grid with slices, devices, and capacity.
|
||||||
|
|
||||||
| Field | Type | Description |
|
| Field | Type | Description |
|
||||||
|----------------|-------------------|-------------|
|
| ------------- | -------------- | -------------------------------------------- |
|
||||||
| id | int | Unique node ID |
|
| id | int | Unique node ID |
|
||||||
| nodegroupid | int | ID of the owning node group |
|
| nodegroupid | int | ID of the owning node group |
|
||||||
| uptime | int | Uptime percentage (0-100) |
|
| uptime | int | Uptime percentage (0-100) |
|
||||||
| computeslices | []ComputeSlice | List of compute slices |
|
| computeslices | []ComputeSlice | List of compute slices |
|
||||||
| storageslices | []StorageSlice | List of storage slices |
|
| storageslices | []StorageSlice | List of storage slices |
|
||||||
| devices | DeviceInfo | Hardware device info (storage, memory, etc.) |
|
| devices | DeviceInfo | Hardware device info (storage, memory, etc.) |
|
||||||
| country | string | 2-letter country code |
|
| country | string | 2-letter country code |
|
||||||
| capacity | NodeCapacity | Aggregated hardware capacity |
|
| capacity | NodeCapacity | Aggregated hardware capacity |
|
||||||
| provisiontime | u32 | Provisioning time (simple/compatible format) |
|
| provisiontime | u32 | Provisioning time (simple/compatible format) |
|
||||||
|
|
||||||
## NodeGroup
|
## NodeGroup
|
||||||
|
|
||||||
Represents a group of nodes owned by a farmer, with policies.
|
Represents a group of nodes owned by a farmer, with policies.
|
||||||
|
|
||||||
| Field | Type | Description |
|
| Field | Type | Description |
|
||||||
|------------------------|---------------|-------------|
|
| ----------------------------------- | ------------- | ---------------------------------------------- |
|
||||||
| id | u32 | Unique group ID |
|
| id | u32 | Unique group ID |
|
||||||
| farmerid | u32 | Farmer/user ID |
|
| farmerid | u32 | Farmer/user ID |
|
||||||
| secret | string | Encrypted secret for booting nodes |
|
| secret | string | Encrypted secret for booting nodes |
|
||||||
| description | string | Group description |
|
| description | string | Group description |
|
||||||
| slapolicy | SLAPolicy | SLA policy details |
|
| slapolicy | SLAPolicy | SLA policy details |
|
||||||
| pricingpolicy | PricingPolicy | Pricing policy details |
|
| pricingpolicy | PricingPolicy | Pricing policy details |
|
||||||
| compute_slice_normalized_pricing_cc | f64 | Pricing per 2GB compute slice in cloud credits |
|
| compute_slice_normalized_pricing_cc | f64 | Pricing per 2GB compute slice in cloud credits |
|
||||||
| storage_slice_normalized_pricing_cc | f64 | Pricing per 1GB storage slice in cloud credits |
|
| storage_slice_normalized_pricing_cc | f64 | Pricing per 1GB storage slice in cloud credits |
|
||||||
| reputation | int | Reputation (0-100) |
|
| reputation | int | Reputation (0-100) |
|
||||||
| uptime | int | Uptime (0-100) |
|
| uptime | int | Uptime (0-100) |
|
||||||
|
|
||||||
## NodeSim
|
## NodeSim
|
||||||
|
|
||||||
Extends Node for simulation purposes with cost.
|
Extends Node for simulation purposes with cost.
|
||||||
|
|
||||||
| Field | Type | Description |
|
| Field | Type | Description |
|
||||||
|-------|------|-------------|
|
| --------------- | ---- | --------------------------------------- |
|
||||||
| ( Embeds Node ) | - | All Node fields |
|
| ( Embeds Node ) | - | All Node fields |
|
||||||
| cost | f64 | Simulation cost (free in some contexts) |
|
| cost | f64 | Simulation cost (free in some contexts) |
|
||||||
|
|
||||||
## ComputeSlice
|
## ComputeSlice
|
||||||
|
|
||||||
Represents a compute slice (e.g., 1GB memory unit).
|
Represents a compute slice (e.g., 1GB memory unit).
|
||||||
|
|
||||||
| Field | Type | Description |
|
| Field | Type | Description |
|
||||||
|-----------------------------|---------------|-------------|
|
| ------------------------ | ------------- | -------------------------------- |
|
||||||
| nodeid | u32 | Owning node ID |
|
| nodeid | u32 | Owning node ID |
|
||||||
| id | int | Slice ID in node |
|
| id | int | Slice ID in node |
|
||||||
| mem_gb | f64 | Memory in GB |
|
| mem_gb | f64 | Memory in GB |
|
||||||
| storage_gb | f64 | Storage in GB |
|
| storage_gb | f64 | Storage in GB |
|
||||||
| passmark | int | Passmark score |
|
| passmark | int | Passmark score |
|
||||||
| vcores | int | Virtual cores |
|
| vcores | int | Virtual cores |
|
||||||
| cpu_oversubscription | int | CPU oversubscription ratio |
|
| cpu_oversubscription | int | CPU oversubscription ratio |
|
||||||
| storage_oversubscription | int | Storage oversubscription ratio |
|
| storage_oversubscription | int | Storage oversubscription ratio |
|
||||||
| price_range | []f64 | Price range [min, max] |
|
| price_range | []f64 | Price range [min, max] |
|
||||||
| gpus | u8 | Number of GPUs |
|
| gpus | u8 | Number of GPUs |
|
||||||
| price_cc | f64 | Price per slice in cloud credits |
|
| price_cc | f64 | Price per slice in cloud credits |
|
||||||
| pricing_policy | PricingPolicy | Pricing policy |
|
| pricing_policy | PricingPolicy | Pricing policy |
|
||||||
| sla_policy | SLAPolicy | SLA policy |
|
| sla_policy | SLAPolicy | SLA policy |
|
||||||
|
|
||||||
## StorageSlice
|
## StorageSlice
|
||||||
|
|
||||||
Represents a 1GB storage slice.
|
Represents a 1GB storage slice.
|
||||||
|
|
||||||
| Field | Type | Description |
|
| Field | Type | Description |
|
||||||
|------------------|---------------|-------------|
|
| -------------- | ------------- | -------------------------------- |
|
||||||
| nodeid | u32 | Owning node ID |
|
| nodeid | u32 | Owning node ID |
|
||||||
| id | int | Slice ID in node |
|
| id | int | Slice ID in node |
|
||||||
| price_cc | f64 | Price per slice in cloud credits |
|
| price_cc | f64 | Price per slice in cloud credits |
|
||||||
| pricing_policy | PricingPolicy | Pricing policy |
|
| pricing_policy | PricingPolicy | Pricing policy |
|
||||||
| sla_policy | SLAPolicy | SLA policy |
|
| sla_policy | SLAPolicy | SLA policy |
|
||||||
|
|
||||||
## NodeCapacity
|
## NodeCapacity
|
||||||
|
|
||||||
Aggregated hardware capacity for a node.
|
Aggregated hardware capacity for a node.
|
||||||
|
|
||||||
| Field | Type | Description |
|
| Field | Type | Description |
|
||||||
|--------------|------|-------------|
|
| ---------- | ---- | ---------------------- |
|
||||||
| storage_gb | f64 | Total storage in GB |
|
| storage_gb | f64 | Total storage in GB |
|
||||||
| mem_gb | f64 | Total memory in GB |
|
| mem_gb | f64 | Total memory in GB |
|
||||||
| mem_gb_gpu | f64 | Total GPU memory in GB |
|
| mem_gb_gpu | f64 | Total GPU memory in GB |
|
||||||
| passmark | int | Total passmark score |
|
| passmark | int | Total passmark score |
|
||||||
| vcores | int | Total virtual cores |
|
| vcores | int | Total virtual cores |
|
||||||
|
|
||||||
## NodeInfo
|
## NodeInfo
|
||||||
|
|
||||||
Descriptive info for a node (used in aggregations).
|
Descriptive info for a node (used in aggregations).
|
||||||
|
|
||||||
| Field | Type | Description |
|
| Field | Type | Description |
|
||||||
|--------------|--------|-------------|
|
| ----------- | ------ | ------------------ |
|
||||||
| cpu_brand | string | CPU brand |
|
| cpu_brand | string | CPU brand |
|
||||||
| cpu_version | string | CPU version |
|
| cpu_version | string | CPU version |
|
||||||
| mem | string | Memory description |
|
| mem | string | Memory description |
|
||||||
| hdd | string | HDD description |
|
| hdd | string | HDD description |
|
||||||
| ssd | string | SSD description |
|
| ssd | string | SSD description |
|
||||||
| url | string | Info URL |
|
| url | string | Info URL |
|
||||||
| continent | string | Continent code |
|
| continent | string | Continent code |
|
||||||
| country | string | Country code |
|
| country | string | Country code |
|
||||||
|
|||||||
Reference in New Issue
Block a user