Skip to content

Commit

Permalink
Merge pull request #556 from sapcc/cleanup-contained-in
Browse files Browse the repository at this point in the history
remove ContainedIn compat
  • Loading branch information
majewsky authored Sep 11, 2024
2 parents c9ba170 + 3ab8cea commit a7b1edf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/core/resource_behavior.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,12 @@ func (b ResourceBehavior) ToCommitmentConfig(now time.Time) *limesresources.Comm
// BuildAPIResourceInfo converts a ResourceInfo from LIQUID into the API
// format, using the category mapping in this behavior object.
func (b ResourceBehavior) BuildAPIResourceInfo(resName limesresources.ResourceName, resInfo liquid.ResourceInfo) limesresources.ResourceInfo {
result := limesresources.ResourceInfo{
return limesresources.ResourceInfo{
Name: resName,
Unit: resInfo.Unit,
Category: b.Category,
NoQuota: !resInfo.HasQuota,
}
// TODO: remove this deprecated field once CBR has removed their use of it on this particular resource
if suffix, ok := strings.CutPrefix(string(resName), "snapmirror_capacity"); ok {
result.ContainedIn = limesresources.ResourceName("share_capacity" + suffix)
}
return result
}

// Merge computes the union of both given resource behaviors.
Expand Down

0 comments on commit a7b1edf

Please sign in to comment.