[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH] Pass name_label to SM backends on VDI create



# HG changeset patch
# User Jonathan Ludlam <Jonathan.Ludlam@xxxxxxxxxxxxx>
# Date 1287145402 -3600
# Node ID 28031e4be8ce2fcdeea28f347b53baed8d1fc946
# Parent  7438d990fed8255bba2d592f767de133bd45863a
Pass the name of the VDI to the SM backends on VDI.create.

Signed-off-by: Jon Ludlam <jonathan.ludlam@xxxxxxxxxxxxx>

diff -r 7438d990fed8 -r 28031e4be8ce ocaml/xapi/sm.ml
--- a/ocaml/xapi/sm.ml
+++ b/ocaml/xapi/sm.ml
@@ -126,9 +126,9 @@
   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 -r 7438d990fed8 -r 28031e4be8ce ocaml/xapi/xapi_vdi.ml
--- a/ocaml/xapi/xapi_vdi.ml
+++ b/ocaml/xapi/xapi_vdi.ml
@@ -198,7 +198,7 @@
        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
 ocaml/xapi/sm.ml       |  4 ++--
 ocaml/xapi/xapi_vdi.ml |  2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)


Attachment: xen-api.hg.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.