@@ -264,6 +264,8 @@ let string_of_vdi_info (x : vdi_info) = Jsonrpc.to_string (rpc_of vdi_info x)
264264 "datapaths". *)
265265type dp = string [@@ deriving rpcty ]
266266
267+ type image_format_t = string [@@ deriving rpcty ]
268+
267269type sock_path = string [@@ deriving rpcty ]
268270
269271type dp_stat_t = {
@@ -1035,6 +1037,8 @@ module StorageAPI (R : RPC) = struct
10351037 declare " get_by_name" [] (dbg_p @-> name_p @-> returning result_p err)
10361038
10371039 module DATA = struct
1040+ let image_format_p = Param. mk ~name: " image_format" image_format_t
1041+
10381042 let url_p = Param. mk ~name: " url" Types. string
10391043
10401044 let dest_p = Param. mk ~name: " dest" Sr. t
@@ -1066,6 +1070,7 @@ module StorageAPI (R : RPC) = struct
10661070 (dbg_p
10671071 @-> sr_p
10681072 @-> vdi_p
1073+ @-> image_format_p
10691074 @-> vm_p
10701075 @-> url_p
10711076 @-> returning operation_p err
@@ -1109,6 +1114,8 @@ module StorageAPI (R : RPC) = struct
11091114 )
11101115
11111116 module MIRROR = struct
1117+ let image_format_p = Param. mk ~name: " image_format" image_format_t
1118+
11121119 let mirror_vm_p = Param. mk ~name: " mirror_vm" Vm. t
11131120
11141121 let copy_vm_p = Param. mk ~name: " copy_vm" Vm. t
@@ -1117,7 +1124,7 @@ module StorageAPI (R : RPC) = struct
11171124
11181125 let id_p = Param. mk ~name: " id" Mirror. id
11191126
1120- (* * [send_start dbg dp task src_sr vdi mirror_vm mirror_id local_vdi copy_vm
1127+ (* * [send_start dbg dp task src_sr vdi image_format mirror_vm mirror_id local_vdi copy_vm
11211128 live_vm url remote_mirror dest_sr verify_dest]
11221129 takes the remote mirror [remote_mirror] prepared by the destination host
11231130 and initiates the mirroring of [vdi] from the source *)
@@ -1134,6 +1141,7 @@ module StorageAPI (R : RPC) = struct
11341141 @-> task_id_p
11351142 @-> src_sr_p
11361143 @-> vdi_p
1144+ @-> image_format_p
11371145 @-> mirror_vm_p
11381146 @-> id_p
11391147 @-> local_vdi_p
@@ -1159,6 +1167,7 @@ module StorageAPI (R : RPC) = struct
11591167 @-> sr_p
11601168 @-> VDI. vdi_info_p
11611169 @-> id_p
1170+ @-> image_format_p
11621171 @-> similar_p
11631172 @-> returning result err
11641173 )
@@ -1176,6 +1185,7 @@ module StorageAPI (R : RPC) = struct
11761185 @-> sr_p
11771186 @-> VDI. vdi_info_p
11781187 @-> id_p
1188+ @-> image_format_p
11791189 @-> similar_p
11801190 @-> vm_p
11811191 @-> returning result err
@@ -1191,6 +1201,7 @@ module StorageAPI (R : RPC) = struct
11911201 @-> sr_p
11921202 @-> VDI. vdi_info_p
11931203 @-> id_p
1204+ @-> image_format_p
11941205 @-> similar_p
11951206 @-> vm_p
11961207 @-> url_p
@@ -1320,6 +1331,7 @@ module type MIRROR = sig
13201331 -> dp :dp
13211332 -> sr :sr
13221333 -> vdi :vdi
1334+ -> image_format :string
13231335 -> mirror_vm :vm
13241336 -> mirror_id :Mirror .id
13251337 -> local_vdi :vdi_info
@@ -1337,6 +1349,7 @@ module type MIRROR = sig
13371349 -> sr :sr
13381350 -> vdi_info :vdi_info
13391351 -> id :Mirror .id
1352+ -> image_format :string
13401353 -> similar :Mirror .similars
13411354 -> Mirror .mirror_receive_result
13421355
@@ -1346,6 +1359,7 @@ module type MIRROR = sig
13461359 -> sr :sr
13471360 -> vdi_info :vdi_info
13481361 -> id :Mirror .id
1362+ -> image_format :string
13491363 -> similar :Mirror .similars
13501364 -> vm :vm
13511365 -> Mirror .mirror_receive_result
@@ -1356,6 +1370,7 @@ module type MIRROR = sig
13561370 -> sr :sr
13571371 -> vdi_info :vdi_info
13581372 -> mirror_id :Mirror .id
1373+ -> image_format :string
13591374 -> similar :Mirror .similars
13601375 -> vm :vm
13611376 -> url :string
@@ -1657,6 +1672,7 @@ module type Server_impl = sig
16571672 -> dbg :debug_info
16581673 -> sr :sr
16591674 -> vdi :vdi
1675+ -> image_format :string
16601676 -> vm :vm
16611677 -> dest :string
16621678 -> operation
@@ -1844,8 +1860,8 @@ module Server (Impl : Server_impl) () = struct
18441860 S.DATA. copy (fun dbg sr vdi vm url dest verify_dest ->
18451861 Impl.DATA. copy () ~dbg ~sr ~vdi ~vm ~url ~dest ~verify_dest
18461862 ) ;
1847- S.DATA. mirror (fun dbg sr vdi vm dest ->
1848- Impl.DATA. mirror () ~dbg ~sr ~vdi ~vm ~dest
1863+ S.DATA. mirror (fun dbg sr vdi image_format vm dest ->
1864+ Impl.DATA. mirror () ~dbg ~sr ~vdi ~image_format ~ vm ~dest
18491865 ) ;
18501866 S.DATA. stat (fun dbg sr vdi vm key ->
18511867 Impl.DATA. stat () ~dbg ~sr ~vdi ~vm ~key
@@ -1857,6 +1873,7 @@ module Server (Impl : Server_impl) () = struct
18571873 dp
18581874 sr
18591875 vdi
1876+ image_format
18601877 mirror_vm
18611878 mirror_id
18621879 local_vdi
@@ -1867,20 +1884,23 @@ module Server (Impl : Server_impl) () = struct
18671884 dest_sr
18681885 verify_dest
18691886 ->
1870- Impl.DATA.MIRROR. send_start () ~dbg ~task_id ~dp ~sr ~vdi ~mirror_vm
1871- ~mirror_id ~local_vdi ~copy_vm ~live_vm ~url ~remote_mirror ~dest_sr
1872- ~verify_dest
1887+ Impl.DATA.MIRROR. send_start () ~dbg ~task_id ~dp ~sr ~vdi ~image_format
1888+ ~mirror_vm ~ mirror_id ~local_vdi ~copy_vm ~live_vm ~url ~remote_mirror
1889+ ~dest_sr ~ verify_dest
18731890 ) ;
1874- S.DATA.MIRROR. receive_start (fun dbg sr vdi_info id similar ->
1875- Impl.DATA.MIRROR. receive_start () ~dbg ~sr ~vdi_info ~id ~similar
1891+ S.DATA.MIRROR. receive_start (fun dbg sr vdi_info id image_format similar ->
1892+ Impl.DATA.MIRROR. receive_start () ~dbg ~sr ~vdi_info ~id ~image_format
1893+ ~similar
18761894 ) ;
1877- S.DATA.MIRROR. receive_start2 (fun dbg sr vdi_info id similar vm ->
1878- Impl.DATA.MIRROR. receive_start2 () ~dbg ~sr ~vdi_info ~id ~similar ~vm
1895+ S.DATA.MIRROR. receive_start2
1896+ (fun dbg sr vdi_info id image_format similar vm ->
1897+ Impl.DATA.MIRROR. receive_start2 () ~dbg ~sr ~vdi_info ~id ~image_format
1898+ ~similar ~vm
18791899 ) ;
18801900 S.DATA.MIRROR. receive_start3
1881- (fun dbg sr vdi_info mirror_id similar vm url verify_dest ->
1901+ (fun dbg sr vdi_info mirror_id image_format similar vm url verify_dest ->
18821902 Impl.DATA.MIRROR. receive_start3 () ~dbg ~sr ~vdi_info ~mirror_id
1883- ~similar ~vm ~url ~verify_dest
1903+ ~image_format ~ similar ~vm ~url ~verify_dest
18841904 ) ;
18851905 S.DATA.MIRROR. receive_cancel (fun dbg id ->
18861906 Impl.DATA.MIRROR. receive_cancel () ~dbg ~id
0 commit comments