provide docv for required arguments
This commit is contained in:
parent
a124b3eb30
commit
90157bd60d
|
@ -18,7 +18,7 @@ Command-line applications for local and remote management are provided as well
|
|||
- `vmmp_request`: creates a certificate signing request containing a command
|
||||
- `vmmp_ca`: certificate authority operations: sign, generate (and revoke)
|
||||
|
||||
Please read [the blog article](https://hannes.nqsb.io/Posts/VMM) for motivation
|
||||
Please read [the (outdated) blog article](https://hannes.nqsb.io/Posts/VMM) for motivation
|
||||
and an overview.
|
||||
|
||||
The implementation uses explicit errors (no exceptions), and make mostly use of
|
||||
|
|
|
@ -101,7 +101,7 @@ let cpus =
|
|||
|
||||
let vms =
|
||||
let doc = "Number of VMs to allow" in
|
||||
Arg.(required & pos 0 (some int) None & info [] ~doc)
|
||||
Arg.(required & pos 0 (some int) None & info [] ~doc ~docv:"VMS")
|
||||
|
||||
let block_size =
|
||||
let doc = "Block storage to allow" in
|
||||
|
|
|
@ -81,11 +81,11 @@ open Cmdliner
|
|||
|
||||
let nam =
|
||||
let doc = "Name to provision" in
|
||||
Arg.(required & pos 0 (some string) None & info [] ~doc)
|
||||
Arg.(required & pos 0 (some string) None & info [] ~doc ~docv:"VM")
|
||||
|
||||
let cacert =
|
||||
let doc = "cacert" in
|
||||
Arg.(required & pos 1 (some file) None & info [] ~doc)
|
||||
Arg.(required & pos 1 (some file) None & info [] ~doc ~docv:"CACERT")
|
||||
|
||||
let key =
|
||||
let doc = "Private key" in
|
||||
|
@ -93,8 +93,8 @@ let key =
|
|||
|
||||
let db =
|
||||
let doc = "Database" in
|
||||
Arg.(required & pos 0 (some string) None & info [] ~doc)
|
||||
Arg.(required & pos 0 (some string) None & info [] ~doc ~docv:"DB")
|
||||
|
||||
let mem =
|
||||
let doc = "Memory to provision" in
|
||||
Arg.(required & pos 2 (some int) None & info [] ~doc)
|
||||
Arg.(required & pos 2 (some int) None & info [] ~doc ~docv:"MEM")
|
||||
|
|
|
@ -135,16 +135,16 @@ let ca_key =
|
|||
Arg.(value & opt string "ca.key" & info [ "ca-key" ] ~doc)
|
||||
|
||||
let destination =
|
||||
Arg.(required & pos 0 (some host_port) None & info [] ~docv:"destination"
|
||||
~doc:"the destination hostname:port to connect to")
|
||||
let doc = "the destination hostname:port to connect to" in
|
||||
Arg.(required & pos 0 (some host_port) None & info [] ~doc ~docv:"HOST:PORT")
|
||||
|
||||
let image =
|
||||
let doc = "File of virtual machine image." in
|
||||
Arg.(required & pos 2 (some file) None & info [] ~doc)
|
||||
Arg.(required & pos 2 (some file) None & info [] ~doc ~docv:"IMAGE")
|
||||
|
||||
let vm_name =
|
||||
let doc = "Name virtual machine." in
|
||||
Arg.(required & pos 1 (some vm_c) None & info [] ~doc)
|
||||
Arg.(required & pos 1 (some vm_c) None & info [] ~doc ~docv:"VM")
|
||||
|
||||
let destroy_cmd =
|
||||
let doc = "destroys a virtual machine" in
|
||||
|
|
|
@ -99,11 +99,11 @@ let socket =
|
|||
|
||||
let image =
|
||||
let doc = "File of virtual machine image." in
|
||||
Arg.(required & pos 1 (some file) None & info [] ~doc)
|
||||
Arg.(required & pos 1 (some file) None & info [] ~doc ~docv:"IMAGE")
|
||||
|
||||
let vm_name =
|
||||
let doc = "Name virtual machine." in
|
||||
Arg.(required & pos 0 (some vm_c) None & info [] ~doc)
|
||||
Arg.(required & pos 0 (some vm_c) None & info [] ~doc ~docv:"VM")
|
||||
|
||||
let destroy_cmd =
|
||||
let doc = "destroys a virtual machine" in
|
||||
|
|
|
@ -47,19 +47,19 @@ open Vmm_cli
|
|||
|
||||
let cas =
|
||||
let doc = "The full path to PEM encoded certificate authorities. Can either be a FILE or a DIRECTORY." in
|
||||
Arg.(required & pos 0 (some string) None & info [] ~docv:"FILE" ~doc)
|
||||
Arg.(required & pos 0 (some string) None & info [] ~doc ~docv:"CA")
|
||||
|
||||
let client_cert =
|
||||
let doc = "Use a client certificate chain" in
|
||||
Arg.(required & pos 1 (some file) None & info [] ~doc)
|
||||
Arg.(required & pos 1 (some file) None & info [] ~doc ~docv:"CERT")
|
||||
|
||||
let client_key =
|
||||
let doc = "Use a client key" in
|
||||
Arg.(required & pos 2 (some file) None & info [] ~doc)
|
||||
Arg.(required & pos 2 (some file) None & info [] ~doc ~docv:"KEY")
|
||||
|
||||
let destination =
|
||||
Arg.(required & pos 3 (some host_port) None & info [] ~docv:"destination"
|
||||
~doc:"the destination hostname:port to connect to")
|
||||
let doc = "the destination hostname:port to connect to" in
|
||||
Arg.(required & pos 3 (some host_port) None & info [] ~docv:"HOST:PORT" ~doc)
|
||||
|
||||
let cmd =
|
||||
let doc = "VMM remote TLS client" in
|
||||
|
|
|
@ -287,7 +287,7 @@ let socket =
|
|||
Arg.(value & opt string (Vmm_core.socket_path `Stats) & info [ "socket" ] ~doc)
|
||||
|
||||
let influx =
|
||||
Arg.(required & pos 0 (some host_port) None & info [] ~docv:"influx"
|
||||
Arg.(required & pos 0 (some host_port) None & info [] ~docv:"INFLUXHOST:INFLUXPORT"
|
||||
~doc:"the influx hostname:port to connect to")
|
||||
|
||||
let cmd =
|
||||
|
|
|
@ -180,15 +180,15 @@ open Vmm_cli
|
|||
|
||||
let cacert =
|
||||
let doc = "CA certificate" in
|
||||
Arg.(required & pos 0 (some file) None & info [] ~doc)
|
||||
Arg.(required & pos 0 (some file) None & info [] ~doc ~docv:"CA")
|
||||
|
||||
let cert =
|
||||
let doc = "Certificate" in
|
||||
Arg.(required & pos 1 (some file) None & info [] ~doc)
|
||||
Arg.(required & pos 1 (some file) None & info [] ~doc ~docv:"CERT")
|
||||
|
||||
let key =
|
||||
let doc = "Private key" in
|
||||
Arg.(required & pos 2 (some file) None & info [] ~doc)
|
||||
Arg.(required & pos 2 (some file) None & info [] ~doc ~docv:"KEY")
|
||||
|
||||
let port =
|
||||
let doc = "TCP listen port" in
|
||||
|
|
|
@ -97,11 +97,11 @@ open Vmm_cli
|
|||
|
||||
let csr =
|
||||
let doc = "signing request" in
|
||||
Arg.(required & pos 3 (some file) None & info [] ~doc)
|
||||
Arg.(required & pos 3 (some file) None & info [] ~doc ~docv:"CSR")
|
||||
|
||||
let key =
|
||||
let doc = "Private key" in
|
||||
Arg.(required & pos 2 (some file) None & info [] ~doc)
|
||||
Arg.(required & pos 2 (some file) None & info [] ~doc ~docv:"KEY")
|
||||
|
||||
let days =
|
||||
let doc = "Number of days" in
|
||||
|
@ -109,7 +109,7 @@ let days =
|
|||
|
||||
let db =
|
||||
let doc = "Database" in
|
||||
Arg.(required & pos 1 (some string) None & info [] ~doc)
|
||||
Arg.(required & pos 1 (some string) None & info [] ~doc ~docv:"DB")
|
||||
|
||||
let sname =
|
||||
let doc = "Server name" in
|
||||
|
|
|
@ -64,11 +64,11 @@ open Vmm_cli
|
|||
|
||||
let image =
|
||||
let doc = "File of virtual machine image." in
|
||||
Arg.(required & pos 1 (some file) None & info [] ~doc)
|
||||
Arg.(required & pos 1 (some file) None & info [] ~doc ~docv:"IMAGE")
|
||||
|
||||
let vm_name =
|
||||
let doc = "Name virtual machine." in
|
||||
Arg.(required & pos 0 (some vm_c) None & info [] ~doc)
|
||||
Arg.(required & pos 0 (some vm_c) None & info [] ~doc ~docv:"VM")
|
||||
|
||||
let destroy_cmd =
|
||||
let doc = "destroys a virtual machine" in
|
||||
|
|
Loading…
Reference in a new issue