Skip to content

storcli2: add JSON envelope and decoder#48

Merged
ezekiel-alexrod merged 1 commit into
mainfrom
feature/storcli2-envelope-structs
Jun 3, 2026
Merged

storcli2: add JSON envelope and decoder#48
ezekiel-alexrod merged 1 commit into
mainfrom
feature/storcli2-envelope-structs

Conversation

@ezekiel-alexrod
Copy link
Copy Markdown
Contributor

Add a minimal storcli2 package holding the shared command envelope
(CmdOutput/Controller/CommandStatus/DetailedStatus) and Decode([]byte), which
unmarshals the envelope and surfaces the in-JSON errors storcli2 reports at
exit 0 (non-Success Command Status -> Detailed Status message, falling back to
Description). Per-section structs (controllers, physical drives, virtual
drives) live in their getter packages, like the mdadm/ssacli adapters.

Add a minimal storcli2 package holding the shared command envelope
(CmdOutput/Controller/CommandStatus/DetailedStatus) and Decode([]byte), which
unmarshals the envelope and surfaces the in-JSON errors storcli2 reports at
exit 0 (non-Success Command Status -> Detailed Status message, falling back to
Description). Per-section structs (controllers, physical drives, virtual
drives) live in their getter packages, like the mdadm/ssacli adapters.
@ezekiel-alexrod ezekiel-alexrod requested a review from a team as a code owner June 3, 2026 10:21
Comment thread pkg/implementation/storcli2/decode.go
Copy link
Copy Markdown

@eg-ayoub eg-ayoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Copy Markdown
Contributor

@TeddyAndrieux TeddyAndrieux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ezekiel-alexrod ezekiel-alexrod merged commit 148ae05 into main Jun 3, 2026
3 checks passed
@ezekiel-alexrod ezekiel-alexrod deleted the feature/storcli2-envelope-structs branch June 3, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants