Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Bigler <[email protected]>
  • Loading branch information
TheBigLee committed Dec 18, 2023
1 parent d3cd8e9 commit 402630e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pkg/cloudscale/objectstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"time"

"github.com/vshn/billing-collector-cloudservices/pkg/control"
"github.com/vshn/billing-collector-cloudservices/pkg/controlAPI"
"github.com/vshn/billing-collector-cloudservices/pkg/kubernetes"
"github.com/vshn/billing-collector-cloudservices/pkg/log"
"github.com/vshn/billing-collector-cloudservices/pkg/odoo"
Expand Down Expand Up @@ -86,7 +86,7 @@ func (o *ObjectStorage) GetMetrics(ctx context.Context, billingDate time.Time) (
appuioManaged := true
if o.salesOrder == "" {
appuioManaged = false
o.salesOrder, err = control.GetSalesOrder(ctx, o.controlApiClient, nsTenants[bd.Namespace])
o.salesOrder, err = controlAPI.GetSalesOrder(ctx, o.controlApiClient, nsTenants[bd.Namespace])
if err != nil {
logger.Error(err, "unable to sync bucket", "namespace", bd.Namespace)
continue
Expand Down
2 changes: 1 addition & 1 deletion pkg/control/control.go → pkg/controlAPI/controlapi.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package control
package controlAPI

import (
"context"
Expand Down
4 changes: 2 additions & 2 deletions pkg/exoscale/dbaas.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

egoscale "github.com/exoscale/egoscale/v2"
"github.com/vshn/billing-collector-cloudservices/pkg/control"
"github.com/vshn/billing-collector-cloudservices/pkg/controlAPI"
"github.com/vshn/billing-collector-cloudservices/pkg/kubernetes"
"github.com/vshn/billing-collector-cloudservices/pkg/log"
"github.com/vshn/billing-collector-cloudservices/pkg/odoo"
Expand Down Expand Up @@ -199,7 +199,7 @@ func (ds *DBaaS) AggregateDBaaS(ctx context.Context, exoscaleDBaaS []*egoscale.D
logger.V(1).Info("Found exoscale dbaas usage", "instance", dbaasUsage.Name, "instance created", dbaasUsage.CreatedAt)

if ds.salesOrder == "" {
ds.salesOrder, err = control.GetSalesOrder(ctx, ds.controlApiClient, dbaasDetail.Organization)
ds.salesOrder, err = controlAPI.GetSalesOrder(ctx, ds.controlApiClient, dbaasDetail.Organization)
if err != nil {
logger.Error(err, "Unable to sync DBaaS, cannot get salesOrder", "namespace", dbaasDetail.Namespace)
continue
Expand Down
4 changes: 2 additions & 2 deletions pkg/exoscale/objectstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

egoscale "github.com/exoscale/egoscale/v2"
"github.com/exoscale/egoscale/v2/oapi"
"github.com/vshn/billing-collector-cloudservices/pkg/control"
"github.com/vshn/billing-collector-cloudservices/pkg/controlAPI"
"github.com/vshn/billing-collector-cloudservices/pkg/exofixtures"
"github.com/vshn/billing-collector-cloudservices/pkg/kubernetes"
"github.com/vshn/billing-collector-cloudservices/pkg/log"
Expand Down Expand Up @@ -114,7 +114,7 @@ func (o *ObjectStorage) getOdooMeteredBillingRecords(ctx context.Context, sosBuc
instanceId := fmt.Sprintf("%s/%s", bucketDetail.Zone, bucketDetail.BucketName)
if o.salesOrder == "" {
itemGroup = fmt.Sprintf("APPUiO Cloud - Zone: %s / Namespace: %s", o.clusterId, bucketDetail.Namespace)
o.salesOrder, err = control.GetSalesOrder(ctx, o.controlApiClient, bucketDetail.Organization)
o.salesOrder, err = controlAPI.GetSalesOrder(ctx, o.controlApiClient, bucketDetail.Organization)
if err != nil {
logger.Error(err, "unable to sync bucket", "namespace", bucketDetail.Namespace)
continue
Expand Down

0 comments on commit 402630e

Please sign in to comment.