feat: extend host load factors
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-03-24 15:18:18 +00:00
parent af36d4e586
commit ec7fa92010
13 changed files with 138 additions and 46 deletions

View File

@ -0,0 +1,5 @@
-- Add migration script here
alter table vm_host
add column load_memory float not null default 1.0,
add column load_disk float not null default 1.0,
change column load_factor load_cpu float not null default 1.0

View File

@ -80,8 +80,12 @@ pub struct VmHost {
pub enabled: bool,
/// API token used to control this host via [ip]
pub api_token: String,
/// Load factor for provisioning
pub load_factor: f32,
/// CPU load factor for provisioning
pub load_cpu: f32,
/// Memory load factor
pub load_memory: f32,
/// Disk load factor
pub load_disk:f32,
}
#[derive(FromRow, Clone, Debug, Default)]