Add support for commitment coverage in CCM #17
Closed
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 introduces a new feature for fetching commitment coverage information in the Harness Cloud Cost Management (CCM) toolset. The changes include updates to the API, data structures, and tool registration to support this functionality.
New Feature: Commitment Coverage Retrieval
Added API Endpoint and Constants:
ccmCommitmentBasePath
andccmCommitmentCoverageDetailsPath
constants for the new API endpoint to fetch commitment coverage details. (client/cloudcostmanagement.go
)New Method in
CloudCostManagementService
:GetComputeCoverage
method to handle API requests for commitment coverage, including default date handling and optional parameters like service and cloud account IDs. (client/cloudcostmanagement.go
)Data Structure Enhancements
CCMCommitmentOptions
,CCMCommitmentBaseResponse
, andCCMCommitmentAPIFilter
structs to represent request and response data for the new feature. (client/dto/cloudcostmanagement.go
) [1] [2]Tool Registration and Documentation
New Tool for Commitment Coverage:
FetchCommitmentCoverageTool
to define and handle the new CLI tool for fetching commitment coverage, including parameter validation and response formatting. (pkg/harness/cloudcostmanagement.go
)Registered the Tool:
FetchCommitmentCoverageTool
in theregisterCloudCostManagement
function to make it available in the toolset. (pkg/harness/tools.go
)Documentation Update:
README.md
to include the newget_commitment_coverage
command in the list of available tools. (README.md
)