Skip to content

feat: surface the cloud tier — balancer, dbaas, monitoring, cloud ssl - #77

Merged
sanchpet merged 5 commits into
mainfrom
feat/cloud-tier-cli
Jul 14, 2026
Merged

feat: surface the cloud tier — balancer, dbaas, monitoring, cloud ssl#77
sanchpet merged 5 commits into
mainfrom
feat/cloud-tier-cli

Conversation

@sanchpet

Copy link
Copy Markdown
Owner

What

Four new top-level command groups surfacing the cloud-tier SDK services that had no CLI presence:

  • balancer — cloud load balancers (list, config, create, edit, remove); structured repeatable --server/--rule flags.
  • dbaas — managed-database clusters (list, config, create, edit, remove, delete-database); plan via --plan or the --cpu/--memory/--storage/--replicas configurator.
  • monitoring — uptime monitoring: subscription plans/enable/disable/change, plus check (list/types/show/create/edit/activate/deactivate/remove/history) and contact (list/add-email|phone|telegram/edit/remove/verify) subgroups.
  • ssl — cloud/account SSL certificates (list, order-list, download, prolong-info, autoprolong, order, remove). Distinct from the shared-hosting hosting ssl (parent identifier cloudSSLCmd, Use: "ssl").

All four are registered as profile-bindable API command groups.

Why

Before this, VPS was the only cloud-tier service exposed in the CLI; balancer/dbaas/monitoring/cloud-ssl existed in the SDK (100% coverage) but weren't surfaced. This closes the SDK→CLI gap for the cloud panel.

Verification

  • mise run ci green — gofmt clean, golangci-lint 0 issues, tests pass, build ok.
  • Every command uses client() + render() (table/json in sync); mutating/destructive/billing ops confirm via the shared helper unless --yes.
  • Per-group command-tree tests; root tree assertion extended. No live/mutating API is exercised anywhere (create/order bill).

Built in parallel by isolated worktree agents (one group each), then integrated: cherry-picked onto one branch, profile binding + tree assertion added, full CI re-run.

sanchpet added 5 commits July 14, 2026 10:08
Surface the SDK's cloud load-balancer service (client.Balancer,
endpoint /balancer) as a top-level `balancer` group:

  - list   — the account's balancers (table + json)
  - config — order catalog (plans, protocols) + isCreateEnable
  - create — order a balancer; guarded by the confirm prompt (bills)
  - edit   — reconfigure in place; confirm unless --yes
  - remove — cancel a balancer; confirm unless --yes (destructive)

Servers and rules are supplied as repeatable structured flags
(--server ip[,weight[,vpsName]], --rule protoBal:portBal:protoSrv:portSrv),
parsed into the SDK's Server/Rule structs. Mutating and destructive
commands route through the shared confirm helper. Every command renders
through render() keeping the table and json paths in sync.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: sanchpet <petrov@sanch.pet>
Surface the SDK's managed-database service (client.DBaaS, endpoint /dbaas)
as a top-level command group, keeping the CLI a thin presentation layer.

Reads: 'dbaas list' (clusters) and 'dbaas config' (engine/plan catalog).
Lifecycle: 'dbaas create' (bills — plan by id or via the constructor from
--cpu/--memory/--storage/--replicas), 'dbaas edit', and the destructive
'dbaas remove' / 'dbaas delete-database'. Mutating and destructive ops
confirm via the shared huh helper unless --yes; every command renders
through render() with paired table/json paths.

First-order plumbing (getFirstOrderInfo/removeFirst/setUpgradeAgree/
validateUsers) is intentionally left unsurfaced — it is the promotional
onboarding flow, not part of the core cluster lifecycle.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: sanchpet <petrov@sanch.pet>
Surface the SDK's uptime-monitoring services as a top-level `monitoring`
group. Three SDK services back it: the subscription/tariff (/monitoring),
the checks (/monitoring/checks), and the notification contacts
(/monitoring/contacts).

- monitoring plans/enable/disable/change — the subscription; the billing
  toggles confirm unless --yes.
- monitoring check {list,types,show,create,edit,activate,deactivate,
  remove,history} — the check CRUD, with create mapping Spec fields to
  flags and confirming (it bills the check quota); remove confirms.
- monitoring contact {list,add-email,add-phone,add-telegram,edit,remove,
  verify,verify-status} — the contact lifecycle; add-telegram folds in the
  verify-code request; remove confirms.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: sanchpet <petrov@sanch.pet>
Surface the SDK's cloud/account SSL-certificate service (client.SSL,
endpoint /vps/ssl) as the top-level `ssl` group: list, order-list,
download, prolong-info, autoprolong, order and remove.

This is a separate SpaceWeb service from the existing `hosting ssl`
group (client.VHSSL, endpoint /vh/ssl), which covers shared-hosting
certificates. The two panels are distinct accounts, so they get
distinct command groups; the group short-description says so. The Go
identifier is cloudSSLCmd to avoid the sslCmd used by `hosting ssl`.

Mutating/destructive/paid ops confirm via the shared confirm helper
unless --yes: `order` states it bills before submitting a paid cert,
`remove` warns it is irreversible.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: sanchpet <petrov@sanch.pet>
Register balancer/dbaas/monitoring/ssl as profile-bindable API command groups
and add them to the root command-tree assertion.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: sanchpet <petrov@sanch.pet>
@sanchpet
sanchpet merged commit 982c2d0 into main Jul 14, 2026
2 checks passed
@sanchpet
sanchpet deleted the feat/cloud-tier-cli branch July 14, 2026 07: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.

1 participant