Repository navigation
feat(network): add verda network and subnet list, create and delete for mk8s (beta) - #77
Merged
Merged
Conversation
yutkin
force-pushed
the
feat/sdn-120-network-mk8s-min
branch
2 times, most recently
from
November 17, 2026 15:20
5fbdf51 to
15e689e
Compare
…beta) verda network list, create and delete manage private networks. verda network subnet list, create and delete manage their subnets. Commands take IDs. On a terminal, missing values open a wizard (create) or a picker (delete). subnet create without --cidr uses the first free /24 in 10.0.0.0/16. It refuses a CIDR that overlaps another subnet of the network before the API call. --default sends is_default true, --default=false sends false, and no flag leaves it to the API. Delete warns, asks for confirmation, and needs --yes in agent mode. Dependencies: verdacloud-sdk-go v1.9.0 (optional is_default on subnet create), Go 1.26.11 and otel v1.47.0 (GO-2026-6859, GHSA-q7gw-24fr-5p69). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yutkin
force-pushed
the
feat/sdn-120-network-mk8s-min
branch
from
November 17, 2026 15:52
15e689e to
50ef0bb
Compare
For the first subnet in a location the wizard skipped the default step, and the skip reset the flag. The request then had no is_default, so the API made the subnet the default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yutkin
marked this pull request as ready for review
November 17, 2026 16:16
ajmyyra
reviewed
Nov 17, 2026
The CLI no longer checks --cidr against RFC 1918 ranges, a /29 minimum, canonical form or overlaps with other subnets. The API decides what it accepts. The automatic free /24 stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- --cidr is checked for IPv4 format only, as the SDK does, so a bad value is VALIDATION_ERROR again and the wizard asks again. The API still decides which ranges it accepts. - A blank network or subnet ID counts as missing. - network create checks --mode, and subnet create checks --name and --cidr, before any prompt or API call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nicksemin
reviewed
Nov 17, 2026
nicksemin
reviewed
Nov 17, 2026
nicksemin
previously approved these changes
Nov 17, 2026
nicksemin
left a comment
There was a problem hiding this comment.
LGTM but the shared logic for checking whether the tty is interactive or not.
Up to you if you want to fix it or not 🚀
Contributor
Author
This fix would require touching multiple files which are not directly related to PR. It's planned to fix separately. The PR is already big. |
Auto mode creates subnets only for the default network, so a non-default auto network needs subnet create too. Accept --mode in any case. Make the create help say when the CLI prompts, and list subnet create in the root CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yutkin
force-pushed
the
feat/sdn-120-network-mk8s-min
branch
from
November 18, 2026 08:38
6373eea to
ee1397f
Compare
list, subnet list and subnet delete tests had no file of their own. The tests do not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… default Without is_default, the API makes a new subnet the default when the network has no default subnet in its location, not only for the first subnet. The wizard now skips the question in that case, so it gives the same result as a create without --default. Correct the help and the package notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ajmyyra
approved these changes
Nov 18, 2026
jaakkovarjo
added a commit
that referenced
this pull request
Nov 18, 2026
Resolves conflicts from the network feature (#77) landing on main: - CLAUDE.md: keep the new cmd/network row and our GA serverless row (drop the stale beta/VERDA_BATCHJOB_ENABLED serverless row). - go.mod: take verdacloud-sdk-go v1.9.0 (the network feature needs it); serverless builds and tests pass against it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
verda network(beta). A user can list, create and delete private networks and their subnets.subnet deletealso needs--network.subnet createwithout--cidruses the first free/24in10.0.0.0/16. The API checks--cidr.--defaultsendsis_default: true,--default=falsesendsfalse, and no flag leaves it to the API.--yes.Dependency updates:
is_defaulton subnet create is optional, so--default=falsecan be sent.Evidence
verda --helphas nonetworkcommand.After:
is_default(absent,true,false) and for a trimmed--cidr.go test -race ./...,make lint(0 issues) andmake fix.checkpass.50ef0bb): 115 cases, 0 failures. It covers all six commands in table, JSON, YAML and agent mode, the terminal wizards and pickers, delete refused with an attached instance (409), the ROUTE column,--default, and auto mode. A deploy with no subnet into the default auto network got a10.128.16.0/20subnet. Everything created was deleted.Merge Danger
Door: two-way
The commands are new and marked beta. Reverting the PR removes them.
Blast Radius: small
--yesin agent mode. The API refuses to delete a network or subnet that has instances.🤖 Generated with Claude Code