Parse an ostree origin file (a keyfile) and extract the targeted container image reference.
(origin: &glib::KeyFile)
| 173 | /// Parse an ostree origin file (a keyfile) and extract the targeted |
| 174 | /// container image reference. |
| 175 | fn get_image_origin(origin: &glib::KeyFile) -> Result<Option<OstreeImageReference>> { |
| 176 | origin |
| 177 | .optional_string("origin", ostree_container::deploy::ORIGIN_CONTAINER) |
| 178 | .context("Failed to load container image from origin")? |
| 179 | .map(|v| ostree_container::OstreeImageReference::try_from(v.as_str())) |
| 180 | .transpose() |
| 181 | } |
| 182 | |
| 183 | pub(crate) struct Deployments { |
| 184 | pub(crate) staged: Option<ostree::Deployment>, |
no test coverage detected