-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CP-26098: Port v6d interface from Camlp4 to PPX (#186)
Signed-off-by: Akanksha Mathur <akanksha.mathur@citrix.com>
- Loading branch information
1 parent
0d8714a
commit 79df187
Showing
4 changed files
with
153 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
(* Licensing CLI *) | ||
|
||
module Cmds =V6_interface.RPC_API(Cmdlinergen.Gen ()) | ||
|
||
let version_str description = | ||
let maj,min,mic = description.Idl.Interface.version in | ||
Printf.sprintf "%d.%d.%d" maj min mic | ||
|
||
let default_cmd = | ||
let doc = String.concat "" [ | ||
"A CLI for the V6d API. This allows scripting of the licensing daemon "; | ||
"for testing and debugging. This tool is not intended to be used as an "; | ||
"end user tool"] in | ||
Cmdliner.Term.(ret (const (fun _ -> `Help (`Pager, None)) $ const ())), | ||
Cmdliner.Term.info "licensing_cli" ~version:(version_str Cmds.description) ~doc | ||
|
||
let cli () = | ||
let rpc = V6_client.rpc in | ||
Cmdliner.Term.eval_choice default_cmd (List.map (fun t -> t rpc) (Cmds.implementation ())) | ||
|
||
let _ = cli () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters