fix: add missing --network flag for ip static-nat enable command - #45
fix: add missing --network flag for ip static-nat enable command#45cokerrd wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughStatic NAT enablement now requires a network slug, includes it in the API request, returns the response envelope, and displays the resulting status and message in the CLI. ChangesStatic NAT network association
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/api/ipaddress/ipaddress_test.go (1)
191-198: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover the response message used by the CLI.
The updated command renders
ip.Message, but this test only verifiesStatus; populateMessagein the fixture and assertresult.Messageso the response-envelope/output contract is covered.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/api/ipaddress/ipaddress_test.go` around lines 191 - 198, Update the response fixture used by this test to populate the Message field, then add an assertion for result.Message alongside the existing result.Status check. Verify the expected message emitted by the CLI response envelope while preserving the current body assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@pkg/api/ipaddress/ipaddress_test.go`:
- Around line 191-198: Update the response fixture used by this test to populate
the Message field, then add an assertion for result.Message alongside the
existing result.Status check. Verify the expected message emitted by the CLI
response envelope while preserving the current body assertions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fef6a324-2442-4c88-8535-3a64fc8b855b
📒 Files selected for processing (3)
internal/commands/ip.gopkg/api/ipaddress/ipaddress.gopkg/api/ipaddress/ipaddress_test.go
Addresses #44
--networkflag which now passes the correct request to the apiPrevious output

corrected output

Demo
Screen.Recording.2026-07-23.at.00.36.53.mov
Summary by CodeRabbit
New Features
Improvements