Skip to content

Commit

Permalink
fixup! maintenance: avoid deprecated bindings in uuidm 0.9.9
Browse files Browse the repository at this point in the history
  • Loading branch information
psafont committed Oct 8, 2024
1 parent 5f43b3f commit 6af1a94
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ocaml/libs/vhd/vhd_format/f.ml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ let _gib_shift = 30

let blank_uuid = Uuidm.nil

let new_uuid = Uuidm.v4_gen (Random.get_state ())
let new_uuid = Uuidm.v4_gen (Random.State.make_self_init ())

module Feature = struct
type t = Temporary
Expand Down
2 changes: 1 addition & 1 deletion ocaml/libs/xapi-inventory/lib/inventory.ml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ let inventory = Hashtbl.create 10

let inventory_m = Mutex.create ()

let new_uuid = Uuidm.v4_gen (Random.get_state ())
let new_uuid = Uuidm.v4_gen (Random.State.make_self_init ())

(* Compute the minimum necessary inventory file contents *)
let minimum_default_entries () =
Expand Down
4 changes: 3 additions & 1 deletion ocaml/xapi-guard/test/cache_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ let to_cache with_read_writes =
let* () = Lwt.pause () in
loop_and_stop f name uuid max sent
in
let vms = List.init 4 (fun _ -> Uuidm.v4_gen (Random.get_state ()) ()) in
let vms =
List.init 4 (fun _ -> Uuidm.v4_gen (Random.State.make_self_init ()) ())
in

List.concat
[
Expand Down
2 changes: 1 addition & 1 deletion ocaml/xapi-guard/test/xapi_guard_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ let xapi_rpc call =
| _ ->
Fmt.failwith "XAPI RPC call %s not expected in test" call.Rpc.name

let vm_uuid = Uuidm.v4_gen (Random.get_state ()) ()
let vm_uuid = Uuidm.v4_gen (Random.State.make_self_init ()) ()

let vm_uuid_str = Uuidm.to_string vm_uuid

Expand Down
2 changes: 1 addition & 1 deletion ocaml/xapi-idl/lib/uuidm_rpc_type.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Uuidm = struct
Rpc.Types.Abstract
{
aname= "uuid"
; test_data= [Uuidm.v4_gen (Random.get_state ()) ()]
; test_data= [Uuidm.v4_gen (Random.State.make_self_init ()) ()]
; rpc_of= (fun t -> Rpc.String (Uuidm.to_string t))
; of_rpc=
(function
Expand Down

0 comments on commit 6af1a94

Please sign in to comment.