Skip to content

feat(vserver): add vServer product CLI (vpc, subnet, secgroup, volume, volumetype, flavor, image, server)#17

Merged
vks-team merged 4 commits into
mainfrom
vserver
Jun 29, 2026
Merged

feat(vserver): add vServer product CLI (vpc, subnet, secgroup, volume, volumetype, flavor, image, server)#17
vks-team merged 4 commits into
mainfrom
vserver

Conversation

@vks-team

Copy link
Copy Markdown
Contributor

Summary

Adds the vServer product CLI under cmd/vserver/ following the multi-product architecture: vpc, subnet, secgroup, volume, volumetype, flavor, image, server command groups, plus an internal/vserverclient package (zones, completion helpers), formatter/client additions, and mkdocs nav. ~73 files.

⚠️ Blocker — must fix before merge (1 line)

The vServer CLI does not mount: cmd/vserver/vserver.go calls cli.RegisterService(VServerCmd) correctly, but cmd/register.go still has the blank-import commented out:

// _ "github.com/vngcloud/greennode-cli/cmd/vserver"

Verified by building this branch: grn --help shows only vks, not vserver. Per the Architecture guide, the one required wiring edit is to uncomment that line in cmd/register.go. Until then the entire vserver tree is dead code.

Test plan

  • Uncomment the cmd/vserver blank-import in cmd/register.go
  • cd go && CGO_ENABLED=0 go build -o grn . then grn vserver --help lists the subcommands
  • go test ./... (note macOS 26 + Go 1.22 needs CGO_ENABLED=1 go test -ldflags='-linkmode=external' ./...)
  • Smoke-test grn vserver vpc list, volumetype list, etc. against a real project
  • CODEOWNERS: add /go/cmd/vserver/ ownership

🤖 Generated with Claude Code

huynp4 and others added 2 commits June 16, 2026 13:23
cmd/vserver registered via cli.RegisterService(VServerCmd) but was never
imported, so `grn vserver` did not appear. Uncomment the blank import so the
package init() runs and the service mounts.

Verified: `grn --help` now lists `vserver`; `grn vserver --help` shows all 8
subcommands; full test suite passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vks-team

Copy link
Copy Markdown
Contributor Author

Blocker resolved in 70505a9: uncommented the cmd/vserver blank-import in cmd/register.go.

Verified on this branch:

  • grn --help now lists vserver alongside vks
  • grn vserver --help shows all 8 subcommands: flavor, image, secgroup, server, subnet, volume, volume-type, vpc
  • go test ./... — all 7 packages pass; go vet clean

Remaining (non-blocking): add /go/cmd/vserver/ to CODEOWNERS, and smoke-test against a live project.

tytv2 and others added 2 commits June 29, 2026 15:17
Route reviews of cmd/vserver, internal/vserverclient, and docs/commands/vserver
to the vserver team.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
go test on macos-latest with Go 1.22 aborted with "missing LC_UUID load
command": the internal linker omits LC_UUID and recent macOS dyld rejects such
binaries. Build/run (CGO_ENABLED=0) is unaffected; only test binaries crash.
Run tests with CGO_ENABLED=1 -ldflags=-linkmode=external (system cc is present
on ubuntu and macos runners).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vks-team vks-team enabled auto-merge (squash) June 29, 2026 08:47
@vks-team vks-team merged commit fccc04d into main Jun 29, 2026
4 checks passed
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