Permalink
Browse files

Add some comments.

Signed-off-by: John Else <john.else@citrix.com>
  • Loading branch information...
1 parent d542e65 commit ab37934a1cb6a4c9376967432a1df41f0ab74bea @johnelse johnelse committed Nov 6, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 ocaml/xapi/cancel_tasks.ml
@@ -32,18 +32,22 @@ let update_all_allowed_operations ~__context =
and all_srs = Db.SR.get_all ~__context
and all_pbds = Db.PBD.get_all ~__context
and all_hosts = Db.Host.get_all ~__context in
+ (* VM *)
time_this "Cancel_tasks.update_all_allowed_operations: VM" (fun () ->
debug "Updating allowed operations: VM";
List.iter (safe_wrapper "allowed_ops - VMs" (fun self -> Xapi_vm_lifecycle.update_allowed_operations ~__context ~self)) all_vms;
debug "Finished updating allowed operations: VM");
+ (* VBD *)
time_this "Cancel_tasks.update_all_allowed_operations: VBD" (fun () ->
debug "Updating allowed operations: VBD";
List.iter (safe_wrapper "allowed_ops - VBDs" (fun self -> Xapi_vbd_helpers.update_allowed_operations ~__context ~self)) all_vbds;
debug "Finished updating allowed operations: VBD");
+ (* VIF *)
time_this "Cancel_tasks.update_all_allowed_operations: VIF" (fun () ->
debug "Updating allowed operations: VIF";
List.iter (safe_wrapper "allowed_ops - VIFs" (fun self -> Xapi_vif_helpers.update_allowed_operations ~__context ~self)) all_vifs;
debug "Finished updating allowed operations: VIF");
+ (* VDI *)
time_this "Cancel_tasks.update_all_allowed_operations: VDI" (fun () ->
debug "Updating allowed operations: VDI";
let sr_records = List.map (fun sr -> (sr, Db.SR.get_record_internal ~__context ~self:sr)) all_srs in
@@ -52,12 +56,14 @@ let update_all_allowed_operations ~__context =
List.iter (safe_wrapper "allowed_ops - VDIs"
(fun self -> Xapi_vdi.update_allowed_operations_internal ~__context ~self ~sr_records ~pbd_records ~vbd_records)) all_vdis;
debug "Finished updating allowed operations: VDI");
+ (* SR *)
time_this "Cancel_tasks.update_all_allowed_operations: SR" (fun () ->
debug "Updating allowed operations: SR";
List.iter (safe_wrapper "allowed_ops" (fun self ->
Db.SR.set_current_operations ~__context ~self ~value:[];
Xapi_sr_operations.update_allowed_operations ~__context ~self)) all_srs;
debug "Finished updating allowed operations: SR");
+ (* Host *)
time_this "Cancel_tasks.update_all_allowed_operations: host" (fun () ->
debug "Updating allowed operations: host";
List.iter (safe_wrapper "allowed_ops - host" (fun self -> Xapi_host_helpers.update_allowed_operations ~__context ~self)) all_hosts;

0 comments on commit ab37934

Please sign in to comment.