Skip to content

feat(server/create): refuse g2d-* flavors with a clear error (closes #196)#199

Merged
crowdy merged 1 commit into
mainfrom
fix/issue-196-g2d-reject
May 9, 2026
Merged

feat(server/create): refuse g2d-* flavors with a clear error (closes #196)#199
crowdy merged 1 commit into
mainfrom
fix/issue-196-g2d-reject

Conversation

@crowdy
Copy link
Copy Markdown
Owner

@crowdy crowdy commented May 9, 2026

Summary

  • `server create --flavor <g2d-*-uuid>` previously ran all the way through the create-summary prompt and only then surfaced an upstream `HTTP 400: block_device_mapping required` — confusing because the CLI had emitted a vague "may not be supported" warning at the same time.
  • Refuse g2d-* (built-in-disk family) up front with an actionable error pointing to volume-backed alternatives (g2l-* / g2w-*).
  • Keeps the existing `isUsableFlavor` warning path for other unfamiliar names so we don't over-restrict.

The interactive flavor picker already filters to g2l-t-* via `isUsableFlavor`, so this only affects users who explicitly pass `--flavor <g2d-*>` (UUID or name).

Test plan

  • `go test ./cmd/server/... -run Flavor` — new `TestIsUnsupportedFlavor` covers g2d-* matching
  • `go test ./...` — full suite green
  • Live verify: `conoha server create --flavor ...` exits with the new error before any prompts/network

Future work

When/if ConoHa3 publishes the BDM shape required for g2d-* over the public API, swap the early refusal for an automatic BDM build so users can actually create dedicated-disk servers.

🤖 Generated with Claude Code

…196)

Built-in-disk flavors (g2d-*) require a server-side block_device_mapping
payload that this CLI does not currently build, so creating one with the
existing flow produces a misleading HTTP 400 ("block_device_mapping
required") well after the create-summary prompt.

Refuse g2d-* up front with an actionable message pointing to volume-backed
alternatives (g2l-* / g2w-*). The interactive flavor picker already
filters via isUsableFlavor, so this only affects --flavor users who pass
a g2d-* UUID or name.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@crowdy crowdy merged commit 52ae065 into main May 9, 2026
5 checks passed
@crowdy crowdy deleted the fix/issue-196-g2d-reject branch May 9, 2026 13:31
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