From 8e1064edca19d37ecdf3d8188a2232877cd48a8f Mon Sep 17 00:00:00 2001 From: Luke Couzens Date: Tue, 8 Aug 2023 21:20:47 +0100 Subject: [PATCH] correct azure v2 columns --- nise/generators/azure/azure_generator.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nise/generators/azure/azure_generator.py b/nise/generators/azure/azure_generator.py index 146b7de2..9e5a2cc4 100644 --- a/nise/generators/azure/azure_generator.py +++ b/nise/generators/azure/azure_generator.py @@ -62,7 +62,7 @@ "Date", "ProductName", "MeterCategory", - "MeterSubCategory", + "MeterSubcategory", "MeterId", "MeterName", "MeterRegion", @@ -297,9 +297,9 @@ def _get_location(self): def _add_common_usage_info(self, row, start, end, **kwargs): """Add common usage information.""" + row["SubscriptionGuid"] = self.subscription_guid if self.azure_columns == AZURE_COLUMNS_V2: usage_account = choice(self.usage_accounts) - row["SubscriptionId"] = self.subscription_guid row["SubscriptionName"] = self.account_info.get("subscription_name") row["AccountName"] = usage_account[0] row["AccountOwnerId"] = usage_account[1] @@ -311,7 +311,6 @@ def _add_common_usage_info(self, row, start, end, **kwargs): row["BillingPeriodStartDate"] = self.first_day_of_month(start).strftime(DATE_FMT) row["BillingPeriodEndDate"] = self.last_day_of_month(start).strftime(DATE_FMT) else: - row["SubscriptionGuid"] = self.subscription_guid row["UsageDateTime"] = start return row