Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a tool-mode switch (--tool-mode=legacy|multiplex|both) to control whether the server exposes the existing discrete update_*/delete_* tools, new merged “modify_*” tools (that combine update/delete/restore/remove operations), or both. It also updates tool parameter types to better separate create vs update/modify inputs and adds validation to prevent no-op updates.
Changes:
- Add
--tool-modeCLI flag + server option, and gate tool registration based on the selected mode. - Introduce many
Modify*tool handlers (multiplex mode) that unify update/delete (and similar) operations behind anoperationparameter. - Update/extend tool parameter structs and add “at least one updatable field” validations across multiple resources.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/cmds.go | Adds --tool-mode flag and passes it into server options. |
| server/server.go | Registers tools conditionally based on tool mode; adds modify tool annotation. |
| tool/tool.go | Adds new *Create, *Modify, and *Update request structs for multiplex tools. |
| server/volume.go | Uses VolumeCreate and adds ModifyVolume + update validation improvements. |
| server/svm.go | Adds ModifySVM and update validation helper. |
| server/Snapshotpolicy.go | Uses SnapshotPolicyCreate; adds modify handlers for policy + schedules. |
| server/snapshot.go | Adds ModifySnapshot to unify restore/delete. |
| server/snapmirror.go | Adds ModifySnapMirror; refactors transfer method name and state update helper. |
| rest/snapmirror.go | Renames transfer method to InitOrUpdateSnapMirrorTransfer. |
| server/qtree.go | Uses QtreeCreate; adds ModifyQtree and shared validation. |
| server/QoSPolicy.go | Adds ModifyQoSPolicy and shared update validation. |
| server/nvme.go | Adds modify handlers for NVMe service/subsystem/namespace. |
| server/nfsService.go | Adds ModifyNFSService and update validation helper. |
| server/NFS.go | Uses NFSExportPolicyCreate / rules create type; adds modify handlers and validations. |
| server/lun.go | Adds ModifyLUN and shared LUN validation. |
| server/iscsiService.go | Adds modify handlers for iSCSI service and network IP interface; refactors validation. |
| server/igroup.go | Adds ModifyIGroup. |
| server/fcp.go | Adjusts FCP update input type; adds modify handlers for FCP service + FC interface. |
| server/cifsService.go | Uses CIFSServiceCreate; adds ModifyCIFSService + update validation helper. |
| server/cifs.go | Uses CIFSShareCreate; adds ModifyCIFSShare + update validation helper. |
| descriptions/descriptions.go | Adds descriptions for new modify tools and renames transfer description. |
| integration/test/tools_test.go | Adds extra input context to retry log line. |
| integration/test/iscsi_test.go | Updates prompt text used by integration test. |
| integration/test/igroup_test.go | Updates prompt text used by integration test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# Conflicts: # integration/test/tools_test.go # tool/tool.go
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.
Validated with existing CI tests with legacy mode, multiplex mode and both(default) mode.
Usage way:
go run main.go start --tool-mode multiplex