Repository navigation
Conversation
chrysh
force-pushed
the
ocp-streaming-agent-2
branch
from
December 1, 2026 16:06
9ece6f2 to
9f87b50
Compare
The new crate services/ocp-recovery/agent reads PROT_CAP, DEVICE_STATUS and RECOVERY_STATUS through a RegisterAccess that the transport implements, and returns the decoded register or an AgentError that names the command. RegisterAccess::read passes the response to a parse closure, so the response stays in the receive buffer of the transport. The new DeviceStatus::parse in the api crate reads bytes 0 to 6 only, because a response can carry vendor status after byte 6. Signed-off-by: Christina Quast <christina.quast@9elements.com> Assisted-by: Claude Opus 5.5
chrysh
force-pushed
the
ocp-streaming-agent-2
branch
from
December 1, 2026 16:17
9f87b50 to
21b4d59
Compare
This branch has not been deployed
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.
Later PRs add the Recovery Agent sequence that pushes an image, and the
sequence needs typed register reads. This PR adds the reads in a new
crate,
services/ocp-recovery/agent(RegisterAccess,AgentError,read_prot_cap,read_device_status,read_recovery_status), andDeviceStatus::parsein the api crate forread_device_status.Open questions:
RegisterAccess::readtakes a parse closure, which makesreadageneric method, so no caller can hold a
dyn RegisterAccess. Is ageneric
readfine, or shouldreadfill a caller buffer and returnthe length?
such as
ProtCaptoRecoveryCommand::ProtCap? Today only thestruct_matches_command_tableasserts tie a struct to its command.