1
0
mirror of https://github.com/containers/youki synced 2024-11-23 17:32:15 +01:00
Commit Graph

5 Commits

Author SHA1 Message Date
David Gibson
3626f4f4ec Move global command line options to liboci-cli crate
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>
2021-12-03 12:41:55 +11:00
David Gibson
2b66005d93 Move subcommand enums to liboci-cli crate
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>
2021-12-03 12:41:55 +11:00
David Gibson
09d9fae8cd Move unspecified, but common subcommands to liboci-cli crate
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>
2021-12-03 12:41:55 +11:00
David Gibson
ea448d05a8 Add some rudimentary documentation to the liboci-cli crate
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>
2021-12-03 12:41:50 +11:00
David Gibson
bf5577ccc0 Move argument structures for specified subcommands to a new crate
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>
2021-12-02 17:20:31 +11:00