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"
315
315
316
316
let copy_vm = Vm. of_string " SXM_copy"
317
317
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 =
319
319
on_vdi'
320
320
(fun sr vdi ->
321
321
let get_opt x err = match x with Some y -> y | None -> failwith err in
322
322
let dp = get_opt dp " Need a local data path" in
323
323
let url = get_opt url " Need a URL" in
324
324
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
327
328
let task =
328
329
Client.DATA.MIRROR. start dbg sr vdi image_format dp mirror_vm copy_vm
329
330
url
@@ -531,6 +532,10 @@ let mirror_start_cmd =
531
532
let doc = " Verify certicate of remote server" in
532
533
Arg. (value & pos 5 bool false & info [] ~docv: " VERIFYDEST" ~doc )
533
534
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
534
539
( Term. (
535
540
ret
536
541
(const mirror_start
@@ -541,6 +546,7 @@ let mirror_start_cmd =
541
546
$ url
542
547
$ dest
543
548
$ verify_dest
549
+ $ dest_img_format
544
550
)
545
551
)
546
552
, Cmd. info " mirror-start" ~sdocs: _common_options ~doc ~man
You can’t perform that action at this time.
0 commit comments