Query the container image reference for a deployment
(
deploy: &ostree::Deployment,
)
| 175 | |
| 176 | /// Query the container image reference for a deployment |
| 177 | fn deployment_origin_container( |
| 178 | deploy: &ostree::Deployment, |
| 179 | ) -> Result<Option<OstreeImageReference>> { |
| 180 | let origin = deploy |
| 181 | .origin() |
| 182 | .map(|o| o.optional_string("origin", ORIGIN_CONTAINER)) |
| 183 | .transpose()? |
| 184 | .flatten(); |
| 185 | let r = origin |
| 186 | .map(|v| OstreeImageReference::try_from(v.as_str())) |
| 187 | .transpose()?; |
| 188 | Ok(r) |
| 189 | } |
| 190 | |
| 191 | /// Remove all container images which are not the target of a deployment. |
| 192 | /// This acts equivalently to [`super::store::remove_images()`] - the underlying layers |
no test coverage detected