Merge branch 'development' into development_heroprompt

* development:
  ...
  ...

# Conflicts:
#	lib/threefold/grid4/datamodel/model_node.v
This commit is contained in:
2025-08-25 06:33:07 +02:00
3 changed files with 28 additions and 32 deletions

View File

@@ -78,6 +78,34 @@ pub mut:
vcores int // Total virtual cores
}
// typically 1GB of memory, but can be adjusted based based on size of machine
pub struct ComputeSlice {
pub mut:
nodeid u32 // the node in the grid, there is an object describing the node
id int // the id of the slice in the node
mem_gb f64
storage_gb f64
passmark int
vcores int
cpu_oversubscription int
storage_oversubscription int
price_range []f64 = [0.0, 0.0]
gpus u8 // nr of GPU's see node to know what GPU's are
price_cc f64 // price per slice (even if the grouped one)
pricing_policy PricingPolicy
sla_policy SLAPolicy
}
// 1GB of storage
pub struct StorageSlice {
pub mut:
nodeid u32 // the node in the grid
id int // the id of the slice in the node, are tracked in the node itself
price_cc f64 // price per slice (even if the grouped one)
pricing_policy PricingPolicy
sla_policy SLAPolicy
}
fn (mut n Node) check() ! {
// todo calculate NodeCapacity out of the devices on the Node
}

View File

@@ -1,20 +0,0 @@
module datamodel
// typically 1GB of memory, but can be adjusted based based on size of machine
@[heap]
pub struct ComputeSlice {
pub mut:
nodeid u32 // the node in the grid, there is an object describing the node
id int // the id of the slice in the node
mem_gb f64
storage_gb f64
passmark int
vcores int
cpu_oversubscription int
storage_oversubscription int
price_range []f64 = [0.0, 0.0]
gpus u8 // nr of GPU's see node to know what GPU's are
price_cc f64 // price per slice (even if the grouped one)
pricing_policy PricingPolicy
sla_policy SLAPolicy
}

View File

@@ -1,12 +0,0 @@
module datamodel
// 1GB of storage
@[heap]
pub struct StorageSlice {
pub mut:
nodeid u32 // the node in the grid
id int // the id of the slice in the node, are tracked in the node itself
price_cc f64 // price per slice (even if the grouped one)
pricing_policy PricingPolicy // copied from node which is part of nodegroup
sla_policy SLAPolicy
}