Skip to content

Commit

Permalink
rust,runtime: add MountUidMapping and MountGidMapping
Browse files Browse the repository at this point in the history
Add IDMapping for mount points see opencontainers/runtime-spec#1143

Signed-off-by: Aditya R <arajan@redhat.com>
  • Loading branch information
flouthoc committed Aug 26, 2022
1 parent ac69f5a commit d59cc93
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,9 @@ pub struct Mount {
#[serde(rename = "destination")]
pub destination: String,

#[serde(rename = "gidMappings")]
pub gid_mappings: Option<Vec<MountGidMapping>>,

#[serde(rename = "options")]
pub options: Option<Vec<String>>,

Expand All @@ -617,6 +620,33 @@ pub struct Mount {

#[serde(rename = "type")]
pub mount_type: Option<String>,

#[serde(rename = "uidMappings")]
pub uid_mappings: Option<Vec<MountUidMapping>>,
}

#[derive(Serialize, Deserialize)]
pub struct MountGidMapping {
#[serde(rename = "containerID")]
pub container_id: i64,

#[serde(rename = "hostID")]
pub host_id: i64,

#[serde(rename = "size")]
pub size: i64,
}

#[derive(Serialize, Deserialize)]
pub struct MountUidMapping {
#[serde(rename = "containerID")]
pub container_id: i64,

#[serde(rename = "hostID")]
pub host_id: i64,

#[serde(rename = "size")]
pub size: i64,
}

#[derive(Serialize, Deserialize)]
Expand Down

0 comments on commit d59cc93

Please sign in to comment.