lxc: add has_image() helper and use yaml BaseLoader (CRAFT-144)
Metadata
Current evaluation
Merged in canonical/craft-providers#51 (commit 4772124, merge 96b2b6a), adding LXD has_image() and using yaml.BaseLoader so image timestamps remain strings.
Resolution: closed resolved
Reason: The approved PR was merged into main, adding has_image() and BaseLoader-based image parsing, with regression tests for broken timestamps requested during review.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The image list data is a little complex for a caller to simply
check if an image is available. This adds has_image() helper
to do that check.
While parsing image data, LXD tends to trip up Yaml's Loader
when parsing timestamps into datetime format. Use the BaseLoader
instead to avoid parsing timestamps (which may be invalid) and
simply keep them as strings.
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/craft-providers#51 (commit 4772124, merge 96b2b6a), adding LXD has_image() and using yaml.BaseLoader so image timestamps remain strings. | |
| qwen/qwen3.6-35b-a3b | — | closed resolved | Merged PR adding `has_image()` helper and switching LXD image parsing to `yaml.BaseLoader` to prevent timestamp parsing errors. (CRAFT-144) |
Update history
| Date | Change |
|---|---|
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #52 lxd: add snapshot support (CRAFT-144) | craft-providers | merged | LXD snapshot support was merged in canonical/craft-providers#52 via commit 2ddab88 (implementation 5d49777), adding CRAFT-144 functionality. |