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

[Xen-API] [PATCH] Fix "xe vm-export --metadata --multiple"



# HG changeset patch
# User Ian Hickey <ian.hickey@xxxxxxxxxx>
# Date 1273160895 -3600
# Node ID 77535ef46acd159c16e4c3e1eddb2934e16c5b43
# Parent  4bde1604fc1795fe826574335f34b5e2c3c75594
CA-41107: Fix 'xe vm-export --metadata --multiple'

The filename of each separate export needs to be changed to avoid a 'file 
already exists' type error.

Signed-off-by: Ian Hickey <ian.hickey@xxxxxxxxxx>
Acked-by: Dave Scott <dave.scott@xxxxxxxxxxxxx>

diff -r 4bde1604fc17 -r 77535ef46acd ocaml/xapi/cli_operations.ml
--- a/ocaml/xapi/cli_operations.ml      Thu Apr 29 10:22:35 2010 +0100
+++ b/ocaml/xapi/cli_operations.ml      Thu May 06 16:48:15 2010 +0100
@@ -3073,7 +3073,8 @@
   
   finally 
     (fun () ->
-      download_file ~__context rpc session_id exporttask fd filename
+      let f = if !num > 1 then filename ^ (string_of_int !num) else filename in
+      download_file ~__context rpc session_id exporttask fd f
         (Printf.sprintf
            "%s?session_id=%s&task_id=%s&ref=%s&preserve_power_state=%b" 
           (if List.mem_assoc "metadata" params
1 file changed, 2 insertions(+), 1 deletion(-)
ocaml/xapi/cli_operations.ml |    3 ++-


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®.