-
Bug
-
Resolution: Done
-
Major
-
None
Currently we are including the billing_provider & billing_account_id in the data exported for instances but we are not including the corresponding data on subscriptions. This means that customers are unable to help themselves when they are trying to determine why usage isn't being reported properly to a cloud provider.
Implementation
java/com/redhat/swatch/contract/service/export/SubscriptionDataExporterService.java is responsible for creating the export. Steps to include the billing_provider & billing_account_id are:
- Add the strings into schemas/subscriptions_export_json_item.yaml and schemas/subscriptions_export_csv_item.yaml
- regenerate SubscriptionsExportCsvItem and SubscriptionsExportJsonItem to include the 2 new fields.
- The repository is already pulling the data into SubscriptionCapacityView, no change required there.
- SubscriptionCsvDataMapperService and SubscriptionJsonDataMapperService must populate the SubscriptionExportCsvItem and SubscriptionExportJsonItem from the SubscriptionCapacityView
Testing
- The unit test will be able to be expanded to test these 2 new fields SubscriptionDataExporterServiceTest
- The existing integration test iqe_rhsm_subscriptions/tests/integration/exports/test_export_subscriptions.py can be enhanced to verify the fields.