Skip to content

Commit

Permalink
Merge pull request #74 from vshn/fix/instance_id_unique
Browse files Browse the repository at this point in the history
Adjust instanceID for objectStorage to ensure uniqueness
  • Loading branch information
TheBigLee authored Dec 28, 2023
2 parents e0800f7 + 65e2a44 commit d8c03d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/cloudscale/objectstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (o *ObjectStorage) createOdooRecord(bucketMetricsData cloudscale.BucketMetr
return []odoo.OdooMeteredBillingRecord{
{
ProductID: productIdStorage,
InstanceID: instanceId,
InstanceID: instanceId + "/storage",
ItemDescription: bucketMetricsData.Subject.BucketName,
ItemGroupDescription: itemGroup,
SalesOrder: salesOrder,
Expand All @@ -150,7 +150,7 @@ func (o *ObjectStorage) createOdooRecord(bucketMetricsData cloudscale.BucketMetr
},
{
ProductID: productIdTrafficOut,
InstanceID: instanceId,
InstanceID: instanceId + "/trafficout",
ItemDescription: bucketMetricsData.Subject.BucketName,
ItemGroupDescription: itemGroup,
SalesOrder: salesOrder,
Expand All @@ -163,7 +163,7 @@ func (o *ObjectStorage) createOdooRecord(bucketMetricsData cloudscale.BucketMetr
},
{
ProductID: productIdQueryRequests,
InstanceID: instanceId,
InstanceID: instanceId + "/requests",
ItemDescription: bucketMetricsData.Subject.BucketName,
ItemGroupDescription: itemGroup,
SalesOrder: salesOrder,
Expand Down
2 changes: 1 addition & 1 deletion pkg/exoscale/objectstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (o *ObjectStorage) getOdooMeteredBillingRecords(ctx context.Context, sosBuc

o := odoo.OdooMeteredBillingRecord{
ProductID: productIdStorage,
InstanceID: instanceId,
InstanceID: instanceId + "/storage",
ItemDescription: bucketDetail.BucketName,
ItemGroupDescription: itemGroup,
SalesOrder: salesOrder,
Expand Down

0 comments on commit d8c03d2

Please sign in to comment.