]> xenbits.xensource.com Git - xcp/xen-api.git/commitdiff
CA-44277: xe snapshot-disk-list now fails gracefully.
authorMatthias Goergens <matthias.goergens@citrix.com>
Tue, 12 Oct 2010 10:55:58 +0000 (11:55 +0100)
committerMatthias Goergens <matthias.goergens@citrix.com>
Tue, 12 Oct 2010 10:55:58 +0000 (11:55 +0100)
Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
ocaml/xapi/cli_operations.ml

index 2a233bac93ba492868644aade52fd9bdb817f194..b2e1bee86e80026464d48ac43f05f003c35d1eac 100644 (file)
@@ -2168,7 +2168,9 @@ let vm_checkpoint printer = vm_clone_aux Client.VM.checkpoint "Checkpointed " pr
 let get_snapshot_uuid params =
        if List.mem_assoc "snapshot-uuid" params
        then List.assoc "snapshot-uuid" params
-       else List.assoc "uuid" params
+       else if List.mem_assoc "uuid" params
+       then List.assoc "uuid" params
+       else raise (failwith "Required parameter not found: snapshot-uuid or uuid.")
 
 let snapshot_revert printer rpc session_id params =
        let snap_uuid = get_snapshot_uuid params in