Repository navigation
Capone: send the OS family as an eighth field (#43) - #44
Merged
Merged
Conversation
The Capone image line now ends with Image::getOSFamily(), so FOS can place an osid it has no table entry for. Fields 1-7 keep their order; an old FOS ignores the eighth. The field is empty on a core without getOSFamily() (method_exists guard), so the plugin still works on any fogproject 1.6. The line building moves to a static imageLine() so a test can drive it. No plugin version bump. Refs #43 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #43.
Problem
Capone gives FOS each image as
path|osid|type|parttype|format|storage|storageip. The line carries no OS family, so FOS falls back to its built-in osid table, and a Capone image whose osid FOS does not know stops the listing.Change
CaponeTasking::imageLine()builds the line, andimagelookupbase64-encodes it as before.Image::getOSFamily()(fogproject #2085). Amethod_existsguard sends an empty field on a core without that method, so the plugin still works with any fogproject 1.6.$1–$7, and ignores the new field. FOS reads it from FOGProject/fos (companion PR).Test
tests/capone-image-line.test.php: the full line for an image with a family, and an empty eighth field for an image class with nogetOSFamily(). It failed before the change. It also fails when the guard is removed and when the eighth field is dropped (both checked by mutation).sh tests/run-all.sh: 22 passed, 0 failed.🤖 Generated with Claude Code