Skip to content

feat: support YAML output from fabricopsctl status - #35

Merged
dpereowei merged 2 commits into
LF-Decentralized-Trust-labs:mainfrom
IzzaldinSamir:feat-yaml-status-v1
Aug 19, 2026
Merged

feat: support YAML output from fabricopsctl status#35
dpereowei merged 2 commits into
LF-Decentralized-Trust-labs:mainfrom
IzzaldinSamir:feat-yaml-status-v1

Conversation

@IzzaldinSamir

Copy link
Copy Markdown
Contributor

Closes #32

The Feature

fabricopsctl status currently supports table and json output. This PR adds support for yaml output, which is the natural format for Kubernetes users interacting with custom resources.

Implementation Details

  • Added sigs.k8s.io/yaml import to main.go.
  • Added writeYAML function to serialize status output identically to writeJSON.
  • Expanded the format validation switch in runStatus to accept "yaml".
  • Added test cases in main_test.go to ensure the -o yaml flag is successfully recognized by the CLI for both networks and participants without throwing formatting errors.

Signed-off-by: Izzaldin <izzaldinsamir@gmail.com>
   
Signed-off-by: Izzaldin <izzaldinsamir@gmail.com>
@dpereowei
dpereowei merged commit 0e3eaa7 into LF-Decentralized-Trust-labs:main Aug 19, 2026
8 checks passed
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.

Support YAML output from fabricopsctl status

2 participants