From 3ab8cea9df8644c609a818b186a8e732107b9033 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Wed, 11 Sep 2024 17:04:05 +0200 Subject: [PATCH] remove ContainedIn compat CBR has confirmed that they don't need this. --- internal/core/resource_behavior.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/core/resource_behavior.go b/internal/core/resource_behavior.go index 4ad6eb51f..a4471c251 100644 --- a/internal/core/resource_behavior.go +++ b/internal/core/resource_behavior.go @@ -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.