X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=template.ml;h=29af2939d9d87cde54b208e40bf17d561074b651;hb=f2a17d80287a2afc8f2204035536c81950649e2e;hp=dfeae3f08e79862dd595efbe6d1cbf9211490364;hpb=f1ab6f3938cb6d38798e438ed63d2e018049a9b2;p=mclu.git diff --git a/template.ml b/template.ml index dfeae3f..29af293 100644 --- a/template.ml +++ b/template.ml @@ -75,6 +75,7 @@ type template_info = { base_image : string; minimum_memory : int64 option; recommended_memory : int64 option; + minimum_size : int64 option; disk_bus : string option; network_model : string option; } @@ -115,6 +116,16 @@ let probe ?(verbose = false) filename = exit 1 ); | _ -> None in + let minimum_size = + match run_template ~verbose filename "minimum-size" [] with + | Some [size] -> + (try Some (bytes_of_human_size size) + with Not_found -> + eprintf "mclu: cannot parse output of '%s minimum-size'\n" + filename; + exit 1 + ); + | _ -> None in let disk_bus = match run_template ~verbose filename "disk-bus" [] with | Some [answer] -> Some answer @@ -127,5 +138,6 @@ let probe ?(verbose = false) filename = { base_image = base_image; minimum_memory = minimum_memory; recommended_memory = recommended_memory; + minimum_size = minimum_size; disk_bus = disk_bus; network_model = network_model }