diff --git a/CHANGELOG.md b/CHANGELOG.md index 492e007b..1d138d18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://github.com/sapcc/limesctl/compare/v3.3.2...HEAD) +### Removed + +- Removed everything related to Bursting + ## 3.3.2 - 2024-01-03 ### Changed diff --git a/internal/core/cluster.go b/internal/core/cluster.go index 9a3128e5..daf837e8 100644 --- a/internal/core/cluster.go +++ b/internal/core/cluster.go @@ -28,7 +28,7 @@ type ClusterReport struct { var csvHeaderClusterLong = []string{ "cluster id", "area", "service", "category", "resource", "capacity", - "domains quota", "usage", "physical usage", "burst usage", "unit", "scraped at (UTC)", + "domains quota", "usage", "physical usage", "unit", "scraped at (UTC)", } var csvHeaderClusterDefault = []string{ @@ -75,13 +75,13 @@ func (c ClusterReport) render(opts *OutputOpts) CSVRecords { valToStr, unit := getValToStrFunc(opts.Humanize, cSrvRes.Unit, []uint64{ zeroIfNil(capacity), zeroIfNil(physU), zeroIfNil(domsQ), - cSrvRes.Usage, cSrvRes.BurstUsage, + cSrvRes.Usage, }) if opts.CSVRecFmt == CSVRecordFormatLong { r = append(r, c.ID, cSrv.Area, string(cSrv.Type), cSrvRes.Category, string(cSrvRes.Name), emptyStrIfNil(capacity, valToStr), emptyStrIfNil(domsQ, valToStr), valToStr(cSrvRes.Usage), emptyStrIfNil(physU, valToStr), - valToStr(cSrvRes.BurstUsage), string(unit), timestampToString(cSrv.MinScrapedAt), + string(unit), timestampToString(cSrv.MinScrapedAt), ) } else { r = append(r, c.ID, string(cSrv.Type), string(cSrvRes.Name), emptyStrIfNil(capacity, valToStr), diff --git a/internal/core/domain.go b/internal/core/domain.go index e2ae5491..00df62db 100644 --- a/internal/core/domain.go +++ b/internal/core/domain.go @@ -40,7 +40,7 @@ var csvHeaderDomainDefault = []string{"domain id", "service", "resource", "quota var csvHeaderDomainLong = []string{ "domain id", "domain name", "area", "service", "category", "resource", - "quota", "projects quota", "usage", "physical usage", "burst usage", "unit", "scraped at (UTC)", + "quota", "projects quota", "usage", "physical usage", "unit", "scraped at (UTC)", } const domainName = "domain name" @@ -90,13 +90,13 @@ func (d DomainReport) render(opts *OutputOpts) CSVRecords { valToStr, unit := getValToStrFunc(opts.Humanize, dSrvRes.Unit, []uint64{ zeroIfNil(physU), zeroIfNil(domQ), zeroIfNil(projectsQ), - dSrvRes.Usage, dSrvRes.BurstUsage, + dSrvRes.Usage, }) if opts.CSVRecFmt == CSVRecordFormatLong { r = append(r, d.UUID, d.Name, dSrv.Area, string(dSrv.Type), dSrvRes.Category, string(dSrvRes.Name), emptyStrIfNil(domQ, valToStr), emptyStrIfNil(projectsQ, valToStr), valToStr(dSrvRes.Usage), - emptyStrIfNil(physU, valToStr), valToStr(dSrvRes.BurstUsage), string(unit), timestampToString(dSrv.MinScrapedAt), + emptyStrIfNil(physU, valToStr), string(unit), timestampToString(dSrv.MinScrapedAt), ) } else { nameOrID := d.UUID diff --git a/internal/core/fixtures/domain-list-filtered.csv b/internal/core/fixtures/domain-list-filtered.csv index 8068d342..2c1a7ab0 100644 --- a/internal/core/fixtures/domain-list-filtered.csv +++ b/internal/core/fixtures/domain-list-filtered.csv @@ -1,3 +1,3 @@ -domain id;domain name;area;service;category;resource;quota;projects quota;usage;physical usage;burst usage;unit;scraped at (UTC) -uuid-for-france;france;shared;shared;;things;0;10;2;;0;;1970-01-01T00:01:06Z -uuid-for-germany;germany;shared;shared;;things;30;20;4;;0;;1970-01-01T00:00:22Z +domain id;domain name;area;service;category;resource;quota;projects quota;usage;physical usage;unit;scraped at (UTC) +uuid-for-france;france;shared;shared;;things;0;10;2;;;1970-01-01T00:01:06Z +uuid-for-germany;germany;shared;shared;;things;30;20;4;;;1970-01-01T00:00:22Z diff --git a/internal/core/fixtures/project-list-filtered.csv b/internal/core/fixtures/project-list-filtered.csv index dcc075bd..0a278403 100644 --- a/internal/core/fixtures/project-list-filtered.csv +++ b/internal/core/fixtures/project-list-filtered.csv @@ -1,3 +1,3 @@ -domain id;domain name;project id;project name;area;service;category;resource;quota;burst quota;usage;physical usage;burst usage;unit;scraped at (UTC) -uuid-for-germany;germany;uuid-for-berlin;berlin;shared;shared;;things;10;;2;;0;;1970-01-01T00:00:22Z -uuid-for-germany;germany;uuid-for-dresden;dresden;shared;shared;;things;10;;2;;0;;1970-01-01T00:00:44Z +domain id;domain name;project id;project name;area;service;category;resource;quota;usage;physical usage;unit;scraped at (UTC) +uuid-for-germany;germany;uuid-for-berlin;berlin;shared;shared;;things;10;2;;;1970-01-01T00:00:22Z +uuid-for-germany;germany;uuid-for-dresden;dresden;shared;shared;;things;10;2;;;1970-01-01T00:00:44Z diff --git a/internal/core/project.go b/internal/core/project.go index b584e340..53a129dd 100644 --- a/internal/core/project.go +++ b/internal/core/project.go @@ -52,7 +52,7 @@ var csvHeaderProjectDefault = []string{"domain id", "project id", "service", "re var csvHeaderProjectLong = []string{ "domain id", "domain name", "project id", "project name", "area", "service", - "category", "resource", "quota", "burst quota", "usage", "physical usage", "burst usage", "unit", "scraped at (UTC)", + "category", "resource", "quota", "usage", "physical usage", "unit", "scraped at (UTC)", } // GetHeaderRow implements the LimesReportRenderer interface. @@ -99,28 +99,14 @@ func (p ProjectResourcesReport) render(opts *OutputOpts) CSVRecords { quota := pSrvRes.Quota usage := pSrvRes.Usage - // We use a *uint64 for burstQuota instead of an uint64 for - // consistency with Limes' API, i.e. if quota has a null value - // then burstQuota should also be null instead of zero. - var burstQuota *uint64 - var burstUsage uint64 - if quota != nil && p.Bursting != nil && p.Bursting.Enabled { - q := *quota - bq := p.Bursting.Multiplier.ApplyTo(q, pSrvRes.QuotaDistributionModel) - burstQuota = &bq - if usage > q { - burstUsage = usage - q - } - } - valToStr, unit := getValToStrFunc(opts.Humanize, pSrvRes.Unit, []uint64{ - zeroIfNil(burstQuota), burstUsage, zeroIfNil(physU), zeroIfNil(quota), usage, + zeroIfNil(physU), zeroIfNil(quota), usage, }) if opts.CSVRecFmt == CSVRecordFormatLong { r = append(r, p.DomainID, p.DomainName, p.UUID, p.Name, pSrv.Area, string(pSrv.Type), pSrvRes.Category, - string(pSrvRes.Name), emptyStrIfNil(quota, valToStr), emptyStrIfNil(burstQuota, valToStr), valToStr(usage), - emptyStrIfNil(physU, valToStr), valToStr(burstUsage), string(unit), timestampToString(pSrv.ScrapedAt), + string(pSrvRes.Name), emptyStrIfNil(quota, valToStr), valToStr(usage), + emptyStrIfNil(physU, valToStr), string(unit), timestampToString(pSrv.ScrapedAt), ) } else { projectNameOrID := p.UUID