Skip to content

Commit d59cc93

Browse files
committed
rust,runtime: add MountUidMapping and MountGidMapping
Add IDMapping for mount points see opencontainers/runtime-spec#1143 Signed-off-by: Aditya R <[email protected]>
1 parent ac69f5a commit d59cc93

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/runtime/mod.rs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,9 @@ pub struct Mount {
609609
#[serde(rename = "destination")]
610610
pub destination: String,
611611

612+
#[serde(rename = "gidMappings")]
613+
pub gid_mappings: Option<Vec<MountGidMapping>>,
614+
612615
#[serde(rename = "options")]
613616
pub options: Option<Vec<String>>,
614617

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

618621
#[serde(rename = "type")]
619622
pub mount_type: Option<String>,
623+
624+
#[serde(rename = "uidMappings")]
625+
pub uid_mappings: Option<Vec<MountUidMapping>>,
626+
}
627+
628+
#[derive(Serialize, Deserialize)]
629+
pub struct MountGidMapping {
630+
#[serde(rename = "containerID")]
631+
pub container_id: i64,
632+
633+
#[serde(rename = "hostID")]
634+
pub host_id: i64,
635+
636+
#[serde(rename = "size")]
637+
pub size: i64,
638+
}
639+
640+
#[derive(Serialize, Deserialize)]
641+
pub struct MountUidMapping {
642+
#[serde(rename = "containerID")]
643+
pub container_id: i64,
644+
645+
#[serde(rename = "hostID")]
646+
pub host_id: i64,
647+
648+
#[serde(rename = "size")]
649+
pub size: i64,
620650
}
621651

622652
#[derive(Serialize, Deserialize)]

0 commit comments

Comments
 (0)