Skip to content

Commit ca4c38e

Browse files
authored
Merge pull request #2792 from robhoes/transform
Switch over to v6 interface from xcp-idl
2 parents d1bbffc + 4e985a0 commit ca4c38e

File tree

17 files changed

+53
-445
lines changed

17 files changed

+53
-445
lines changed

ocaml/idl/ocaml_backend/OMakefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,6 @@ XAPI_CLIENT_OBJS = \
121121
../../xapi/xapi_inventory \
122122
../../xapi/xapi_fist \
123123
../../xapi/features \
124-
../../license/v6rpc \
125-
../../license/v6daemon \
126-
../../license/v6errors \
127124
$(COMMON_OBJS) \
128125
$(CLIENT_OBJS)
129126

ocaml/license/license_init.ml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ module D = Debug.Make(struct let name="license" end)
1616
open D
1717

1818
(* Dependency injection for unit tests *)
19-
module type V6clientS = module type of V6client
20-
let v6client = ref (module V6client : V6clientS)
19+
module type V6clientS = module type of V6_client
20+
let v6client = ref (module V6_client : V6clientS)
2121

2222
let fst4 (e,_,_,_) = e
2323
and lst4 (_,_,_,i) = i
@@ -33,7 +33,7 @@ let find_min_edition allowed_editions =
3333

3434
(* xapi calls this function upon startup *)
3535
let initialise ~__context ~host =
36-
let module V6client = (val !v6client : V6clientS) in
36+
let module V6_client = (val !v6client : V6clientS) in
3737

3838
let set_licensing edition features additional =
3939
debug "Setting license to %s" edition;
@@ -43,10 +43,7 @@ let initialise ~__context ~host =
4343

4444
try
4545
let edition = Db.Host.get_edition ~__context ~self:host in
46-
let edition', features, additional =
47-
V6client.apply_edition ~__context edition ["force", "true"] in
48-
set_licensing edition' features additional
49-
46+
Xapi_host.apply_edition_internal ~__context ~host ~edition ~additional:["force", "true"]
5047
with
5148
| Api_errors.Server_error (code, []) when code = Api_errors.v6d_failure ->
5249
(* Couldn't communicate with v6d, so fall back to running in free/libre

ocaml/license/license_init.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @group Licensing
1616
*)
1717

18-
module type V6clientS = module type of V6client
18+
module type V6clientS = module type of V6_client
1919
val v6client : (module V6clientS) ref
2020

2121
(** Initialises licensing on xapi start up *)

ocaml/license/v6client.ml

Lines changed: 0 additions & 100 deletions
This file was deleted.

ocaml/license/v6client.mli

Lines changed: 0 additions & 29 deletions
This file was deleted.

ocaml/license/v6daemon.ml

Lines changed: 0 additions & 58 deletions
This file was deleted.

ocaml/license/v6daemon.mli

Lines changed: 0 additions & 18 deletions
This file was deleted.

ocaml/license/v6errors.ml

Lines changed: 0 additions & 19 deletions
This file was deleted.

ocaml/license/v6rpc.ml

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)