Feat: enhance az fleet tool with structured parameters and validation #69
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.
Azure Fleet Tool Implementation
This pull request introduces a new
az_fleet
tool with structured parameters for managing Azure Kubernetes Service (AKS) Fleets. The implementation includes specialized command execution, parameter validation, enhanced error handling, and comprehensive documentation updates to improve usability, security, and maintainability.New
az_fleet
Tool ImplementationThe tool provides comprehensive Azure Kubernetes Service Fleet management capabilities with support for multiple operations across different resource types:
Supported Operations and Resources:
Usage Examples:
operation='list', resource='fleet', args='--resource-group myRG'
operation='show', resource='fleet', args='--name myFleet --resource-group myRG'
operation='create', resource='member', args='--name myMember --fleet-name myFleet --resource-group myRG --member-cluster-id /subscriptions/.../myCluster'
Core Implementation Details
Fleet Executor Implementation: Added
FleetExecutor
ininternal/azcli/fleet_executor.go
to handle structured commands foraz_fleet
. This executor includes parameter validation, access level enforcement, and command construction capabilities.Fleet Tool Registration: Updated
internal/components/fleet/registry.go
to register theaz_fleet
tool with structured parameters (operation
,resource
,args
) and detailed descriptions for improved developer experience.Testing Enhancements
Unit Tests for Executor: Added comprehensive tests in
internal/azcli/fleet_executor_test.go
to validate parameter extraction, access level enforcement, and command construction functionality.Registry Tests: Enhanced tests in
internal/components/fleet/registry_test.go
to verify structured parameter registration and tool descriptions are properly configured.Documentation Updates
README and Prompts: Updated
README.md
andprompts/azure-fleet-tools.md
to reflect the new structured parameter approach. Documentation now includes practical examples and details about enhanced error handling and validation mechanisms.Integration with Server
Server Integration: Modified
internal/server/server.go
to utilize the newFleetExecutor
for executingaz_fleet
commands, ensuring seamless integration with the existing infrastructure.Sample Usage
These changes collectively enhance the functionality and user experience of the
az_fleet
tool while ensuring robust validation and security across all fleet management operations.