From: Jon Ludlam Date: Thu, 28 Oct 2010 15:59:39 +0000 (+0100) Subject: Pass the name of the VDI to the SM backends on VDI.create. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8dafbe678c83ef86dda3a46b0b8112f3d658cb24;p=xcp%2Fxen-api.git Pass the name of the VDI to the SM backends on VDI.create. Signed-off-by: Jon Ludlam --- diff --git a/ocaml/xapi/sm.ml b/ocaml/xapi/sm.ml index 99aa788a..99de187a 100644 --- a/ocaml/xapi/sm.ml +++ b/ocaml/xapi/sm.ml @@ -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 = diff --git a/ocaml/xapi/xapi_vdi.ml b/ocaml/xapi/xapi_vdi.ml index 61305a38..45501153 100644 --- a/ocaml/xapi/xapi_vdi.ml +++ b/ocaml/xapi/xapi_vdi.ml @@ -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