File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -315,15 +315,16 @@ let mirror_vm = Vm.of_string "SXM_mirror"
315315
316316let copy_vm = Vm. of_string " SXM_copy"
317317
318- let mirror_start common_opts sr vdi dp url dest verify_dest =
318+ let mirror_start common_opts sr vdi dp url dest verify_dest dest_img_format =
319319 on_vdi'
320320 (fun sr vdi ->
321321 let get_opt x err = match x with Some y -> y | None -> failwith err in
322322 let dp = get_opt dp " Need a local data path" in
323323 let url = get_opt url " Need a URL" in
324324 let dest = get_opt dest " Need a destination SR" in
325- (* TODO: add image_format as a parameter of the CLI *)
326- let image_format = " " in
325+ let image_format =
326+ match dest_img_format with Some s -> s | None -> " "
327+ in
327328 let task =
328329 Client.DATA.MIRROR. start dbg sr vdi image_format dp mirror_vm copy_vm
329330 url
@@ -531,6 +532,10 @@ let mirror_start_cmd =
531532 let doc = " Verify certicate of remote server" in
532533 Arg. (value & pos 5 bool false & info [] ~docv: " VERIFYDEST" ~doc )
533534 in
535+ let dest_img_format =
536+ let doc = " Specify the image format on the destination SR" in
537+ Arg. (value & pos 6 (some string ) None & info [] ~docv: " IMAGEFORMAT" ~doc )
538+ in
534539 ( Term. (
535540 ret
536541 (const mirror_start
@@ -541,6 +546,7 @@ let mirror_start_cmd =
541546 $ url
542547 $ dest
543548 $ verify_dest
549+ $ dest_img_format
544550 )
545551 )
546552 , Cmd. info " mirror-start" ~sdocs: _common_options ~doc ~man
You can’t perform that action at this time.
0 commit comments