The OCI CLI document doesn't define any required global options, but there
are a number which are commonly accepted by most runtimes. We define this
subset there, and incorporate it into the top-level Parser in Youki using
fixes #508
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Because we want to allow a final user to add extension commands
easily, it doesn't work to entirely move the enum of runtime
subcommands into the liboci-cli crate. However, using the
incoporate those into the top-level enum defined by youki.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
The OCI Runtime Command Line Interface specification[0] specifies only five
subcommands to implement. However, there are a number of other subcommands
that are commonly implemented by runtimes, and commonly used by their
clients.
Move the parsing of a number of those subcommands into the liboci-cli
crate. This leaves only one subcommand "info" parsed in the youki crate.
As far as I can tell this is a youki specific extension, since it doesn't
appear in either runc or crun.
[0] https://github.com/opencontainers/runtime-tools/blob/master/docs/command-line-interface.md
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
In particular it has a summary of what subcommands implemented by various
runtimes are included in the frontend crate so far.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
It would be useful to have an independent crate covering solely the OCI
command line front end of youki, to which other backends can then be
written.
To start on that, we create a new "oci-runtime-clap" crate, and move some
subcommand structure definitions into it. For now we only move the
subcommands which are actually specified in the OCI runtime command line
interface document (v1.0.1):
https://github.com/opencontainers/runtime-tools/blob/master/docs/command-line-interface.md
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>