Skip to content

Commit

Permalink
features: Add features subcommand
Browse files Browse the repository at this point in the history
The 'features' subcommand is not publicly documented yet, but it was introduced
in `runc` in opencontainers/runc#3296.

Signed-off-by: Christophe de Dinechin <[email protected]>
  • Loading branch information
c3d committed Mar 7, 2023
1 parent d1fabbb commit 312700d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions crates/liboci-cli/src/features.rs
Original file line number Diff line number Diff line change
@@ -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 {}
6 changes: 4 additions & 2 deletions crates/liboci-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -52,6 +53,7 @@ pub enum CommonCmd {
Checkpointt(Checkpoint),
Events(Events),
Exec(Exec),
Features(Features),
List(List),
Pause(Pause),
#[clap(allow_hyphen_values = true)]
Expand Down

0 comments on commit 312700d

Please sign in to comment.