allow set multiple values for same category keys#150
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request upgrades the Nutanix client library from v0.2.0 to v0.5.2 and refactors the NutanixDriver implementation to maintain compatibility with the newer API. The changes introduce context handling for better request lifecycle management and update the category handling mechanism to support multiple values per category key.
- Updated Nutanix client library dependency and adjusted import paths
- Added context.Context parameter to all Nutanix API calls
- Refactored category handling to use CategoriesMapping instead of Categories
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| go.mod | Updates Nutanix client dependency from v0.2.0 to v0.5.2 and adds new indirect dependencies |
| utils/extra.go | Updates import path for Nutanix v3 client package |
| machine/driver/driver.go | Adds context handling, updates import paths, and refactors category handling to support multiple values |
4b4562c to
1fef97a
Compare
1fef97a to
5fcdf4e
Compare
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.
This pull request updates dependencies and refactors the
NutanixDriverimplementation to improve compatibility with the latest version of the Nutanix client library. Key changes include dependency updates ingo.mod, adjustments to reflect API changes in the Nutanix client, and the introduction of context handling for API calls.Dependency Updates:
github.com/nutanix-cloud-native/prism-go-clientfromv0.2.0tov0.5.2ingo.modto use the latest Nutanix client library.github.com/go-logr/logr,github.com/go-openapi/*, and others) and removed unused ones (e.g.,github.com/hashicorp/*) ingo.mod.Refactoring for API Changes:
machine/driver/driver.goandutils/extra.goto align with the new structure (v3package moved). [1] [2]metadata.Categorieswithmetadata.CategoriesMappingand enabledmetadata.UseCategoriesMappingto support the updated API for handling categories. [1] [2]Context Handling:
context.Contextto all Nutanix API calls for better control over request lifecycles (e.g.,ListAllProject,CreateVM,GetTask, etc.). [1] [2] [3] [4] and others)Code Cleanup:
ListAllCluster,ListAllSubnet). [1] [2]These changes ensure compatibility with the latest Nutanix client library and improve code maintainability by leveraging modern practices like context handling.