swatch-2084: update eventController to set the azure billingAccountId #2990
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jira issue: SWATCH-2084
Description
Need to set the billingAccountId for azure events by using the fields azure_tenant_id and azure_subscription_id from cost-mgmt.
Testing
Setup
DEV_MODE=true ./gradlew :bootRun
Steps
{"sla": "Premium", "role": "Red Hat Enterprise Linux Server", "usage": "Production", "org_id": "org_123", "event_id": "3d363cc8-b2bc-4230-a943-638a4822da70", "timestamp": "2024-01-21T22:00:00Z", "event_type": "snapshot", "expiration": "2024-01-21T23:00:00Z", "instance_id": "test", "product_ids": ["69", "204"], "product_tag": ["rhel-for-x86-els-payg"], "event_source": "cost-management", "measurements": [{"uom": "vCPUs", "value": 1.0}], "service_type": "RHEL System", "hardware_type": "Cloud", "cloud_provider": "Azure", "azure_tenant_id": "testTenantId", "billing_provider": "azure", "azure_subscription_id": "testSubscriptionId"}
Verification
select * from events where org_id = 'org_123';