Skip to content

Commit

Permalink
Add missing opts to ContainerCheckpointOptsBuilder (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
vv9k authored Jun 24, 2023
1 parent b14f1b7 commit f35e6f9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* `tty::Multiplexer` now owns a copy of Podman client. It mean's that signature of `Container::attach` and `Exec::start` changed.
* Fixed `ContainerWaitOpts::conditions` parameter serialization
* Add missing derives for `LibpodPingInfo`, `Event`, `Actor`, `ContainerStatus`, `ContainerHealth`, `PodStatus`, `ContainerMount`, `JsonErrorDetail`, `JsonError`
* Add missing opts to `ContainerCheckpointOptsBuilder`: `export`, `file_locks`, `ignore_volumes`, `pre_checkpoint`, `with_previous`.

# 0.10.0
* *BREAKING* `Exec::start` now returns `Result<Option<tty::Multiplexer>>` (was `Result<tty::Multiplexer>`) [#155](https://github.com/vv9k/podman-api-rs/pull/155)
Expand Down
25 changes: 25 additions & 0 deletions src/opts/containers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,26 @@ impl ContainerCheckpointOpts {
}

impl ContainerCheckpointOptsBuilder {
impl_url_bool_field!(
/// Export the checkpoint image to a tar.gz
export => "export"
);

impl_url_bool_field!(
/// Checkpoint a container with filelocks`
file_locks => "fileLocks"
);

impl_url_bool_field!(
/// Do not include root file-system changes when exporting
ignore_root_fs => "ignoreRootFS"
);

impl_url_bool_field!(
/// Do not include associated volumes. can only be used with export
ignore_volumes => "ignoreVolumes"
);

impl_url_bool_field!(
/// Keep all temporary checkpoint files
keep => "keep"
Expand All @@ -174,6 +189,11 @@ impl ContainerCheckpointOptsBuilder {
leave_running => "leaveRunning"
);

impl_url_bool_field!(
/// Dump the container's memory information only, leaving the container running. only works on runc 1.0-rc or higher
pre_checkpoint => "preCheckpoint"
);

impl_url_bool_field!(
/// Add checkpoint statistics to the returned CheckpointReport
print_stats => "printStats"
Expand All @@ -183,6 +203,11 @@ impl ContainerCheckpointOptsBuilder {
/// Checkpoint a container with established TCP connections
tcp_established => "tcpEstablished"
);

impl_url_bool_field!(
/// Check out the container with previous criu image files in pre-dump. only works on runc 1.0-rc or higher
with_previous => "withPrevious"
);
}

impl_opts_builder!(url =>
Expand Down

0 comments on commit f35e6f9

Please sign in to comment.