Skip to content

feat(services): embed services list/enable/status in datumctl core - #250

Merged
scotwells merged 2 commits into
mainfrom
feat/services-cli-wiring
Jul 14, 2026
Merged

feat(services): embed services list/enable/status in datumctl core#250
scotwells merged 2 commits into
mainfrom
feat/services-cli-wiring

Conversation

@scotwells

Copy link
Copy Markdown
Contributor

What you get

datumctl services list, datumctl services enable <name>, and datumctl services status <name> — see which Datum Cloud services are available for your current project, request access to one, and check where a request stands (enabled, pending approval, denied, or not requested).

$ datumctl services list --project datum-cloud
NAME                   STATE         SINCE
AI Assistant           NotRequested
Billing                NotRequested
Compute                Active        46d ago
DNS                    NotRequested
IP Address Management  Active        15d ago
Network Services       NotRequested

These ship in datumctl core, the same way activity, ctx, and console do — no separate plugin install. That matters because plugins like compute already point users at datumctl services enable compute in their own error messages, so the command has to exist in the base binary for that guidance to work.

How it works

Wires the shared go.miloapis.com/service-catalog/pkg/cmd command group into the root command tree. The two scopes it spans have no single API serving both — Service lives only at the platform-wide root, ServiceEntitlement only inside a project's virtual control plane — so the command is given two lazy REST-config resolvers plus a lazy project resolver that reads live scope at RunE time (so a --project flag on the invocation is actually honored, rather than a value captured when the command tree was built). main.go routes the activation exit code through the existing top-level error path.

Replaces the draft SDK

This supersedes the draft service-activation SDK in #242 — the reusable logic now lives in service-catalog's pkg/activation + pkg/cmd and is imported rather than reimplemented here. #242 should be closed once this is confirmed good (handled separately).

Dependency / merge caveat

The service-catalog dependency is currently pinned to an unmerged, untagged commit (a002414) on milo-os/service-catalog#52. It will need re-pinning to a tagged release before this can merge — the same pin-chain sequencing this project has hit before (merge + tag service-catalog first, then re-pin here).

Related:

Verification

  • go build ./..., go vet ./..., gofmt all clean.
  • Manual smoke test against a live session: services list returns real entitlement state for a real project; --project <id> correctly overrides DATUM_PROJECT, confirming the lazy project resolver reflects flag precedence at RunE time (this was the bug the service-catalog side fixed); the no-scope case returns the expected "no project set" guidance.

🤖 Generated with Claude Code

Add datumctl services list/enable/status so users can see which Datum Cloud
services are available for a project, request access, and check entitlement
state — available in core the same way activity/ctx/console are, with no
separate plugin install. Plugins such as compute point users at this command
in their own error messages, so it needs to ship in the base binary.

Wires the go.miloapis.com/service-catalog/pkg/cmd group with two lazy
REST-config resolvers (Service lives platform-wide, ServiceEntitlement in the
project VCP) and a lazy Project resolver reading live scope at RunE time, so a
--project flag is honored. main.go maps activation exit codes through the
top-level error path.
@scotwells
scotwells requested review from a team, ecv and privateip July 14, 2026 00:14
@scotwells
scotwells marked this pull request as ready for review July 14, 2026 00:14
@scotwells
scotwells merged commit c940ef5 into main Jul 14, 2026
3 checks passed
@scotwells
scotwells deleted the feat/services-cli-wiring branch July 14, 2026 00:52
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