feat: close network/server flag-parity gaps found by a cleanup script - #31
Merged
Merged
Conversation
… interfaces_info `router list` accepted only --name, so `--project` exited 2 with a usage error; it now takes upstream's --project/--project-domain, --enable/--disable and the tag filters. `security group list` took no filters at all; it now takes --project/--project-domain, the tag filters and a koc-native exact --name, and shows upstream's Tags column. Both also accept --all-projects (defaulting from ALL_PROJECTS, exclusive with --project). Neutron has no cross-project switch and both tables already show the Project column, so it changes nothing; it exists so a script carrying it gets a listing instead of a usage error. `router show` now emits upstream's interfaces_info: one entry per fixed IP of each non-gateway port with device_id=<router>, the same extra port list upstream does, so callers no longer need their own `port list --router`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RCegCom2HEfpHM4H58tBfa
`server delete --wait` issues every DELETE, then polls each server until nova answers 404 — the point its ports are released — and prints the confirmation only then, so cleanup scripts no longer need their own poll loop. --wait-timeout bounds it per server. A SOFT_DELETED server fails the wait immediately (nova's reclaim window would outlast any timeout) and points at --force, which sends nova's forceDelete action as upstream's does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RCegCom2HEfpHM4H58tBfa
… --share/--no-share `router list --long` adds upstream's Routes, External gateway info, Availability zones (when the router_availability_zone extension reports them) and Tags columns; Distributed and HA now appear whenever neutron returned them, as upstream shows them. `--agent <id>` lists the L3 agent's hosted routers and re-applies the other filters client-side, since that subresource takes no query parameters. `security group list --share/--no-share` sends neutron's `shared` filter, and the list gains upstream's Shared column. gophercloud's groups.List has no builder or shared field, so the pager is built by a small isolated helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RCegCom2HEfpHM4H58tBfa
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.
Closes the koc/
openstackflag gaps that a real cleanup script hit. Each gap forced a separate code path in the script, and one of them silently skipped every router. All flag names and behaviour were checked against python-openstackclient 10.3.0's parsers.Changes
router list(internal/cli/network/router.go)--project/--project-domain,--enable/--disable,--tags/--any-tags/--not-tags/--not-any-tags,--long,--agent <id>. Before this, the only flag was--name, so--projectfailed with a usage error (exit 2).--longadds Routes, External gateway info, Availability zones (only when the router_availability_zone extension reports them) and Tags.--agentlists the routers from/agents/{id}/l3-routers. That endpoint accepts no query filters, so the other filters are applied client-side.router show: adds upstream'sinterfaces_info, built the same way upstream builds it: list the router's ports bydevice_id, skip the gateway port, and add one entry per fixed IP.security group list(internal/cli/network/securitygroup.go)--project/--project-domain, the four tag filters,--share/--no-share, plus an exact--namethat is koc-only (upstream has no name filter). Before this there were no filters at all.groups.Listhas nosharedoption and noExtractGroupsInto, so the pager is built in a small separate helper (listSecGroups).--all-projectson both list verbs is a koc-only no-op that honoursALL_PROJECTSand is refused with--project. It works like the existingport listone: neutron has no cross-project switch, and both tables already show Project. It exists so a script that passes it gets a listing instead of a usage error.server delete(internal/cli/server/server.go,state.go)--wait/--wait-timeoutsends every DELETE first, then polls each server until nova returns 404, and printsDeleted server Xonly after that.SOFT_DELETEDserver fails the wait immediately and suggests--force, rather than waiting until the timeout while the server still holds its ports.--forcesends nova'sforceDeleteaction, as upstream does.Docs:
docs/coverage.mdand the README "Known limitations" section now cover the new koc-only flags. The command count doesn't change: no commands were added or removed.Deliberately not changed:
-f valuekeeps its tab separator.docs/coverage.mdrecords that as a deliberate deviation, and changing it needs a separate decision.Verification
go test ./...,go vet,golangci-lintv2.13.2 (the version CI pins): 0 issues. gofmt is clean, and the offline static build (-mod=vendor,GOPROXY=off) succeeds.interfaces_infoshape and key order, column presence rules for--longand admin-only fields, client-side filtering for--agent,--share/--no-share,server delete --wait(all DELETEs before any polling, confirmation only after 404), fail-fast on SOFT_DELETED, and--forcesending only the action.kocend-to-end against a local mock of keystone, neutron and nova, and checked the request log for each new flag. Not run against a real cloud.🤖 Generated with Claude Code
https://claude.ai/code/session_01RCegCom2HEfpHM4H58tBfa
Generated by Claude Code