]> xenbits.xensource.com Git - xcp/xen-api.git/commitdiff
Pass the name of the VDI to the SM backends on VDI.create.
authorJon Ludlam <jonathan.ludlam@eu.citrix.com>
Thu, 28 Oct 2010 15:59:39 +0000 (16:59 +0100)
committerJon Ludlam <jonathan.ludlam@eu.citrix.com>
Thu, 28 Oct 2010 15:59:39 +0000 (16:59 +0100)
Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
ocaml/xapi/sm.ml
ocaml/xapi/xapi_vdi.ml

index 99aa788a21b1891cd90d698d448390b7a501e492..99de187a39406e04de94d95956df3fcbd5bb40cc 100644 (file)
@@ -126,9 +126,9 @@ let sr_update dconf driver sr =
   let call = Sm_exec.make_call ~sr_ref:sr dconf "sr_update" [] in
   Sm_exec.parse_unit (Sm_exec.exec_xmlrpc (driver_type driver)  (driver_filename driver) call)
 
-let vdi_create dconf driver sr sm_config size =
+let vdi_create dconf driver sr sm_config size name_label =
   debug "vdi_create" driver (sprintf "sr=%s sm_config=[%s] size=%Ld" (Ref.string_of sr) (String.concat "; " (List.map (fun (k, v) -> k ^ "=" ^ v) sm_config)) size);
-  let call = Sm_exec.make_call ~sr_ref:sr ~vdi_sm_config:sm_config dconf "vdi_create" [ sprintf "%Lu" size ] in
+  let call = Sm_exec.make_call ~sr_ref:sr ~vdi_sm_config:sm_config dconf "vdi_create" [ sprintf "%Lu" size; name_label ] in
   Sm_exec.parse_vdi_info (Sm_exec.exec_xmlrpc (driver_type driver)  (driver_filename driver) call)
 
 let vdi_update dconf driver sr vdi = 
index 61305a382fd302a5925bc3c1080ae84f7966a012..45501153ad6d1a5daf69224a225c12f66d424b09 100644 (file)
@@ -198,7 +198,7 @@ let create ~__context ~name_label ~name_description
        let vdi_info = 
            Sm.call_sm_functions ~__context ~sR
              (fun device_config sr_type ->
-               Sm.vdi_create device_config sr_type sR sm_config virtual_size)
+               Sm.vdi_create device_config sr_type sR sm_config virtual_size name_label)
        in
        let uuid = require_uuid vdi_info in
        let ref = Db.VDI.get_by_uuid ~__context ~uuid in