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.
In order to have a good experience with our community, we recommend that you read the contributing guidelines for making a pull request.
Summary of Pull Request
This pull request focuses on centralizing constant values by moving them to the
constants
package and updating the codebase to use these constants. The main changes include importing theconstants
package where needed, replacing hard-coded values with constants, and adding new constants for various statuses and configurations.Centralizing Constants
hcx/constants/constants.go
: Added new constants for VMC statuses, general statuses, network profiles, locations, compute profiles, SSO provider types, and role mappings.Updating Imports
hcx/resource_compute_profile.go
: Imported theconstants
package.hcx/resource_location.go
: Imported theconstants
package.hcx/resource_rolemapping.go
: Imported theconstants
package.hcx/resource_service_mesh.go
: Imported theconstants
package.hcx/resource_sso.go
: Imported theconstants
package.hcx/resource_vcenter.go
: Imported theconstants
package.hcx/resource_vmc.go
: Imported theconstants
package.Replacing Hard-Coded Values
hcx/resource_compute_profile.go
: Replaced hard-coded status and compute type values with constants. [1] [2] [3] [4] [5] [6] [7] [8] [9]hcx/resource_location.go
: Replaced hard-coded latitude and longitude values with constants.hcx/resource_network_profile.go
: Replaced hard-coded organization value with a constant.hcx/resource_rolemapping.go
: Replaced hard-coded role values with constants. [1] [2]hcx/resource_service_mesh.go
: Replaced hard-coded status values with constants. [1] [2]hcx/resource_sso.go
: Replaced hard-coded SSO provider type value with a constant. [1] [2]hcx/resource_vcenter.go
: Replaced hard-coded status values with constants. [1] [2]hcx/resource_vmc.go
: Replaced hard-coded VMC status values and retry intervals with constants. [1] [2]Minor Improvements
hcx/resource_site_pairing.go
: Improved error messages for consistency. [1] [2]hcx/resource_sso.go
: Improved comments for clarity. [1] [2]Type of Pull Request
Please describe:
Related to Existing Issues
Issue Number: N/A
Test and Documentation Coverage
For bug fixes or features:
Breaking Changes?