# Info: KCL core lib schemas for provisioning (Provisioning) # Author: JesusPerezLorenzo # Release: 0.0.4 # Date: 15-12-2023 schema StorageVol: """ StorageVol settings """ name: str size: int = 0 total: int = size type: "ext4" | "xfs" | "btrfs" | "raw" | "zfs" = "ext4" mount: bool = True mount_path?: str fstab: bool = True check: len(name) > 0, "Check name value" #mount == True and mount_path != Undefined schema Storage(StorageVol): """ Storage settings """ parts?: [StorageVol] = [] check: len(name) > 0, "Check name value" total >= sum([p.size for p in parts]), "🛑 Size Total parts ${sum([p.size for p in parts])} is greater than total storage ${total}.." schema TaskServDef: """ TaskServDef settings """ name: str install_mode: "getfile" | "library" | "server" | "library-server" | "server-library" = "library" profile: str = "default" target_save_path: str = "" schema ClusterDef: """ ClusterDef settings """ name: str profile: str = "default" target_save_path: str = "" schema ScaleData: """ scale data """ def: str disabled: bool = False mode: "auto" | "manual" | "ondemand" = "manual" expire?: str from?: str to?: str schema ScaleResource: """ scale server settings """ default: ScaleData fallback?: ScaleData up?: ScaleData down?: ScaleData min?: ScaleData max?: ScaleData path: str = "/etc/scale_provisioning"