Skip to content

json manipulation automation skeleton - #197

Merged
tock-ibm merged 2 commits into
hyperledger:mainfrom
MayRosenbaum:json_manipulation_automation_skeleton
Oct 6, 2026
Merged

tock-ibm merged 2 commits into
hyperledger:mainfrom
MayRosenbaum:json_manipulation_automation_skeleton

Conversation

@MayRosenbaum

Copy link
Copy Markdown
Contributor

Type of change

  • New feature
  • Improvement

Description

JSON manipulation automation in fxadmin - skeleton

Related issues

issue #187

@coveralls

coveralls commented Sep 24, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 82.16% (+0.1%) from 82.02% — MayRosenbaum:json_manipulation_automation_skeleton into hyperledger:main

Comment thread tools/fxadmin/core/cli/cli.go Outdated
Comment thread tools/fxadmin/core/cli/cli.go
Comment thread tools/fxadmin/core/cli/handlers.go Outdated
Comment thread tools/fxadmin/core/modify/modify.go Outdated
party := modify.Command("party", "Add or remove ARMA parties, or change a party's nodes and CA lists.")

add := party.Command("add", "Add a new ARMA party and its orderer organization, if it does not already exist.")
partyDef := add.Flag(flagParty, "Path to the party definition YAML.").Required().ExistingFile()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The --party flag has inconsistent meaning across sibling subcommands. Here (modify party add) --party is a YAML file path (.ExistingFile()), but in modify party node and modify party ca (lines 364, 398) the same --party flag is a numeric PartyID (.Uint32()). Likewise --org is a YAML path in modify app add but an org name in modify app known-certs. Overloading one flag name with two semantics is error-prone; use distinct flag names (e.g. --party-def vs --party-id).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think its better to keep it as it is


remove := party.Command("remove",
"Remove an ARMA party (and its orderer org, unless another party is still associated with it).")
partyID := remove.Arg("party-id", "Numeric PartyID to remove.").Required().Uint32()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Inconsistent invocation style for the same identifier across sibling subcommands. party remove takes the PartyID as a positional Arg, while party node/party ca take it as the --party flag; similarly app remove takes the org name as a positional Arg while app known-certs add|remove take --org. Pick one convention (positional or flag) for the target identifier so the command surface is predictable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this follows the desing in the readme, lets keep it

Comment thread tools/fxadmin/core/cli/cli.go Outdated
@MayRosenbaum
MayRosenbaum force-pushed the json_manipulation_automation_skeleton branch from 3f75af3 to 86c8df8 Compare October 5, 2026 09:38
Signed-off-by: May.Buzaglo <May.Buzaglo@ibm.com>
Signed-off-by: May.Buzaglo <May.Buzaglo@ibm.com>
@tock-ibm
tock-ibm force-pushed the json_manipulation_automation_skeleton branch from 86c8df8 to 47b0ecf Compare October 6, 2026 08:02
@tock-ibm
tock-ibm merged commit 785da7f into hyperledger:main Oct 6, 2026
5 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.

3 participants