Permalink
Browse files

Remove an unused function.

This function wasn't being used as far back as George, so I think it's
safe to get rid of it.

Signed-off-by: John Else <john.else@citrix.com>
  • Loading branch information...
1 parent df292dc commit 2c0fbe11a889b928cb63262b5a019b67f12555f2 @johnelse johnelse committed Nov 8, 2012
Showing with 0 additions and 16 deletions.
  1. +0 −14 ocaml/xapi/xapi_vm.ml
  2. +0 −2 ocaml/xapi/xapi_vm.mli
View
@@ -717,20 +717,6 @@ let get_possible_hosts ~__context ~vm =
let get_allowed_VBD_devices ~__context ~vm = List.map (fun d -> string_of_int (Device_number.to_disk_number d)) (allowed_VBD_devices ~__context ~vm)
let get_allowed_VIF_devices = allowed_VIF_devices
-(** Mark all currently-attached VBDs and VIFs as reserved, call some function and then
- unmark them again. This allows us to (eg) safeguard them across reboot operations. *)
-let reserve_vbds_and_vifs ~__context ~vm f =
- let vbds = Db.VM.get_VBDs ~__context ~self:vm in
- let vbds = List.filter (fun self -> try Db.VBD.get_currently_attached ~__context ~self with _ -> false) vbds in
- let vifs = Db.VM.get_VIFs ~__context ~self:vm in
- let vifs = List.filter (fun self -> try Db.VIF.get_currently_attached ~__context ~self with _ -> false) vifs in
-
- let set_all value =
- List.iter (fun self -> try Db.VBD.set_reserved ~__context ~self ~value with _ -> ()) vbds;
- List.iter (fun self -> try Db.VIF.set_reserved ~__context ~self ~value with _ -> ()) vifs in
- set_all true;
- finally f (fun () -> set_all false)
-
(* Undocumented Rio message, deprecated in favour of standard VM.clone *)
let csvm ~__context ~vm =
Xapi_vm_clone.clone ~__context Xapi_vm_clone.Disk_op_clone ~vm
View
@@ -200,8 +200,6 @@ val get_allowed_VBD_devices :
__context:Context.t -> vm:[ `VM ] Ref.t -> string list
val get_allowed_VIF_devices :
__context:Context.t -> vm:[ `VM ] Ref.t -> string list
-val reserve_vbds_and_vifs :
- __context:Context.t -> vm:[ `VM ] Ref.t -> (unit -> 'a) -> 'a
val csvm : __context:Context.t -> vm:API.ref_VM -> [ `VM ] Ref.t
val maximise_memory :
__context:Context.t ->

0 comments on commit 2c0fbe1

Please sign in to comment.