feat: add wso2 account rename <old> <new>
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 0
- Forks
- 3
- Avg merge
- 8h 43m
- Merged PRs (30d)
- 60
Description
What to build
wso2 account rename <old> <new> renames an account the shell already holds. It matters more once a new account is named account-1 by default (#175): a numbered name carries no meaning, so a person who wants a meaningful one needs a way to give it after the fact rather than only at creation.
The rename changes the account's own name and repoints every context that names it, under the same lock every other mutating account command writes under. It does not touch the account's credentialRef, and so moves nothing in the secure store: the store cannot list its own entries, so an entry moved and lost could never be revoked afterwards. It also does not rename a same-named context — contexts are separate handles with their own create command — and the report says so, so a user is not left believing the context followed.
Refusals: an unknown account, a new name already taken by an account, and a name that is not a legal account name, each recovering the way the neighbouring account commands recover.
Acceptance criteria
-
wso2 account rename <old> <new>renames the account and every context that pointed at it now points at the new name. - The account's
credentialRefis unchanged, and no secure-store entry is moved or removed. - A same-named context keeps its old name, and the report says the context was not renamed.
- Renaming an account that does not exist is refused, and names how to see what exists.
- Renaming to a name another account already holds is refused.
- Renaming to a name that is not a legal account name is refused, and states the name rule.
- The command renders the same machine-readable result shape the rest of the
wso2 accountfamily renders, and honours--output json. -
docs/reference/commands.mdhas awso2 account renamerow besideaccount create,add-productandremove-product, and the command synopsis near the top of the file matches.
Blocked by
- None — can start immediately.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing wso2 account command entry points and neighboring account commands to follow their locking, refusal, reporting, and machine-readable output conventions. Update docs/reference/commands.md alongside the named account commands, then verify the acceptance criteria: contexts are repointed without changing credential references, same-named contexts are reported unchanged, refusals are clear, and --output json matches the family shape.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100