Skip to content

Commit

Permalink
Adjust metered billing id for exoscale
Browse files Browse the repository at this point in the history
We need to adjust the metered billing id for exoscale, as the different
plans where indivdual products instead of variants.

Signed-off-by: Nicolas Bigler <[email protected]>
  • Loading branch information
TheBigLee committed Jan 17, 2024
1 parent d8c03d2 commit 346aa5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/exoscale/dbaas.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (ds *DBaaS) AggregateDBaaS(ctx context.Context, exoscaleDBaaS []*egoscale.D
}

o := odoo.OdooMeteredBillingRecord{
ProductID: productIdPrefix + fmt.Sprintf("-%s-%s", *dbaasUsage.Type, *dbaasUsage.Plan),
ProductID: productIdPrefix + fmt.Sprintf("v2-%s-%s", *dbaasUsage.Type, *dbaasUsage.Plan),
InstanceID: instanceId,
ItemDescription: dbaasDetail.DBName,
ItemGroupDescription: itemGroup,
Expand Down
4 changes: 2 additions & 2 deletions pkg/exoscale/dbaas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestDBaaS_aggregatedDBaaS(t *testing.T) {

now := time.Now().In(location)
record1 := odoo.OdooMeteredBillingRecord{
ProductID: "appcat-exoscale-pg-hobbyist-2",
ProductID: "appcat-exoscale-v2-pg-hobbyist-2",
InstanceID: "ch-gva-2/postgres-abc",
ItemDescription: "postgres-abc",
ItemGroupDescription: "APPUiO Managed - Cluster: c-test1 / Namespace: vshn-xyz",
Expand All @@ -32,7 +32,7 @@ func TestDBaaS_aggregatedDBaaS(t *testing.T) {
},
}
record2 := odoo.OdooMeteredBillingRecord{
ProductID: "appcat-exoscale-pg-business-128",
ProductID: "appcat-exoscale-v2-pg-business-128",
InstanceID: "ch-gva-2/postgres-def",
ItemDescription: "postgres-def",
ItemGroupDescription: "APPUiO Managed - Cluster: c-test1 / Namespace: vshn-uvw",
Expand Down

0 comments on commit 346aa5b

Please sign in to comment.