Skip to content

Commit a7c863f

Browse files
CA-201117: quicktest: Use VDI.is_tools_iso instead of name_label
Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
1 parent ce0c4d8 commit a7c863f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ocaml/xapi/quicktest.ml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,14 @@ let setup_export_test_vm session_id =
310310
debug test (Printf.sprintf "Template has uuid: %s%!" uuid);
311311
let vm = vm_install test session_id uuid "quicktest-export" in
312312
debug test (Printf.sprintf "Installed new VM");
313-
let cd = List.hd (Client.VDI.get_by_name_label !rpc session_id "xs-tools.iso") in
313+
let cd =
314+
let tools_iso_filter = "field \"is_tools_iso\"=\"true\"" in
315+
match Client.VDI.get_all_records_where !rpc session_id tools_iso_filter with
316+
| (vdi, _)::_ -> vdi
317+
| [] ->
318+
failed test "Failed to find tools ISO VDI";
319+
failwith "setup_export_test_vm";
320+
in
314321
debug test "Looking for the SR which supports the smallest disk size";
315322
let all_srs = all_srs_with_vdi_create session_id in
316323
let smallest : int64 option list = List.map (fun sr -> Quicktest_storage.find_smallest_disk_size session_id sr) all_srs in

0 commit comments

Comments
 (0)