From 78467c929704b707b827c84429254764c3aafec0 Mon Sep 17 00:00:00 2001 From: Christophe de Dinechin Date: Tue, 7 Mar 2023 18:28:14 +0100 Subject: [PATCH] features: Add features subcommand The 'features' subcommand is not publicly documented yet, but it was introduced in `runc` in https://github.com/opencontainers/runc/pull/3296. Signed-off-by: Christophe de Dinechin --- crates/liboci-cli/src/features.rs | 7 +++++++ crates/liboci-cli/src/lib.rs | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 crates/liboci-cli/src/features.rs diff --git a/crates/liboci-cli/src/features.rs b/crates/liboci-cli/src/features.rs new file mode 100644 index 0000000000..109d54c17c --- /dev/null +++ b/crates/liboci-cli/src/features.rs @@ -0,0 +1,7 @@ +use clap::Parser; + +/// Return the features list for a container +/// This is not a documented subcommand of runc yet, but it was introduced by +/// https://github.com/opencontainers/runc/pull/3296 +#[derive(Parser, Debug)] +pub struct Features {} diff --git a/crates/liboci-cli/src/lib.rs b/crates/liboci-cli/src/lib.rs index 48fb9d46d9..7215b69112 100644 --- a/crates/liboci-cli/src/lib.rs +++ b/crates/liboci-cli/src/lib.rs @@ -17,6 +17,7 @@ pub use {create::Create, delete::Delete, kill::Kill, start::Start, state::State} mod checkpoint; mod events; mod exec; +mod features; mod list; mod pause; mod ps; @@ -26,8 +27,8 @@ mod spec; mod update; pub use { - checkpoint::Checkpoint, events::Events, exec::Exec, list::List, pause::Pause, ps::Ps, - resume::Resume, run::Run, spec::Spec, update::Update, + checkpoint::Checkpoint, events::Events, exec::Exec, features::Features, list::List, + pause::Pause, ps::Ps, resume::Resume, run::Run, spec::Spec, update::Update, }; // Subcommands parsed by liboci-cli, based on the [OCI @@ -52,6 +53,7 @@ pub enum CommonCmd { Checkpointt(Checkpoint), Events(Events), Exec(Exec), + Features(Features), List(List), Pause(Pause), #[clap(allow_hyphen_values = true)]