Ready to implement network routes contents
This commit is contained in:
@ -29,11 +29,13 @@ struct LenConstraints {
|
||||
#[derive(serde::Serialize)]
|
||||
struct ServerConstraints {
|
||||
iso_max_size: usize,
|
||||
name_size: LenConstraints,
|
||||
title_size: LenConstraints,
|
||||
vm_name_size: LenConstraints,
|
||||
vm_title_size: LenConstraints,
|
||||
memory_size: LenConstraints,
|
||||
disk_name_size: LenConstraints,
|
||||
disk_size: LenConstraints,
|
||||
net_name_size: LenConstraints,
|
||||
net_title_size: LenConstraints,
|
||||
}
|
||||
|
||||
pub async fn static_config(local_auth: LocalAuthEnabled) -> impl Responder {
|
||||
@ -45,8 +47,8 @@ pub async fn static_config(local_auth: LocalAuthEnabled) -> impl Responder {
|
||||
constraints: ServerConstraints {
|
||||
iso_max_size: constants::ISO_MAX_SIZE,
|
||||
|
||||
name_size: LenConstraints { min: 2, max: 50 },
|
||||
title_size: LenConstraints { min: 0, max: 50 },
|
||||
vm_name_size: LenConstraints { min: 2, max: 50 },
|
||||
vm_title_size: LenConstraints { min: 0, max: 50 },
|
||||
memory_size: LenConstraints {
|
||||
min: constants::MIN_VM_MEMORY,
|
||||
max: constants::MAX_VM_MEMORY,
|
||||
@ -59,6 +61,9 @@ pub async fn static_config(local_auth: LocalAuthEnabled) -> impl Responder {
|
||||
min: DISK_SIZE_MIN,
|
||||
max: DISK_SIZE_MAX,
|
||||
},
|
||||
|
||||
net_name_size: LenConstraints { min: 2, max: 50 },
|
||||
net_title_size: LenConstraints { min: 0, max: 50 },
|
||||
},
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user