Skip to content

W-21213800 adding realm, alias and usage commands in ODS#139

Merged
charithaT07 merged 7 commits intomainfrom
W-21213800-realm-alias-usage-ods-commands
Feb 15, 2026
Merged

W-21213800 adding realm, alias and usage commands in ODS#139
charithaT07 merged 7 commits intomainfrom
W-21213800-realm-alias-usage-ods-commands

Conversation

@charithaT07
Copy link
Collaborator

@charithaT07 charithaT07 commented Feb 12, 2026

What this PR does

This PR adds support for sandbox realm management, aliases, usage and reset commands in the CLI, and updates docs/tests so the new flows are clear and reliable.

New and updated commands

  • Usage

    • sandbox usage – sandbox‑level usage stats (calls /sandboxes/{sandboxId}/usage), with date range flags and JSON or summary output.
    • sandbox realm usage – realm‑level usage stats (calls /realms/{realm}/usage), supports --from, --to, --granularity, and --detailed-report.
  • Realm

    • sandbox realm get – shows realm metadata and configuration (including schedulers), either as JSON or a nicely formatted detail view.
    • sandbox realm list – lists accessible realms and whether they’re enabled.
    • sandbox realm update – updates realm configuration (max-sandbox-ttl, default-sandbox-ttl, start/stop schedulers)
  • Sandbox reset

    • sandbox reset – triggers a sandbox reset via ODS, with the existing confirmation, --force, and optional --wait / polling behavior preserved. When --wait is set, it uses waitForSandbox to follow the sandbox back to started.
  • Sandbox aliases

    • sandbox alias create – creates an alias for a sandbox with flags for --unique and --letsencrypt, plus --no-open to skip opening the browser. Returns alias info and, in non JSON mode, prints DNS verification guidance.
    • sandbox alias list – lists all aliases for a sandbox or fetches a single alias when --alias-id is provided.
    • sandbox alias delete – deletes an alias with an interactive confirm (or --force), and treats 404 as “already deleted”.
  • Sandbox IPs

    • sandbox ips – shows inbound/outbound IPs from [/system], or realm‑scoped IPs from /realms/{realm}/system when --realm is used. Examples are updated to highlight the realm flag.

Docs and tests

  • docs/cli/sandbox.md now has clear sections for:

    • sandbox vs realm usage,
    • sandbox IPs,
    • sandbox reset,
    • alias commands,
    • realm commands,
  • Added unit tests for every new/refactored ODS command above, using the existing test helpers (createIsolatedConfigHooks, createTestCommand, runSilent) and stubbing odsClient and sandbox/realm resolution.

Testing

How was this tested?


  • Tests pass (pnpm test)
  • Code is formatted (pnpm run format)

@charithaT07 charithaT07 changed the title W 21213800 realm alias usage ods commands W-21213800 realm alias usage ods commands Feb 12, 2026
@charithaT07 charithaT07 changed the title W-21213800 realm alias usage ods commands W-21213800 adding realm, alias and usage commands in ODS Feb 12, 2026
@charithaT07 charithaT07 marked this pull request as ready for review February 12, 2026 20:08
@charithaT07 charithaT07 requested a review from clavery as a code owner February 12, 2026 20:08
@charithaT07 charithaT07 merged commit 232e6d2 into main Feb 15, 2026
4 checks passed
@charithaT07 charithaT07 deleted the W-21213800-realm-alias-usage-ods-commands branch February 15, 2026 17:05
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.

2 participants